comparator_drv.h File Reference


Detailed Description

Copyright (c) 2004This file contains the low level macros and definition for the comparators.

Please read file license.txt for copyright notice.

Version:
1.3 (mc100_bldc_sensorless_0_1_0)
Todo:
Bug:

Definition in file comparator_drv.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define Comparator0_it_on_output_falling_edge()
 Comparator 0 interrupt on_output falling edge.
#define Comparator0_it_on_output_rising_edge()   (AC0CON |= ((1<<AC0IS1) | (1<<AC0IS0)) )
 Comparator 0 interrupt on_output rising edge.
#define Comparator0_it_on_output_toggle()   (AC0CON &= ~( (1<<AC0IS1) | (1<<AC0IS0) ) )
#define Comparator1_it_on_output_falling_edge()
 Comparator 1 interrupt on_output falling edge.
#define Comparator1_it_on_output_rising_edge()   (AC1CON |= ((1<<AC1IS1) | (1<<AC1IS0)) )
 Comparator 1 interrupt on_output rising edge.
#define Comparator1_it_on_output_toggle()   (AC1CON &= ~( (1<<AC1IS1) | (1<<AC1IS0) ) )
 Comparator 1 interrupt on output toggle.
#define Comparator2_it_on_output_falling_edge()
 Comparator 2 interrupt on_output falling edge.
#define Comparator2_it_on_output_rising_edge()   (AC2CON |= ((1<<AC2IS1) | (1<<AC2IS0)) )
 Comparator 2 interrupt on_output rising edge.
#define Comparator2_it_on_output_toggle()   (AC2CON &= ~( (1<<AC2IS1) | (1<<AC2IS0) ) )
 Comparator 2 interrupt on output toggle.
#define Disable_comparator0()   (AC0CON &= ~(1<<AC0EN) )
#define Disable_comparator0_interrupt()   (AC0CON &= ~(1<<AC0IE) )
#define Disable_comparator1()   (AC1CON &= ~(1<<AC1EN) )
#define Disable_comparator1_interrupt()   (AC1CON &= ~(1<<AC1IE) )
#define Disable_comparator1_interrupt_capture()   (AC1CON &= ~(1<<AC1ICE) )
#define Disable_comparator2()   (AC2CON &= ~(1<<AC2EN) )
#define Disable_comparator2_interrupt()   (AC2CON &= ~(1<<AC2IE) )
#define Enable_comparator0()   (AC0CON |= (1<<AC0EN) )
#define Enable_comparator0_interrupt()   (AC0CON |= (1<<AC0IE) )
#define Enable_comparator1()   (AC1CON |= (1<<AC1EN) )
#define Enable_comparator1_interrupt()   (AC1CON |= (1<<AC1IE) )
#define Enable_comparator1_interrupt_capture()   (AC1CON |= (1<<AC1ICE) )
#define Enable_comparator2()   (AC2CON |= (1<<AC2EN) )
#define Enable_comparator2_interrupt()   (AC2CON |= (1<<AC2IE) )
#define Set_comparator0_ni_acmp()
 Set the ACMPM pin as the negative input comparator 0.
#define Set_comparator0_ni_dac()
 Set the DAC output as the negative input comparator 0.
#define Set_comparator0_ni_vref_1_60()
 Set Vref/1.60V as the negative input comparator 0.
#define Set_comparator0_ni_vref_2_13()
 Set Vref/2.13V as the negative input comparator 0.
#define Set_comparator0_ni_vref_3_20()
 Set Vref/3.20V as the negative input comparator 0.
#define Set_comparator0_ni_vref_6_40()   (AC0CON &= ~( (1<<AC0M2) | (1<<AC0M1) | (1<<AC0M0) ) )
 Set the negative input comparator 0 as Vref/6.40V.
#define Set_comparator1_ni_acmp()
 Set the ACMPM pin as the negative input comparator 1.
#define Set_comparator1_ni_dac()
 Set the DAC output as the negative input comparator 1.
#define Set_comparator1_ni_vref_1_60()
 Set Vref/1.60V as the negative input comparator 1.
#define Set_comparator1_ni_vref_2_13()
 Set Vref/2.13V as the negative input comparator 1.
#define Set_comparator1_ni_vref_3_20()
 Set Vref/3.20V as the negative input comparator 1.
#define Set_comparator1_ni_vref_6_40()   (AC1CON &= ~( (1<<AC1M2) | (1<<AC1M1) | (1<<AC1M0) ) )
 Set the negative input comparator 1 as Vref/6.40V.
#define Set_comparator2_ni_acmp()
 Set the ACMPM pin as the negative input comparator 2.
#define Set_comparator2_ni_dac()
 Set the DAC output as the negative input comparator 2.
#define Set_comparator2_ni_vref_1_60()
 Set Vref/1.60V as the negative input comparator 2.
#define Set_comparator2_ni_vref_2_13()
 Set Vref/2.13V as the negative input comparator 2.
#define Set_comparator2_ni_vref_3_20()
 Set Vref/3.20V as the negative input comparator 2.
#define Set_comparator2_ni_vref_6_40()   (AC2CON &= ~( (1<<AC2M2) | (1<<AC2M1) | (1<<AC2M0) ) )
 Set the negative input comparator 2 as Vref/6.40V.

Functions

void init_comparator0 (void)
void init_comparator1 (void)
void init_comparator2 (void)


Generated on Wed Jul 12 16:55:12 2006 for Atmel BLDC Sensorless on ATAVRMC100 by  doxygen 1.4.7