Ballast Demonstrator User Guide
-15
7629A–AVR–04/06
Section 5
AT8xEB5114 Non-dimmable Software
This section of the document describes the software architecture utilizing the following
source code files and related state machines.
Main_at8xeb5114_fluo_demo.c
– ADC State Machine
Pfc_ctrl.c
– PFC State Machine
Lamp_ctrl.c
– Lamp State Machine
And their associated header files.
- main_at8xeb5114_fluo_demo.h
– Pfc_ctrl.h
– Lamp_ctrl.h
Including the following peripherals:
• TIMER0, ADC, amplifier, PWM0, and PWM1.
In order for the ballast to operate, there are two primary control systems that run simul-
taneously. The first is for the PFC control and second for the Lamp control.
Furthermore in order to work properly, the state machines require input data. This ana-
log data is provided via an auto running interrupt mode ADC state machine.
The complete software package for the application is split into the functional blocks in
the diagram shown below. While the variables are identified as follows.
• g_
global
• gv_global
volatile
• gs_
global
static
Voltage and current variables are identified by the following examples
•
g_v or g_i
global - voltage/current
•
gv_v or gv_i
global volatile - voltage/current
•
gs_v or gs_i
global static - voltage/current