English
Language : 

EVLB001 Datasheet, PDF (18/35 Pages) ATMEL Corporation – Automatic microcontroller dimmable ballast
Section 6
ATPWMX Demonstrator Software
This section of the application note describes the software architecture utilizing the fol-
lowing source code files and related state machines:
Main_fbkit.c
Initialisation of peripherals (Ports, ADC, timer...).
Clock pfc and lamp task each 200uS and let control task operating during free time.
Pfc_fbkit.c
PFC State Machine: executed each mS at low speed (1MHZ when the microller has
not yet been speeded up), and each 200uS at nominal speed (8MHz).
Lamp_fbkit.c
Lamp State Machine: executed each 200uS.
Control_fbkit.c
Control State Machine: executed during CPU free time.
Associated header files:
• Main_fbkit.h
• Pfc_fbkit.h
• Lamp_fbkit.h
• Control_fbkit.h
The software uses the following peripherals:
• TIMER0, ADC, amplifier, Comparator0, PSC0, PSC2, PLL, DALI via
EUSART
The application has been designed to work either with the AT90PWM2B/216 or 3B.
ATAVRFBKIT / EVLB001 User Guide
6-16
7597B–AVR–10/07