English
Language : 

EVLB001 Datasheet, PDF (24/35 Pages) ATMEL Corporation – Automatic microcontroller dimmable ballast
ATPWMX Demonstrator Software
6.2.2
6.2.2.1
PFC State Machine
Global variables
Input variables
which have an
impact on PFC state
machine
• gv_lamp_preset_current which is modified in control_FBKIT.c file makes the PFC
state machine changing from PFC_OFF to INIT_PFC when the user request to
switch the lamp on.
• gv_pfc_state is set to SHUT_DOWN_PFC_AND_SLOW_DOWN_UC_SPEED state
on the control_FBKIT.c file when the user request to switch the lamp off.
6.2.2.2
Output variables
which can impact
other state
machines
• None.
6.3
6.3.1
Lamp_ctrl.c
This file executes the Lamp state machine according to the scheduler in the Main_pwmx
_fluo_demo.c file.
Lamp State Machine The different states are outlined below:
Figure 6-4. Lamp State Machine
LAMP_OFF
gv_lamp_preset_current == 0
during control_task in control_FBKIT.c
gv_pfc_state == PFC_CONTROL_LOOP
CONFIGURE_LAMP_PREHEAT
TOO_MANY_LAMP_IGNITION_TRIES
LAMP_PREHEAT
gs_lamp_ignition_tries <
LAMP_IGNITION_MAX_TRIES
g_lamp_time_multiplier >= LAMP_PREHEAT_TIME_MULTIPLIER
START_IGNITION
RESTART_PREHEAT
g_inverter_comparison_values.ontime1 <
IGNITION
INVERTER_XXX_LAMP_IGNITION_HALF_PERIOD
Get_v_lamp() < IGNITION_MAXIMUM_IGNITION_VOLTAGE
START_RUN_MODE
g_inverter_comparison_values.ontime1 >=
INVERTER_RUN_HALF_PERIOD
RUN_MODE
gv_lamp_preset_current == 0 during control_task in control_FBKIT.c
LAMP_OFF
Nothing happens, the exiting of this state takes place as soon as the gv_pfc_state is set
to PFC_CONTROL_LOOP.
ATAVRFBKIT / EVLB001 User Guide
6-22
7597B–AVR–10/07