C8051F326/7-DK
5. Example Source Code
Example source code and register definition files are provided in the "SiLabs\MCU\Examples\C8051F326_7\" direc-
tory during IDE installation. These files may be used as a template for code development. Example applications
include a blinking LED example which configures the green LED on the target board to blink at a fixed rate.
5.1. Register Definition Files
Register definition files C8051F326.inc and C8051F326.h define all SFR registers and bit-addressable control/
status bits. They are installed into the "SiLabs\MCU\Examples\C8051F326_7\" directory during IDE installation.
The register and bit names are identical to those used in the C8051F326/7 datasheet. Both register definition files
are also installed in the default search path used by the Keil Software 8051 tools. Therefore, when using the Keil
8051 tools included with the development kit (A51, C51), it is not necessary to copy a register definition file to each
project's file directory.
5.2. Blinking LED Example
The example source files blink.asm and blinky.c show examples of several basic C8051F326/7 functions. These
include: configuring a timer for an interrupt routine, initializing the system clock, and configuring a GPIO port. When
compiled/assembled and linked this program flashes the green LED on the C8051F326 target board about five
times a second using the interrupt handler with a C8051F326 timer.
4
Rev. 0.2
Need help?
Do you have a question about the C8051F326-DK and is the answer not in the manual?
Questions and answers