C8051F530A-DK
Rev. 0.3
7
6. Example Source Code
Example source code and register definition files are provided in the “
SiLabs\MCU\Examples\C8051F52xA_53xA
”
directory 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.
6.1. Register Definition Files
Register definition files
C8051F520A.inc
and
C8051F520A_defs.h
define all SFR registers and bit-addressable
control/status bits. A macro definition header file
compiler_defs.h
is also included and is required to be able to use
the
C8051F520A_defs.h
header file with various tool chains. These files are installed by default into the
“
SiLabs\MCU\Examples\C8051F52xA_53xA\Header_Files
” directory during IDE installation. The register and bit
names are identical to those used in the C8051F52x/52xA/53x/53xA data sheet. The 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.
6.2. Blinking LED Example
The example source files
F530A_Blinky.asm
and
F530A_Blinky.c
installed in the default directory
“
SiLabs\MCU\Examples\C8051F52xA_53xA\Blinky
” show examples of several basic C8051F52xA-53xA functions.
These include disabling the watchdog timer (WDT), configuring the Port I/O crossbar, 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 C8051F530A Target Board associated with the microcontroller about
five times a second using the interrupt handler with a C8051F530A timer.
Summary of Contents for C8051F530A
Page 13: ...C8051F530A DK Rev 0 3 13 8 Schematics Figure 4 C8051F530A Target Board Schematic 1 of 3 ...
Page 14: ...C8051F530A DK 14 Rev 0 3 Figure 5 C8051F530A Target Board Schematic 2 of 3 ...
Page 15: ...C8051F530A DK Rev 0 3 15 Figure 6 C8051F530A Target Board Schematic 3 of 3 ...