ADC_Status_struct Struct Reference

#include <structs.h>


Detailed Description

Holds ADC-status and samples.

Is updated by ADC_ISR().

Definition at line 82 of file structs.h.


Data Fields

unsigned char ADC3_G20_OS: 4
 Offset on ADC3 at 20x gain.
unsigned char ADC5_G20_OS: 4
 Offset on ADC5 at 20x gain.
signed int avgIBAT
 Average of the last four IBAT readings, in mA.
signed int discIBAT [4]
 Discrete battery current readings, in mA.
unsigned char Flag: 1
 ADC cycle complete (TRUE/FALSE).
unsigned char Halt: 1
 Stop A/D-conversions (TRUE/FALSE).
signed int IBAT
 Battery current, in mA.
unsigned char Mains: 1
 Mains OK? (TRUE/FALSE).
unsigned char MUX: 5
 Corresponds to ADMUX low bits MUX4..0.
unsigned int rawNTC
 Raw, unconditioned thermistor data.
unsigned int rawRID
 Raw, unconditioned resistor ID data.
unsigned int rawVBAT
 Raw, unconditioned battery voltage.
unsigned int VBAT
 Battery voltage, in mV.
unsigned int VIN
 Supply voltage, in mV.

Field Documentation

Offset on ADC3 at 20x gain.

Definition at line 88 of file structs.h.

Referenced by ADC_Init().

Offset on ADC5 at 20x gain.

Definition at line 89 of file structs.h.

Referenced by ADC_Init(), and ADC_ISR().

Average of the last four IBAT readings, in mA.

Definition at line 97 of file structs.h.

Referenced by ADC_Init(), ADC_ISR(), BatteryStatusRefresh(), ConstantCurrent(), HaltNow(), and MaxVoltageAndCurrent().

Discrete battery current readings, in mA.

Definition at line 96 of file structs.h.

Referenced by ADC_Init(), and ADC_ISR().

unsigned char ADC_Status_struct::Flag

ADC cycle complete (TRUE/FALSE).

Definition at line 85 of file structs.h.

Referenced by ADC_Init(), ADC_ISR(), ADC_Wait(), and Doze().

unsigned char ADC_Status_struct::Halt

Stop A/D-conversions (TRUE/FALSE).

Definition at line 87 of file structs.h.

Referenced by ADC_Init(), ADC_ISR(), and Doze().

Battery current, in mA.

Definition at line 95 of file structs.h.

Referenced by ADC_ISR(), and JumperCheck().

unsigned char ADC_Status_struct::Mains

Mains OK? (TRUE/FALSE).

Definition at line 86 of file structs.h.

Referenced by ADC_ISR(), and HaltNow().

unsigned char ADC_Status_struct::MUX

Corresponds to ADMUX low bits MUX4..0.

Definition at line 84 of file structs.h.

Referenced by ADC_Init(), and ADC_ISR().

Raw, unconditioned thermistor data.

Definition at line 91 of file structs.h.

Referenced by ADC_ISR(), HaltNow(), and NTCLookUp().

Raw, unconditioned resistor ID data.

Definition at line 90 of file structs.h.

Referenced by ADC_ISR(), and RIDLookUp().

Raw, unconditioned battery voltage.

Definition at line 92 of file structs.h.

Referenced by ADC_ISR(), and JumperCheck().

Battery voltage, in mV.

Definition at line 94 of file structs.h.

Referenced by ADC_ISR(), BatteryStatusRefresh(), ConstantVoltage(), HaltNow(), JumperCheck(), and MaxVoltageAndCurrent().

unsigned int ADC_Status_struct::VIN

Supply voltage, in mV.

Definition at line 93 of file structs.h.

Referenced by ADC_ISR(), and JumperCheck().


Generated on Fri Jul 25 12:42:36 2008 for AVR458 Charging Li-Ion Batteries with ATAVRBC100 by  doxygen 1.5.6