C8051T620/2-DK
6. Example Source Code
Example
source
code
and
register
definition
files
are
provided
by
default
in
the
SiLabs\MCU\Examples\C8051T620_1_T320_3 or SiLabs\MCU\Examples\C8051T622_3_T326_7 directory during
IDE installation. These files may be used as a template for code development.
6.1. Register Definition Files
Register
definition
files
C8051T620.inc,
C8051T622.inc,
C8051T620_defs.h,
C8051T622_defs.h,
and
compiler_defs.h define all SFR registers and bit-addressable control/status bits. They are installed by default into
the SiLabs\MCU\Examples\C8051T620_1_T320_3 or SiLabs\MCU\Examples\C8051T622_3_T326_7 directory
during IDE installation. The register and bit names are identical to those used in the C8051T620-21_T320-3 or
C8051T620-23_T326-27 data sheet.
6.2. Blinking LED Example
The example source files T620_Blinky.asm and T620_Blinky.c or T622_Blinky.asm and T622_Blinky.c show
examples of several basic C8051T62x 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, these programs flash the green LED on the C8051T62x
Motherboard about five times a second using the interrupt handler with a timer.
Rev. 0.4
7
Need help?
Do you have a question about the C8051T620/2-DK and is the answer not in the manual?
Questions and answers