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. |
#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().
uint16_t adcGetMainBusVolt | ( | ) |
Filtered main bus voltage in 10mV resolution.
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.
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.
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().
Filtered voltages using a single pole, low pass filter.
Definition at line 400 of file PicoBeacon.c.
Referenced by adcGetMainBusVolt(), adcInit(), and adcUpdate().