background image

C8051F35x-DK

4

Rev. 0.3

5.  Example Source Code

Example source code and register definition files are provided in the “

SiLabs\MCU\Examples\C8051F35x

” 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 

C8051F350.inc and C8051F350.h 

define all SFR registers and bit-addressable control/

status bits. They are installed into the “

SiLabs\MCU\Examples\C8051F35x

” directory during IDE installation. The

register and bit names are identical to those used in the C8051F35x 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.  Blinking LED Example

The example source files 

blink.asm

 and 

blinky.c

 show examples of several basic C8051F35x 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 C8051F350 target board about five times a second using the interrupt handler
with a C8051F350 timer. 

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Summary of Contents for C8051F35 Series

Page 1: ...ter as shown in Figure 1 1 Connect the USB Debug Adapter to the DEBUG connector on the target board with the 10 pin ribbon cable 2 Connect one end of the USB cable to the USB connector on the USB Debug Adapter 3 Connect the other end of the USB cable to a USB Port on the PC 4 Connect the ac dc power adapter to power jack P1 on the target board Notes Use the Reset button in the IDE to reset the tar...

Page 2: ...during IDE installation The evaluation version of the C51 compiler is the same as the full professional version except code size is limited to 4 kB and the floating point library is not included The C51 compiler reference manual can be found under the Help menu in the IDE or in the SiLabs MCU hlp directory C51 pdf 4 4 Using the Keil Software 8051 Tools with the Silicon Laboratories IDE To perform ...

Page 3: ...oolbar or selecting Project Build Make Project from the menu Note After the project has been built the first time the Build Make Project command will only build the files that have been changed since the previous build To rebuild all files and project dependencies click on the Rebuild All button in the toolbar or select Project Rebuild All from the menu 2 Before connecting to the target device sev...

Page 4: ...ed in the C8051F35x 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 Blinking LED Example The example source files blink asm and blinky c show exampl...

Page 5: ...per Block J4 DEBUG connector for Debug Adapter interface J5 DB 9 connector for UART0 RS232 interface J6 Analog I O terminal block J7 Connector for IDAC0 voltage circuit J8 USB Debug Adapter target board power connector J9 J10 External crystal enable connectors J11 Connector for IDAC1 voltage circuit J12 Connector block for Thermistor circuitry J13 J14 ADC external voltage reference connectors Figu...

Page 6: ... oscillators 6 2 Switches and LEDs Two switches are provided on the target board Switch SW1 is connected to the RESET pin of the C8051F350 Pressing SW1 puts the device into its hardware reset state Switch SW2 is connected to the C8051F350 s general purpose I O GPIO pin through headers Pressing SW2 generates a logic low signal on the port pin Remove the shorting block from the jumper to disconnect ...

Page 7: ...rcuit and DB 9 J5 connector are provided on the target board to facilitate serial connec tions to UART0 of the C8051F350 The TX RX RTS and CTS signals of UART0 may be connected to the DB 9 connector and transceiver by installing shorting blocks on header J3 J3 7 8 Install shorting block to connect UART0 TX P0 4 to transceiver J3 9 10 Install shorting block to connect UART0 RX P0 5 to transceiver J...

Page 8: ...ted with either the EC1 or EC2 Serial Adapters 6 9 Thermistor Connector Block J12 A thermistor circuit is included on the board which allows for a ratiometric measurement of the included thermistor To use the circuit remove the shorting blocks on the IDAC headers J7 J11 and the External Voltage Reference headers J13 J14 Next connect all of the signals on the thermistor connector block J12 Software...

Page 9: ...C8051F35x DK Rev 0 3 9 7 Schematics Figure 3 C8051F350 Target Board Schematic Page 1 Downloaded from Elcodis com electronic components distributor ...

Page 10: ...C8051F35x DK 10 Rev 0 3 Figure 4 C8051F350 Target Board Schematic Page 2 Downloaded from Elcodis com electronic components distributor ...

Page 11: ...jumper to header EC2 Serial Adapter section added EC2 to the section title table title and figure title EC2 Serial Adapter section changed JTAG to DEBUG Added USB Debug Adapter section Section 7 J8 changed Serial Adapter to USB Debug Adapter DEBUG Connector Pin Descriptions Table changed pin 10 to USB Power USB Debug Adapter Target Board Power Connector J8 Section changed Serial to USB Debug Revis...

Page 12: ...bed features or parameters Silicon Laboratories reserves the right to make changes without further notice Silicon Laboratories makes no warranty rep resentation or guarantee regarding the suitability of its products for any particular purpose nor does Silicon Laboratories assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all lia...

Reviews: