| Electronic Components Datasheet Search |
|
RCM2000 Datasheet(PDF) 16 Page - Digi International Inc. |
|
|
|||||||||||||||||||||||||||||
RCM2000 Datasheet(HTML) 16 Page - Digi International Inc. |
|
16 / 80 page ![]() 12 RabbitCore RCM2000 3.1.1 Running Sample Program FLASHLED.C This sample program will be used to illustrate some of the functions of Dynamic C. First, open the file FLASHLED.C, which is in the SAMPLES/RCM2000 folder. The program will appear in a window, as shown in Figure 3 below (minus some comments). Use the mouse to place the cursor on the function name WrPortI in the program and type <Ctrl-H>. This will bring up a documentation box for the function WrPortI. In general, you can do this with all functions in Dynamic C libraries, including libraries you write yourself. Close the documentation box and continue. Figure 3. Sample Program FLASHLED.C To run the program FLASHLED.C, open it with the File menu (if it is not already open), then compile and run it by pressing F9 or 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 following points. • The target should be ready, which is indicated by the message “BIOS successfully com- piled...” If you did not receive this message or you get a communication error, recom- pile the BIOS by typing <Ctrl-Y> or select Recompile BIOS from the Compile menu. main(){ int j; WrPortI(SPCR,&SPCRShadow,0x84); WrPortI(PADR,&PADRShadow,0xFF); while(1) { BitWrPortI(PADR,&PADRShadow,1,1); for(j=0; j<32000; j++); BitWrPortI(PADR,&PADRShadow,0,1); for(j=0; j<25000; j++); } // end while } // end of main C programs begin with main Start a loop Time delay by counting to 32,000 End of the endless loop Note: See the Rabbit 2000 Microprocessor User’s Manual (Software Chapter) for details on the routines that read and write I/O ports. Set up Port A to output to LED DS2 and DS3 Turn LED DS3 off Turn LED DS3 on Time delay by counting to 25,000 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |