Dac_drv.h File Reference


Detailed Description

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

Please read file license.txt for copyright notice.

Version:
1.2 (mc100_bldc_sensorless_0_1_0)
Todo:
Bug:

Definition in file Dac_drv.h.

Go to the source code of this file.

Defines

#define Disable_dac()   (DACON &= ~(1<<DAEN))
#define Disable_dac_output()   (DACON &= ~(1<<DAOE))
#define Enable_dac()   (DACON |= (1<<DAEN))
#define Enable_dac_output()   (DACON |= (1<<DAOE))
#define Enable_external_vref()   (ADMUX &= ~((1<<REFS1)|(1<<REFS0)) )
#define Enable_internal_vref()   (ADMUX |= ((1<<REFS1)|(1<<REFS0)) )
#define Enable_vcc_vref()   (ADMUX &= ~(1<<REFS1), ADMUX |= (1<<REFS0) )
#define Left_adjust_dac_input()   (DACON |= (1<<DALA))
#define Left_adjust_dac_result()   (DACON |= (1<<DALA))
#define Output_dac_disabled()   (DACON &= ~(1<<DAOE))
#define Output_dac_enable()   (DACON |= (1<<DAOE))
#define Right_adjust_dac_input()   (DACON &= ~(1<<DALA))
#define Right_adjust_dac_result()   (DACON &= ~(1<<DALA))
#define Set_dac_10_bits(dac_in)   (DACL = LOW((U16)(dac_in)), DACH = HIGH((U16)(dac_in)))
#define Set_dac_8_bits(dac_in)   (DACH = (U8)(dac_in))

Functions

void init_dac (void)
 Configures the DAC accordingly to the DAC Define Configuration values.


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