|
EVLB001 Datasheet, PDF (21/35 Pages) ATMEL Corporation – Automatic microcontroller dimmable ballast | |||
|
◁ |
ATPWMX Demonstrator Software
6.1.2
Control state
machine Global
variables
6.1.2.1
6.1.2.2
Input variables
which have an
impact on the
Control state
machine
Output variables
which can impact
other state
machines
⢠gv_lamp_on is necessary to determine whether the lamp is already on or not.
⢠g_too_many_ignition_tries can be set in lamp state machine.
⢠gv_lamp preset current is set to the wanted value and depending on the
gv_lamp_on and g_too_many_ignition_tries values, gv_lamp_state,
gv_pfc_state and gv_lamp_on can be set to the following values
LAMP_OFF, SHUT_DOWN_PFC_AND_SLOW_DOWN_UC_SPEED, and 0
or 1.
6.2 Pfc_ctrl.c
This file executes the PFC state machine according to the scheduler in the
Main_pwmx_fluo_demo.c file.
6.2.1
PFC STATE
MACHINE
The PFC state machine functional diagram is shown in Figure 6-3.
Figure 6-3. PFC State Machine
The different states are outlined below:
PFC_OFF
Nothing happens, the exit from this state is requested when the gv_lamp_preset_current
variable is modified in control_FBKIT.c file.
INIT_PFC
Nothing happens, the state machine automatically goes to next step
(INIT_PFC_HAVERSINE_CHECK) on the next pfc_task().
INIT_PFC_HAVERSINE_CHECK
Initialize the control values of the PFC.
Then jump to the HAVERSINE_CHECK state.
HAVERSINE_MEASURE
Measure the haversine peak voltage during HAVERSINE_MIN_CHECK_TIME.
Then jump to the HAVERSINE_CHECK state.
6-19
7597BâAVRâ10/07
ATAVRFBKIT / EVLB001 User Guide
|
▷ |