background image

Getting Started

25

You can set break points while the program is running by positioning the cursor to a state-
ment and using the 

F2

 key. If the execution thread hits the break point, a break point will 

take place.You can toggle the break point off with the 

F2

 key and continue execution with 

the 

F9

 key. Try this a few times to get the feel of things.

4.3.3  Editing the Program

Click on the 

Edit

 box on the task bar. This will set Dynamic C into the edit mode so that 

you can change the program. Use the 

Save as

 choice on the 

File

 menu to save the file 

with a new name so as not to change the demo program. Save the file as 

MYTEST.C

. Now 

change the number 25000 in the 

for (..

 

statement to 10000. Then use the 

F9

 key to 

recompile and run the program. The LED will start flashing, but it will flash much faster 
than before because you have changed the loop counter terminal value from 25000 to 
10000.

4.3.4  Watching Variables Dynamically

Go back to edit mode (select edit) and load the program 

FLASHLED2.C

 using the 

File

 

menu 

Open

 command. This program is the same as the first program, except that a vari-

able 

k

 has been added along with a statement to increment 

k

 each time around the endless 

loop. The statement:

runwatch();

has been added. This is a debugging statement that makes it possible to view variables 
while the program is running.

Use the 

F9

 key to compile and run 

FLASHLED2.C

. Now type 

<Ctrl-W>

 to open the watch 

window and add the watch expression 

k

 to the top of the list of watch expressions. Now 

type 

<Ctrl-U>

. Each time you type 

<Ctrl-U>

, you will see the current value of 

k

, which is 

incrementing about 5 times a second.

As an experiment, add another expression to the watch window: 

k*5

Then type 

<ctrl-U>

 several times to observe the watch expressions 

k

 and 

k*5

.

4.3.5  Summary of Features

So far you have practiced using the following features of Dynamic C.

Loading, compiling and running a program. When you load a program it appears in an 
edit window. You can compile by selecting 

Compile

 on the task bar or from the 

Com-

pile

 menu. When you compile the program, it is compiled into machine language and 

downloaded to the target over the serial port. The execution proceeds to the first state-
ment of main where it pauses, waiting for you to command the program to run, which 
you can do with the 

F9

 key or by selecting

 

Run

 on the 

Run

 menu. If want to compile 

and start the program running with one keystroke, use 

F9

, the run command. If the pro-

gram is not already compiled, the run command will compile it first.

Single-stepping. This is done with the 

F8

 key. The 

F7

 key can also be used for single-

stepping. If the 

F7

 key is used, then descent into subroutines will take place. With the 

Summary of Contents for RCM2000

Page 1: ...RabbitCore RCM2000 C Programmable Module Getting Started Manual 019 0080 040515 F This datasheet has been downloaded from http www digchip com at this page...

Page 2: ...402 www rabbitsemiconductor com RabbitCore RCM2000 Getting Started Manual Part Number 019 0080 040515 F Printed in U S A 2001 2004 Z World Inc All rights reserved Z World reserves the right to make ch...

Page 3: ...amic C 13 3 1 An Overview of Dynamic C 13 3 2 System Requirements 14 3 2 1 Hardware Requirements 14 3 3 Installing Dynamic C 15 3 3 1 Program Documentation File Location 15 3 3 2 Installation Type 16...

Page 4: ...RabbitCore RCM2000...

Page 5: ...To accommodate a variety of user and production needs the RCM2000 family includes versions with varying amounts of onboard memory All modules within the family are pin for pin compatible and may be i...

Page 6: ...ow Figure 1 RCM2000 Connector Pinout Table 2 RCM2000 Specifications Specification Data Power Supply 4 75 5 25 V DC 120 mA at 25 8048 MHz clock speed Size 1 90 2 30 0 55 inches 48 3 58 4 14 mm Environm...

Page 7: ...p ment environment with integrated editor compiler and source level debugger It interfaces directly with the target system eliminating the need for complex and unreliable in circuit emulators Dynamic...

Page 8: ...and Adobe PDF format Some advanced users may choose to skip the rest of this introductory manual and proceed directly with the detailed hardware and software information in the User s Manual TIP We r...

Page 9: ...n the Dynamic C installation folder The latest versions of all documents are always available for free unregistered download from our Web sites as well Printing Electronic Manuals We recognize that ma...

Page 10: ...6 RabbitCore RCM2000...

Page 11: ...setup 2 1 Development Kit Contents The RCM2000 series Development Kit contains the following items RCM2020 module with 256K flash memory and 128K SRAM RCM2000 Prototyping Board with accessory hardwar...

Page 12: ...ging the RCM2000 itself The Prototyping Board is shown in Figure 2 below with its main features identified Figure 2 RCM2000 Prototyping Board J2 J1 C1 J4 U1 J5 S2 S3 S1 RN1 D2 JP1 DS3 DS2 DS1 C2 U2 C3...

Page 13: ...5 PA7 PB1 PB3 PB5 PB7 GND D6 GND PA0 PA2 PA4 PA6 PB0 PB2 PB4 PB6 D7 PCLK RCM2000 PROTOTYPING BOARD D4 D2 D0 PE6 PE4 PE2 PE0 IOR WDO A11 A9 A7 A5 A3 A1 STAT PC1 PC3 PC5 PC7 PD1 PD3 PD5 PD7 VCC VRAM SM1...

Page 14: ...J5 S2 S3 S1 RN1 D2 JP1 DS3 DS2 DS1 C2 U2 C3 C4 C5 J6 C6 VCC PA1 PA3 PA5 PA7 PB1 PB3 PB5 PB7 GND D6 GND PA0 PA2 PA4 PA6 PB0 PB2 PB4 PB6 D7 PCLK RCM2000 PROTOTYPING BOARD D4 D2 D0 PE6 PE4 PE2 PE0 IOR W...

Page 15: ...hardware and software components A documentation icon should have been installed on your workstation s desktop click on it to reach the documentation menu You can create a new desktop icon that points...

Page 16: ...12 RabbitCore RCM2000...

Page 17: ...opment and debug ging take place seamlessly across this connection greatly speeding system development Other features of Dynamic C include Dynamic C has an easy to use built in text editor Programs ca...

Page 18: ...to memory Functions and libraries are compiled and linked and downloaded on the fly On a fast PC Dynamic C can load 30 000 bytes of code in 5 seconds at a baud rate of 115 200 bps 3 2 System Requireme...

Page 19: ...covered in this section Selected steps that may be confusing to some users are outlined below Some of the installation utility screens may vary slightly from those shown 3 3 1 Program Documentation F...

Page 20: ...installed to save hard drive space or installed elsewhere on a separate or net work drive for example The installation type is selected in the installation menu shown above The options are Typical Ins...

Page 21: ...le select COM1 This selection can be changed later within Dynamic C NOTE The installation utility does not check the selected COM port in any way Speci fying a port in use by another device mouse mode...

Page 22: ...otyping Board is lit If it is check both ends of the programming cable to ensure that it is firmly plugged into the PC and the RCM2000 s programming port If you are using the Prototyping Board ensure...

Page 23: ...TBIOS C which can be found in the BIOS directory 2 Change the line define USE115KBAUD 1 set to 0 to use 57600 baud to read as follows define USE115KBAUD 0 set to 0 to use 57600 baud 3 Save the changes...

Page 24: ...20 RabbitCore RCM2000...

Page 25: ...1 Sample Program Overview Dynamic C comes with a large number of sample programs that illustrate many of its fea tures These programs are intended to serve as tutorials but then can also be used as s...

Page 26: ...ut to the STDIO window The COREMODULE folder provides sample programs specific to the RCM2000 Let s take a look at the COREMODULE folder Each sample program has comments that describe the purpose and...

Page 27: ...n it by selecting Run in the Run menu The LED on the Prototyping Board should start flashing if everything went well If this doesn t work review the follow ing points The target should be ready which...

Page 28: ...d the cursor will advance one statement When you get to the for j 0 j statement it becomes impractical to single step further because you would have to press F8 thousands of times We will use this sta...

Page 29: ...s a debugging statement that makes it possible to view variables while the program is running Use the F9 key to compile and run FLASHLED2 C Now type Ctrl W to open the watch window and add the watch e...

Page 30: ...that is frequently executed In this case only expressions involving global variables can be evaluated and the expression is evaluated as if it were in a separate function with no local variables 4 4 C...

Page 31: ...dy way to describe a style of real time programming in which most operations are done in one loop The costatement is executed on each pass through the big loop When a waitfor or a wfd condition is enc...

Page 32: ...be shared between different tasks without having to take elaborate precautions Sharing variables between tasks is the greatest cause of bugs in programs that use preemptive multitasking It might seem...

Page 33: ...perfect Bugs are always present in a system of any size In order to prevent danger to life or property it is the responsibility of the system designer to incorporate redundant protective mechanisms ap...

Page 34: ...30 RabbitCore RCM2000...

Page 35: ...rams 21 break point 24 editing a program 25 single stepping 24 watch expressions 24 starting 18 watch expressions 13 F features Prototyping Board 8 RCM2000 1 H hardware connections 9 install RCM2000 o...

Page 36: ...User s Manual 32...

Page 37: ...099 pdf 090 0128 Programming Cable Schematic www rabbitsemiconductor com documentation schemat 090 0128 pdf The schematics included with the printed manual were the latest revisions available at the t...

Page 38: ......

Reviews: