background image

RabbitCore RCM2100

C-Programmable Module with Ethernet

Getting Started Manual

019–0093

050505–F

Содержание RabbitCore RCM2100 Series

Страница 1: ...RabbitCore RCM2100 C Programmable Module with Ethernet Getting Started Manual 019 0093 050505 F ...

Страница 2: ...ctor com RabbitCore RCM2100 Getting Started Manual Part Number 019 0093 050505 F Printed in U S A 2001 2005 Z World Inc All rights reserved Z World reserves the right to make changes and improvements to its products without providing notice Trademarks Rabbit is a registered trademark of Rabbit Semiconductor Rabbit 2000 and RabbitCore are trademarks of Rabbit Semiconductor Z World is a registered t...

Страница 3: ...uct Information 5 1 3 2 Additional Reference Information 5 1 3 3 Using Online Documentation 5 Chapter 2 Getting Started 7 2 1 Development Kit Contents 7 2 2 Overview of the Prototyping Board 8 2 2 1 Prototyping Board Features 9 2 2 2 Prototyping Board Expansion 10 2 3 Connections 11 2 3 1 Attach Module to Prototyping Board 12 2 3 2 Connect Programming Cable 13 2 3 3 Connect Power 14 2 4 Run a Samp...

Страница 4: ...P Primer on IP Addresses 33 4 3 IP Addresses Explained 35 4 4 How IP Addresses are Used 36 4 5 Dynamically Assigned Internet Addresses 37 4 6 Placing Your Device on the Network 38 4 7 Running TCP IP Sample Programs 39 4 8 How to Set IP Addresses in the Sample Programs 40 4 9 How to Set Up your Computer s IP Address for Direct Connect 41 4 10 Run the PINGME C Sample Program 42 4 11 Running More Sam...

Страница 5: ...he RCM2100 family includes versions with varying amounts of onboard memory Models with and without the Ethernet port are available to permit simultaneous development of Ethernet capable and cheaper non Ethernet versions of production systems All modules within the family are pin for pin compatible and may be installed or swapped in a matter of minutes 1 1 RCM2100 Description There are four product...

Страница 6: ...i ties without the integrated Ethernet port two standard versions of the module are available without the Ethernet hardware RCM2120 The RCM2120 is equipped with 512K flash memory and 512K static RAM but does not include the Ethernet port hardware In its place ports D and E of the Rabbit 2000 microprocessor are enabled giving this module 40 I O pins RCM2130 The RCM2130 is identical to the RCM2120 e...

Страница 7: ...00 Pinout GND PA7 PA5 PA3 PA1 BA12 BA10 BA8 BA6 BA4 BA2 BA0 PC1 PC3 PC5 PC7 RXA PD1 PD3 PD5 PD7 VCC PCLK PA6 PA4 PA2 PA0 BA11 BA9 BA7 BA5 BA3 BA1 PC0 PC2 PC4 PC6 TXA PD0 PD2 PD4 PD6 J1 PB0 PB2 PB4 PB6 GND BD6 BD4 BD2 BD0 PE6 PE4 PE2 PE0 VCC VRAM SMODE1 RES_OUT STATUS BIORD GND PB1 CLKA PB3 PB5 PB7 BD7 BD5 BD3 BD1 PE7 PE5 PE3 PE1 GND VBAT WDO SMODE0 RES_IN BIOWR BBUFEN VCC J2 Note These pinouts are...

Страница 8: ...It interfaces directly with the target system eliminating the need for complex and unreliable in circuit emulators Dynamic C must be installed on a Windows workstation with at least one free serial COM port for communication with the target system See Chapter 3 Software Installa tion Overview for complete information on installing Dynamic C NOTE The RCM2100 modules require Dynamic C v7 04 or later...

Страница 9: ...onal Reference Information In addition to the product specific information contained in the RabbitCore RCM2100 User s Manual several higher level reference manuals are provided in HTML and PDF form on the accompanying CD ROM Advanced users will find these references valuable in developing systems based on the RCM2100 modules Dynamic C User s Manual An Introduction to TCP IP Dynamic C TCP IP User s...

Страница 10: ...e 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 many users prefer printed manuals for some uses Users can easily print all or parts of those manuals provided in electronic form The following guidelines may be helpful Print from the Adobe PDF versions of ...

Страница 11: ...t setup 2 1 Development Kit Contents The RCM2100 Development Kit contains the following items RCM2100 module with Ethernet port 512K flash memory and 512K SRAM RCM2100 Prototyping Board with accessory hardware and components Wall transformer power supply 12 V DC 1 A Included only with Development Kits sold for the North American market Overseas users will have to substitute a power supply compatib...

Страница 12: ... evaluation and development the Prototyping Board can be used without modification As you progress to more sophisticated experimentation and hardware development modi fications and additions can be made to the board without modifying or damaging the RCM2100 module itself The Prototyping Board is shown in Figure 2 below with its main features identified Figure 2 RCM2100 Prototyping Board RCM2100 Co...

Страница 13: ...ch is connected directly to the RCM2100 s RES_IN pin Pressing the switch forces a hardware reset of the system I O Switches LEDs Two momentary contact normally open switches are connected to the PB2 and PB3 pins of the RCM2100 module and may be read as inputs by sample applications Two LEDs are connected to the PA0 and PA1 pins of the module and may be driven as output indicators by sample applica...

Страница 14: ...ce is recommended for U2 Refer to the Prototyping Board schematic for additional details A 10 pin 0 1 spacing header strip can be installed at J6 to permit connection of a ribbon cable leading to a standard DE 9 serial connector NOTE The RS 232 chip capacitors and header strip are available from electronics dis tributors such as Digi Key and Mouser Electronics Additional LEDs Two additional LEDs s...

Страница 15: ...nnecting the Prototyping Board for use with Dynamic C and the sample programs 1 Attach the RCM2100 module to the Prototyping Board 2 Connect the programming cable between the RCM2100 module and the workstation PC 3 Connect the power supply to the Prototyping Board ...

Страница 16: ...00 Module on the Prototyping Board Note the orientation of the module NOTE It is important that you line up the RCM2100 pins on headers J1 and J2 exactly with the corresponding pins of header sockets J1 and J3 on the Prototyping Board The header pins may become bent or damaged if the pin alignment is offset and the module will not work Press the module s pins firmly into the Prototyping Board head...

Страница 17: ... a normal serial connection Figure 6 Attaching Programming Cable to the RCM2100 NOTE The stripe on the cable is towards pin 1 of the header J5 Connect the other end of the programming cable to a COM port on your PC Make a note of the port to which you connect the cable as Dynamic C needs to have this parameter configured when it is installed NOTE COM 1 is the default port used by Dynamic C NOTE So...

Страница 18: ...pply Connections to Prototyping Board Plug in the wall transformer The power LED on the Prototyping Board should light up The RCM2100 and the Prototyping Board are now ready to be used NOTE A RESET button is provided on the Prototyping Board to allow hardware reset without disconnecting power To power down the Prototyping Board unplug the power connector from J5 You should disconnect power before ...

Страница 19: ...ons dialog in the Dynamic C Options Project Options Communications menu Select a slower Max download baud rate If a program compiles and loads but then loses target communication before you can begin debugging it is possible that your PC cannot handle the default debugging baud rate Try lowering the debugging baud rate as follows Locate the Serial Options dialog in the Dynamic C Options Project Op...

Страница 20: ...eate a new desktop icon that points to default htm in the docs folder in the Dynamic C installation folder 3 For advanced development topics refer to the Dynamic C User s Manual and the Dynamic C TCP IP User s Manual also in the online documentation set 2 5 1 Technical Support NOTE If you purchased your RCM2100 through a distributor or through a Z World or Rabbit Semiconductor partner contact the ...

Страница 21: ...luded on the RCM2100 The flash memory and SRAM options are selected with the Options Project Options Compiler menu The advantage of working in RAM is to save wear on the flash memory which is limited to about 100 000 write cycles The disadvantage is that the code and data might not both fit in RAM NOTE An application can be developed in RAM but cannot run standalone from RAM after the programming ...

Страница 22: ...ard debugging features X Breakpoints Set breakpoints that can disable interrupts X Single stepping Step into or over functions at a source or machine code level µC OS II aware X Code disassembly The disassembly window displays addresses opcodes mnemonics and machine cycle times Switch between debugging at machine code level and source code level by simply opening or closing the disassembly window ...

Страница 23: ...ons are Typical Installation Both Dynamic C and the documentation library will be installed in the specified folder default Compact Installation Only Dynamic C will be installed Custom Installation You will be allowed to choose which components are installed This choice is useful to install or reinstall just the documentation 3 2 1 Early Versions of Dynamic C If you are using Dynamic C version 7 0...

Страница 24: ...NOTE It is assumed in this section that you have at least an elementary grasp of ANSI C If you do not see the introductory pages of the Dynamic C User s Manual for a sug gested reading list Each sample program has comments that describe the purpose and function of the program Before running any of these sample programs make sure that your RCM2100 is connected to the Prototyping Board and to your P...

Страница 25: ...n this sample program FLASHLED C repeatedly flashes LED DS3 on the Prototyping Board on and off LED DS3 is controlled by Parallel Port A bit 1 PA1 FLASHLED2 C repeatedly flashes LED DS3 on the Prototyping Board on and off LED DS3 is controlled by Parallel Port A bit 1 PA1 This sample program also shows the use of the runwatch function to allow Dynamic C to update watch expressions while running Th...

Страница 26: ...arallel Ports B C and D PB0 Keypad Col 0 PC1 Keypad Col 1 PB2 Keypad Col 2 PB3 Keypad Col 3 PB4 Keypad Col 4 PB5 Keypad Col 5 PD1 Keypad Row 0 PD2 Keypad Row 1 Connect the LCD to Parallel Port A PA0 backlight if connected PA1 LCD CS PA2 LCD RS High Control Low Data LCD Contrast 0 PA3 LCD WR LCD Contrast 1 PA4 LCD D4 LCD Contrast 2 PA5 LCD D5 LCD Contrast 3 PA6 LCD D6 LCD Contrast 4 PA7 LCD D7 LCD ...

Страница 27: ...Port A bit 1 LED DS3 Parallel Port B bit 2 switch S2 Parallel Port B bit 3 switch S3 TOGGLELED C demonstrates the use of costatements to detect switch presses using the press and release method of debouncing As soon as the sample program starts run ning LED DS3 on the Prototyping Board which is controlled by PA1 starts flashing once per second Press switch S2 on the Prototyping Board which is conn...

Страница 28: ...to set up flow control lines CORE_PARITY C This program demonstrates the use of parity modes by repeatedly sending byte values 0 127 from Serial Port B to Serial Port C The program will switch between generating parity or not on Serial Port B Serial Port C will always be checking parity so parity errors should occur during every other sequence To set up the Prototyping Board you will need to tie P...

Страница 29: ...es are as follows RS485 to RS485 RS485 to RS485 GND to GND MASTER2 C This program demonstrates a simple RS 485 transmission of lower case letters to a slave RCM2100 The slave will send back converted upper case letters back to the master RCM2100 and display them in the STDIO window Use SLAVE2 C to program the slave RCM2100 SLAVE2 C This program demonstrates a simple RS 485 transmission of lower ca...

Страница 30: ...arts an endless loop with a for expression and within that loop Writes a bit to turn bit 1 off lighting LED DS3 Waits through a delay loop Writes a bit to turn bit 1 on turning off the LED Waits through a second delay loop These steps repeat as long as the program is allowed to run You can change the flash rate of the LED by adjusting the loop values in the two for expressions The first loop contr...

Страница 31: ...o be flashed the on time in millisec onds and the off time in milliseconds are passed as arguments This function uses an end less for loop to call the ledon and ledoff functions separated by calls to the wait function DelayMs This sequence will make the indicated LED flash on and off As is proper in C program design the contents of main are almost trivial The program first calls initialize_ports t...

Страница 32: ...ferent flash timing It also uses the library function DelayMs to deliver more accurate timing than the simple delay loops of the previous program The second costatement does more than check the status of S2 Switch contacts often bounce open and closed several times when the switch is actuated and each bounce can be interpreted by fast digital logic as an independent press To clean up this input th...

Страница 33: ... C installations are designed for use with the board they are included with and are included at no charge as part of our low cost kits Z World offers add on Dynamic C modules for purchase including the popular µC OS II real time operating system as well as PPP Advanced Encryption Standard AES and other select libraries In addition to the Web based technical support included at no extra charge a on...

Страница 34: ...30 RabbitCore RCM2100 ...

Страница 35: ... zworld com 1 Connect the AC adapter and the programming cable as shown in Chapter 2 Getting Started 2 Ethernet Connections There are four options for connecting the RCM2100 module to a network for develop ment and runtime purposes The first two options permit total freedom of action in selecting network addresses and use of the network as no action can interfere with other users We recommend one ...

Страница 36: ...connection to the Internet and other Wide Area Networks but exceptional care should be used with IP address settings and all network related programming and development We recommend that development and debugging be done on a local network before connecting a RabbitCore system to the Internet TIP Checking and debugging the initial setup on a micro LAN is recommended before connecting the system to...

Страница 37: ...ation will take place if you use a dial up line to send a packet to the Internet Windows may try to send it via the local Ethernet network if it is also valid for that network The following IP addresses are set aside for local networks and are not allowed on the Internet 10 0 0 0 to 10 255 255 255 172 16 0 0 to 172 31 255 255 and 192 168 0 0 to 192 168 255 255 The RCM2100 board uses a 10Base T typ...

Страница 38: ...ample programs with out having to set up a direct connection between your computer and the RCM2100 board You will also need the IP address of the nameserver the name or IP address of your mail server and your domain name for some of the sample programs Hub s Firewall Proxy Server Adapter Ethernet Ethernet Network of RCM2100 Board Typical Corporate Network Workstations Internet ...

Страница 39: ...the same form as the IP address An example netmask is 255 255 255 0 This netmask has 8 zero bits in the least significant portion and this means that 28 addresses are a part of the local network Applied to the IP address above 216 103 126 155 this netmask would indicate that the following IP addresses belong to the local network 216 103 126 0 216 103 126 1 216 103 126 2 etc 216 103 126 254 216 103...

Страница 40: ...adcast packet to all devices on the local network asking the device with the desired IP address to answer with its MAC address In this way the table entry can be filled in If no device answers then the device is nonexistent or inoperative and the packet cannot be sent IP addresses are arbitrary and can be allocated as desired provided that they don t conflict with other IP addresses However if the...

Страница 41: ...ddresses can be used to perform some Internet tasks such as sending e mail or browsing the Web but usually cannot be used to participate in conversations that originate else where on the Internet If you want to find out what this dynamically assigned IP address is under Windows XP you can run the ipconfig program while you are connected and look at the interface used to connect to the Internet Man...

Страница 42: ...d usually work by disallowing traffic that did not originate from inside the net work If you want users on the Internet to communicate with your RCM2100 you have several options You can either place the RCM2100 directly on the Internet with a real Internet address or place it behind the firewall If you place the RCM2100 behind the fire wall you need to configure the firewall to translate and forwa...

Страница 43: ...e you to connect your PC and the RCM2100 board together on the same network This network can be a local private net work preferred for initial experimentation and debugging or a connection via the Internet RCM2100 User s PC Ethernet crossover cable Direct Connection network of 2 computers RCM2100 Hub Ethernet cables To additional network elements Direct Connection Using a Hub Board Board ...

Страница 44: ...LIB library You will find this library in the LIB TCPIP directory 3 You can create a CUSTOM_CONFIG LIB library and use a TCPCONFIG value greater than 100 Instructions for doing this are at the beginning of the TCP_CONFIG LIB file There are some other standard configurations for TCPCONFIG that let you select differ ent features such as DHCP Their values are documented at the top of the TCP_CONFIG L...

Страница 45: ...sion of Windows you are using look for the TCP IP Protocol Network Dial Up Connections Network line or tab Double click on this line or select Properties or Local Area Connection Properties to bring up the TCP IP properties dialog box You can edit the IP address and the subnet mask directly Disable obtain an IP address automatically You may want to write down the existing values in case you have t...

Страница 46: ...ge on the screen describing the operation 4 11 Running More Sample Programs With Direct Connect The sample programs discussed here are in the Dynamic C SAMPLES RCM2100 folder 4 11 1 Sample Program PINGLED C One of the RCM2100 s most important features is the availability of the built in Ethernet port This program makes the simplest possible use of the network port by pinging a remote system and us...

Страница 47: ...tion pingleds_setup More importantly it then calls sock_init which initializes the packet driver and the TCP manager using the compiler defaults This function must always be called before any other TCP IP functions The program then resolves the address to be pinged into a numeric value using the library function resolve If the defined address is numeric it converts the define string into truly num...

Страница 48: ...re 8 Browser screen for Sample Program ETHCORE1 C Clicking on each of the button images in the browser window will toggle the state of the associated LED image and will toggle the state of the corresponding LED on the Proto typing Board Since the Web page is generated by the RCM2100 using Dynamic HTML the LED image and the corresponding LED s real state will always be in step Program Description T...

Страница 49: ...s and then force a reload of the web page to change the associated LED image The physical LEDs on the Prototyping Board are turned on or off to match the ledn strings displayed on the Web page 4 11 3 Additional Sample Programs ETHCORE2 C This program takes anything that comes in on a port and sends it out Serial Port C It uses SW2 as a signal that the connection should be closed and PA0 as an indi...

Страница 50: ...h Dynamic C Check the Z World Rabbit Semiconductor Technical Bulletin Board at www zworld com support bb Use the Technical Support e mail form at www zworld com support questionSubmit shtml If the sample programs ran fine you are now ready to go on Additional sample programs are described in the Dynamic C TCP IP User s Manual Please refer to the Dynamic C TCP IP User s Manual to develop your own a...

Страница 51: ... 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 appropriate to the risk involved All Z World products are 100 percent functionally tested Additional testing may include visual quality con trol inspections or mechanical defects analyzer inspections S...

Страница 52: ...48 RabbitCore RCM2100 ...

Страница 53: ...o set in sample pro grams 40 how to set PC IP address 41 M MAC addresses 36 models factory versions 1 2 P pinout RCM2100 3 power supply connections 14 programming cable RCM2100 connections 13 Prototyping Board 8 features 8 9 10 mounting RCM2100 12 R RCM2100 mounting on Prototyping Board 12 reset 14 S sample programs getting to know the RCM2100 EXTSRAM C 21 FLASHLED C 21 26 FLASHLED2 C 21 FLASHLEDS...

Страница 54: ...User s Manual 50 ...

Страница 55: ...0116 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 time the manual was last revised The online versions of the manual contain links to the latest revised schematic on the Web site You may also use the URL information provided above to access the lates...

Страница 56: ......

Отзывы: