Main_At8Xeb5114_Fluo_Demo.c; Adc State Machine - Atmel AT89RFD-10/EVLB002 User Manual

Non-dimmable fluorescent ballast
Table of Contents

Advertisement

5.1

Main_AT8xEB5114_fluo_demo.c

5.1.1
ADC STATE
MACHINE
Ballast Demonstrator User Guide
This file executes all the peripherals initializations and then schedules the different con-
trol tasks.
The ADC state machine is included in this file. The ADC state machine is controlled via
interrupts.
The ADC state machine functional diagram is shown below:
ADC state machine diagram
Figure 5-2.
The different states are outlined below:
ADC_OFF
The ADC was previously off, this is the first conversion and is not necessarily valid.
Start the first V_HAVERSINE_CONV conversion.
V_HAVERSINE_CONV
Get back the v_haversine result.
Start the V_BUS_CONV next conversion.
V_BUS_CONV
Get back the v_bus result.
Start the V_HAVERSINE_CONV, the TEMPERATURE_CONV, or the V_LAMP_CONV
conversion depending on
TEMPERATURE_CONV
Get back the temperature_result.
Start the V_LAMP_CONV conversion.
V_LAMP_CONV
Get back the v_lamp result.
ADC_OFF
V_HAVERSINE_CONV
V_BUS_CONV
g_time_waiting_since_latest_temperature_conv >=
TIME_TO_WAIT_BETWEEN_TWO_TEMPERATURE_CONV
TEMPERATURE_CONV
V_LAMP_CONV
I_LAMP_CONV
g_time_waiting_since_latest_temperature_conv.
-17
7629A–AVR–04/06

Advertisement

Table of Contents
loading

Table of Contents