background image

C8051F04x-DK

Rev. 0.4

3

4.4.1. Creating a New Project

1. Select 

Project->New Project

 to open a new project and reset all configuration settings to default.

2. Select 

File->New File

 to open an editor window. Create your source file(s) and save the file(s) with a rec-

ognized extension, such as .c, .h, or .asm, to enable color syntax highlighting.

3. Right-click on “New Project” in the 

Project Window

. Select 

Add files to project

. Select files in the file

browser and click Open. Continue adding files until all project files have been added.

4. For each of the files in the 

Project

 

Window

 that you want assembled, compiled and linked into the target

build, right-click on the file name and select 

Add file to build

. Each file will be assembled or compiled as

appropriate (based on file extension) and linked into the build of the absolute object file.

Note: If a project contains a large number of files, the “Group” feature of the IDE can be used to organize. 
Right-click on “New Project” in the 

Project Window

. Select 

Add Groups to project

. Add pre-defined 

groups or add customized groups. Right-click on the group name and choose 

Add file to group

. Select files 

to be added. Continue adding files until all project files have been added.

4.4.2. Building and Downloading the Program for Debugging

1. Once all source files have been added to the target build, build the project by clicking on the 

Build/Make

Project 

button in the toolbar 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. C8051F04x family devices use the JTAG debug interface. You must select 

JTAG 

in the 

Options->Debug

Interface

 menu to enable connection to C8051F04x target devices. Click the 

Connect

 button in the toolbar or

select 

Debug->Connect

 from the menu to connect to the device. 

3. Download the project to the target by clicking the 

Download

 

Code

 button in the toolbar.

Note: To enable automatic downloading if the program build is successful select 

Enable automatic con-

nect/download after build

 in the 

Project->Target Build Configuration

 dialog. If errors occur during the 

build process, the IDE will not attempt the download.

4. Save the project when finished with the debug session to preserve the current target build configuration,

editor settings and the location of all open debug views. To save the project, select 

Project->Save Project

As...

 from the menu. Create a new name for the project and click on 

Save

.

Summary of Contents for C8051F04 DK Series

Page 1: ...e Quick start Guide C8051F04x Development Kit User s Guide this document 2 Hardware Setup The target board is connected to a PC running the Silicon Laboratories IDE via the Serial Adapter as shown in Figure 1 1 Connect one end of the RS232 serial cable to a Serial COM Port on the PC 2 Connect the other end of the RS232 serial cable to the DB 9 connector on the Serial Adapter 3 Connect the Serial A...

Page 2: ... with the development kit and is installed 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 wi...

Page 3: ...d Downloading the Program for Debugging 1 Once all source files have been added to the target build build the project by clicking on the Build Make Project button in the toolbar 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...

Page 4: ...ted in Silicon Laboratories C8051F04x data sheet An example CAN application is included in the Examples C8051F04x directory Each C8051F040 target board fea tures a push button labeled P3 7 and a LED labeled P1 6 After the two target boards are connected together via the provided CAN bus physical layer i e cable connectors and CAN transceiver the example application sends CAN messages between the t...

Page 5: ...0 the device turns off its LED by setting P1 6 low You may run the example with the EC2 connected to view CAN registers and CAN message objects in CAN RAM While connected to one target board run the code Depress the RESET button on the other target board You may use debug and view features of the Silicon Laboratories IDE and on chip debug logic To view the CAN SFRs click View Debug Windows SFRs CA...

Page 6: ...pin J3 Connects LED D3 to P1 6 pin J4 JTAG connector for Serial Adapter interface J5 DB 9 connector for UART0 RS232 interface J6 Jumper to connect UART0 TX P0 0 to DB9 J9 Jumper to connect UART0 RX P0 1 to DB9 J11 Analog loopback connector J12 J19 Port 0 7 connectors J20 Analog I O terminal block J22 VREF connector J23 VDD Monitor Disable J24 96 pin Expansion I O connector J25 DB 9 connector for C...

Page 7: ...e shorting block from the jumper to disconnect SW2 from the port pins The port pin signal is also routed to a pin on the J24 I O connector See Table 1 for the port pins and jumpers corresponding to each switch Two LEDs are also provided on the target board The red LED labeled PWR is used to indicate a power connection to the target board The green LED labeled with a port pin name is connected to t...

Page 8: ...ansceiver J10 Install shorting block to connect UART0 CTS P4 1 to transceiver 6 5 Analog I O J11 J20 Several C8051F040 analog signals are routed to the J20 terminal block and the J11 jumper block Jumper block J11 provides the ability to connect DAC0 and DAC1 outputs to several different analog inputs by installing a short ing block between a DAC output and an analog input on adjacent pins of J11 R...

Page 9: ... being routed to the 96 pin expansion connector each of the eight parallel ports of the C8051F040 has its own 10 pin header connector Each connector provides a pin for the corresponding port pins 0 7 3 3VDC and digital ground Table 6 defines the pins for the port connectors The same pin out order is used for all of the port connectors 6 8 VDD Monitor Disable Jumper J23 The VDD Monitor of the C8051...

Page 10: ...l Gnd C 1 XTAL1 A 2 MONEN B 2 P1 7 C 2 P1 6 A 3 P1 5 B 3 P1 4 C 3 P1 3 A 4 P1 2 B 4 P1 1 C 4 P1 0 A 5 P2 7 B 5 P2 6 C 5 P2 5 A 6 P2 4 B 6 P2 3 C 6 P2 2 A 7 P2 1 B 7 P2 0 C 7 P3 7 A 8 P3 6 B 8 P3 5 C 8 P3 4 A 9 P3 3 B 9 P3 2 C 9 P3 1 A 10 P3 0 B 10 P0 7 C 10 P0 6 A 11 P0 5 B 11 P0 4 C 11 P0 3 A 12 P0 2 B 12 P0 1 C 12 P0 0 A 13 P7 7 B 13 P7 6 C 13 P7 5 A 14 P7 4 B 14 P7 3 C 14 P7 2 A 15 P7 1 B 15 P7...

Page 11: ...r supports both Silicon Laboratories JTAG and C2 debug interfaces All Serial Adapters may be powered from the target board but the EC1 and EC2 Serial Adapter units cannot provide power to the target board Table 8 shows the pin definitions for the Serial Adapter s JTAG connector Notes 1 When powering the Serial Adapter via the JTAG connector the input voltage to the JTAG connector s power pin must ...

Page 12: ...C8051F04x DK 12 Rev 0 4 8 Schematic Figure 6 C8051F040 Target Board Schematic ...

Page 13: ...C8051F04x DK Rev 0 4 13 Notes ...

Page 14: ...y for the functioning of undescribed 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 speci...

Reviews: