Analog To Digital Converter

Control and manage the on board PIC A/D converter. More...


Defines

#define ADC_REF   0
 PIC ADC Channel number of the reference voltage.
#define ADC_MAINBUS   1
 PIC ADC Channel number of the main bus voltage.
#define MAIN_BUS_VOLT_OFFSET   20
 Input diode drop in units of 0.01 volts.

Functions

void adcInit ()
 Intialize the ADC subsystem.
uint16_t adcGetMainBusVolt ()
 Filtered main bus voltage in 10mV resolution.
uint16_t adcRawBusVolt ()
 Get the current ADC value for the main bus voltage.
uint16_t adcRawRefVolt ()
 Get the current ADC value for the reference source voltage.
void adcUpdate (void)
 Read and filter the ADC channels for bus voltages.

Variables

uint16_t adcMainBusVolt
 Filtered voltages using a single pole, low pass filter.


Detailed Description

Control and manage the on board PIC A/D converter.

Define Documentation

#define ADC_MAINBUS   1

PIC ADC Channel number of the main bus voltage.

Definition at line 406 of file PicoBeacon.c.

Referenced by adcRawBusVolt(), and adcUpdate().

#define ADC_REF   0

PIC ADC Channel number of the reference voltage.

Definition at line 403 of file PicoBeacon.c.

Referenced by adcRawRefVolt().

#define MAIN_BUS_VOLT_OFFSET   20

Input diode drop in units of 0.01 volts.

Definition at line 409 of file PicoBeacon.c.

Referenced by adcGetMainBusVolt().


Function Documentation

uint16_t adcGetMainBusVolt (  ) 

Filtered main bus voltage in 10mV resolution.

Returns:
voltage in 10mV steps

Definition at line 429 of file PicoBeacon.c.

References adcMainBusVolt, and MAIN_BUS_VOLT_OFFSET.

Referenced by tncStatusPacket().

void adcInit (  ) 

Intialize the ADC subsystem.

Definition at line 414 of file PicoBeacon.c.

References adcMainBusVolt.

Referenced by main().

uint16_t adcRawBusVolt (  ) 

Get the current ADC value for the main bus voltage.

Returns:
ADC value in the range 0 to 1023

Definition at line 445 of file PicoBeacon.c.

References ADC_MAINBUS.

Referenced by sysLogVoltage().

uint16_t adcRawRefVolt (  ) 

Get the current ADC value for the reference source voltage.

Returns:
ADC value in the range 0 to 1023

Definition at line 457 of file PicoBeacon.c.

References ADC_REF.

Referenced by sysLogVoltage().

void adcUpdate ( void   ) 

Read and filter the ADC channels for bus voltages.

Definition at line 467 of file PicoBeacon.c.

References ADC_MAINBUS, and adcMainBusVolt.

Referenced by main().


Variable Documentation

Filtered voltages using a single pole, low pass filter.

Definition at line 400 of file PicoBeacon.c.

Referenced by adcGetMainBusVolt(), adcInit(), and adcUpdate().


Generated on Sun Oct 5 11:25:45 2008 for Pico Beacon by  doxygen 1.5.7