DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

C8051F120DK データシートの表示(PDF) - Silicon Laboratories

部品番号
コンポーネント説明
メーカー
C8051F120DK
Silabs
Silicon Laboratories Silabs
C8051F120DK Datasheet PDF : 13 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
C8051F12x-DK
5. Example Source Code
Example source code and register definition files are provided in the “SiLabs\MCU\Examples\C8051F12x” 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.
5.1. Register Definition Files
Register definition files C8051F120.inc and C8051F120.h define all SFR registers and bit-addressable control/
status bits. They are installed into the “SiLabs\MCU\Examples\C8051F12x” directory during IDE installation. The
register and bit names are identical to those used in the C8051F12x data sheet. 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. Code Banking Files
In order to utilize code banking in a project there are two files that will need to be changed. You can either custom
edit L51_bank.a51 and startup.a51 or use the copies installed into the “IDEfiles\C51\Lib” directory during IDE
installation. Both of these files MUST be added to your project and linked with your project in order for code bank-
ing to function properly. For more information on code banking, please see Application Note AN130 - Code Bank-
ing Using the Keil 8051 Tools.
5.3. Blinking LED Example
The example source files blink.asm and blinky.c show examples of several basic C8051F12x 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 pro-
gram flashes the green LED on the C8051F120 target board about five times a second using the interrupt handler
with a C8051F120 timer.
4
Rev. 0.7

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]