Home
TCP/IP Development Kit - Digi-Key
Contents
1. To PC COM port PC ET Colated side with 10Base T Ethernet card i filial ig ENET J6 ae S Straight Through cables Ethernet o Hub Ethernet card Via 10Base T Ethernet Hub and Straight Through Cable Figure 6 Ethernet Connections Getting Started 4 2 Primer on IP Addresses Obtaining IP addresses to interact over an existing operating network can involve a num ber of complications and must usually be done with cooperation from your ISP and or network systems administrator For this reason we recommend a direct connection between a PC and the TCP IP Development Board using an Ethernet crossover cable or a simple arrangement with a hub A crossover cable should not be confused with regular straight through cables The hub and a wide variety of cables can also be purchased from a local computer store In order to set up this direct connection you will need a PC without networking or dis connect a PC from the corporate network or install a second Ethernet adapter and set up a separate private network attached to the second Ethernet adapter Disconnecting your PC from the corporate network may be easy or nearly impossible depending on how it is set up Mobile PCs such as lap
2. x amp SLSEVE 1 J7PWR 2 485 485 2 i KEYPAD JP4 it 1 175 0206 shown Pulled Some components 2 are laid out slightly Down 3 differentlyon older versions Digital Inputs Figure 11 Surface Mounted Jumper Configurations for Selecting Pullup Pulldown on the Digital Inputs 5 2 2 Digital Outputs Pins 12 15 on header J7 have the four digital outputs OUTO OUTS3 Each of the four open collector digital outputs can sink up to 200 mA at 40 V DC 52 TCP IP Development Kit 5 2 3 Digital I O Software Sets the state of a digital output PARAMETERS channel is the output channel number 0 1 2 or 3 value is the output value 0 or 1 RETURN VALUE None SEE ALSO digin Reads the state of a digital input PARAMETERS channel is the input channel number 0 1 2 or 3 RETURN VALUE The state of the input 0 or 1 SEE ALSO digOut 5 2 4 Sample Digital I O Programs 1 Connect the programming cable to header J4 on the TCP IP Development Board Apply power to the TCP IP Development Board 2 Open the sample program SAMPLES ICOM ICOMIO C and press F9 This program demonstr
3. fe ENET J6 4 Figure A 3 TCP IP Development Board Areas Receiving Conformal Coating Any components in the conformally coated area may be replaced using standard soldering procedures for surface mounted components A new conformal coating should then be applied to offer continuing protection against the effects of moisture and contaminants NOTE For more information on conformal coatings refer to Technical Note 303 Con formal Coatings 60 TCP IP Development Kit APPENDIX B POWER MANAGEMENT Appendix B describes the power circuitry distributed on the TCP IP Development Board B 1 Power Supplies Power is supplied to the TCP IP Development Board from an external source either through header J7 or from another TCP IP Development Board through header J5 the RJ 12 jack The TCP IP Development Board itself is protected against reverse polarity by Shottky diodes at D6 and D7 as shown in Figure B 1 The Shottky diode has a low forward voltage drop 0 3 V which keeps the minimum DCIN required to power the TCP IP Development Board lower than a normal silicon diode would allow RAW DCIN SWITCHING POWER REGULATOR Voc j D7 LM2575__ r 4 U2 aA TVS1 8 RAW_RS485 Figure B 1 TCP IP Development Board P
4. Red Heat Shrink Tubing Figure 2 Connecting Power and PC to TCP IP Development Board 10 TCP IP Development Kit 3 Connect Power Supply to TCP IP Development Board Connect the positive lead indicated with red heat shrink tubing to the PWR connector on header J7 on the TCP IP Development Board and connect the negative lead to GND on header J7 as shown here NOTE Be careful to hook up the positive and negative power leads A exactly as described Otherwise the TCP IP Development board will not function 4 Apply Power secant Tubing Figure 3 Power Supply Connections Plug in the wall transformer The TCP IP Development Board is now ready to be used NOTE A hardware RESET is accomplished by unplugging the AC adapter then plug ging it back in User s Manual 11 2 3 Where Do I Go From Here We recommend that you proceed to the next chapter and install Dynamic C if you do not already have it installed then run the first sample program to verify that the TCP IP Development Board is set up and functioning correctly If everything appears to be working we recommend the following sequence of action 1 Run all of the sample programs described in Chapter 4 to get a basic familiarity with Dynamic C and the TCP IP Development Board s capabilities 2
5. Pin Pin Name Default Use Alternate Use Notes 1 RXA Serial Port A PC6 Input 2 GND 3 CLKA PB1 Bitwise or parallel programmable input 4 VCC 5 RESET Connected to reset generator U4 6 TXA Serial Port A PC7 Output 8 STATUS Output Must be low when 9 SMODEO Input TCP IP Development Board boots up Must be low when 10 SMODE1 Input TCP IP Development Board boots up Getting Started 71 72 TCP IP Development Kit NOTICE TO USERS RABBIT SEMICONDUCTOR PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS UNLESS A SPECIFIC WRITTEN AGREEMENT REGARDING SUCH INTENDED USE IS ENTERED INTO BETWEEN THE CUSTOMER AND RABBIT SEMICONDUCTOR PRIOR TO USE Life support devices or systems are devices or systems intended for sur gical implantation into the body or to sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling and user s manual can be reasonably expected to result in significant injury No complex software or hardware system is 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 sys tem designer to incorporate redundant protective mechanisms appropriate to the risk involved All Rabbit Semiconductor products are 100 percent functionally tested Additional testing may include visual qu
6. al Y2 R47 TP50 OTP6 R60 TP8 tpg R58 oS R59 g ENET J6 4 217 lt 107 1 p 4 71 J 120 Figure A 1 TCP IP Development Board Dimensions 56 TCP IP Development Kit Table A 1 TCP IP Development Board Specifications Feature OP6600 OP6700 Microprocessor Rabbit 2000 at 18 432 MHz Ethernet Port None 10Base T RJ 45 Flash EPROM 256K Ree enee On SRAM 128K standard Backup Battery On backup battery board 3 V lithium coint type 1000 mA h supports RTC and SRAM 2 x 6 domed tactile keypad with customizable legend Keypad Display supertwist 4 x 20 LCD with backlighting Digital Input
7. 2 fe led m T R30 Q5 Raz Conformally coated area T2053 C12 E g f bisp Ra Rg FI I i R47 TP50 CTP R60 TP8 Tp9 R58 Deo R5 N TPT pero
8. U10 must be installed for RS 485 signals on J5 U10 must be removed for RS 232 signals on J5 U10 must be removed for RS 232 signals on J5 Figure 1 TCP IP Development Board I O Pinout RJ 45 pinouts are sometimes numbered opposite to the way shown in Figure 1 Regardless of the numbering convention followed the pin positions relative to the spring tab position located at the bottom of the RJ 45 jack in Figure 1 are always absolute and the RJ 45 connector will work properly with off the shelf Ethernet cables User s Manual 3 1 3 Development Software The TCP IP Development Board uses the Dynamic C development environment for rapid creation and debugging of runtime applications Dynamic C provides a complete develop 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 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 Installing Dynamic C for complete information on installing Dynamic C TCP IP source code is provided in addition to the Dynamic C software on CD ROM ICMP HTTP includes facilities for SSI CGI routines cookies and basic authentication SMTP FTP and TFTP client and server capabilities are provided Ethernet drivers for the RealTek Ethernet chip are
9. REO Ufa keked Eche R59 R60 R82 RETRE RS 232 5 wire or two RS 232 TxB RxB on J5 Table 2 b summarizes the options Note that the parameters in the serMode software Serial Options 175 0188 Rev C TxC RTS J7 6 485 RxB_ J7 4 RxC CTS J7 7 485 TxB J5 3 485_ RxB J5 4 R62 485 TxB___g ana J7 3 09 U11 tf 13 8 R83 00 Figure 7 b RS 232 RS 485 Serial Communication Options function call must also be set to match the hardware configuration being used Table 2 b Serial Communication Configurations Version 175 0188 Rev C item Factory One 3 wire RS 232 Two 3 wire One 5 wire RS 232 Detault amp RS 485 RS 232 RS 232 on J5 R58 R60 In Out R61 R62 Out In In In R82 R83 In Out Out In U10 In In In Out J7 3 RS 485 TxB TxB TxB J7 4 RS 485 RxB RxB RxB J7 6 TxC TxC RTS TxC or RTS J7 7 RxC RxC CTS RxC or CTS J5 3 RS 485 TxB J5 4 RS 485 RxB Getting Started 45 Version 175 0206 The RS 232 transceiver may be used as a 5 wire RS 232 channel or as two 3 wire RS 232 channels at the expense of the RS 485 channel which is connected through jumpers across header JP7 a
10. NOTE Earlier versions of the TCP IP Development Board sold before 2003 that do not have the CE mark are not CE complaint Immunity The TCP IP Development Board meets the following EN55024 1998 immunity standards e EN61000 4 2 ESD e EN61000 4 3 Radiated Immunity e EN61000 4 4 EFT e EN61000 4 6 Conducted Immunity Additional shielding or filtering may be required for a heavy industrial environment Emissions The TCP IP Development Board meets the following emission standards emission standards with the Rabbit 2000 spectrum spreader turned on and set to the normal mode The spec trum spreader is only available with Rev C or higher of the Rabbit 2000 microprocessor This microprocessor is used on the TCP IP Development Boards that carry the CE mark e EN55022 1998 Class B e FCC Part 15 Class B Your results may vary depending on your application so additional shielding or filtering may be needed to maintain the Class B emission qualification User s Manual 7 1 5 1 Design Guidelines Note the following requirements for incorporating the TCP IP Development Board into your application to comply with CE requirements General The power supply provided with the Development Kit is for development purposes only It is the customer s responsibility to provide a CE compliant power supply for the end product application When connecting the TCP IP Development Board to outdoor cables the customer is responsible
11. If Dynamic C appears to compile the BIOS successfully but you then receive a communi cation error message when you compile and load a sample program it is possible that your PC cannot handle the higher program loading baud rate Try changing the maximum download rate to a slower baud rate as follows e Locate the Serial Options dialog in the Dynamic C Options gt 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 e Locate the Serial Options dialog in the Dynamic C Options gt Communications menu Choose a lower debug baud rate Getting Started 19 3 6 PONG C You are now ready to test your set up by running a sample program Find the file PONG C which is in the Dynamic C SAMPLES folder To run the program open it with the File menu if it is not still open compile it using the Compile menu and then run it by selecting Run in the Run menu The STDIO window will open and will dis play a small square bouncing around in a box This program does not test the TCP IP part of the board but does ensure that the board is functional The sample program in the next chapter tests the TCP IP portion of the board 20 TCP IP Development Kit 3 7 Sample Programs Sample programs are provided in the D
12. ming cable to your PC Once you run a sample program to dem onstrate that you have connected everything correctly you will be ready to go on and finish developing your system 2 1 Development Kit Contents The TCP IP Development Kit contains the following items TCP IP Development Board with 512K flash memory and 128K SRAM Demonstration Board with pushbutton switches and LEDs used to demonstrate I O and TCP IP capabilities Wire assembly to connect Demonstration Board to TCP IP Development Board Set of 4 rubber foot pads to position TCP IP Development Board Wall transformer power supply 12 V DC included only with Development Kits sold for the North American market overseas users will need a power supply compatible with their local mains power 10 pin header to DEY programming cable with integrated level matching circuitry Dynamic C CD ROM with complete product documentation on disk This Getting Started manual Registration card User s Manual 9 2 2 Connections 1 Attach the rubber feet to the bottom corners of the TCP IP Development Board 2 Connect the Programming Cable to the TCP IP Development Board Turn the Rabbit 2000 TCP IP Development Board so that the Rabbit 2000 microprocessor is facing up as shown below Connect the 10 pin PROG connector of the programming cable to header J4 onthe TCP IP Development Board as shown in Figure 2 Be sure to ori ent the red edge of the cable towards pin 1 of the conn
13. Advanced Encryption Standard AES and other select libraries In addition to the Web based technical support included at no extra charge a one year telephone based technical support module is also available for purchase Getting Started 15 3 4 Installing Dynamic C Insert the Dynamic C CD ROM in the drive on your PC If autorun is enabled the CD installation will begin automatically If autorun is disabled or the installation otherwise does not start use the Windows Start gt Run menu or Windows Disk Explorer to launch SETUP EXE from the root folder of the CD ROM The installation program will guide you through the installation process Most steps of the process are self explanatory and not 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 4 1 Program amp Documentation File Location Dynamic C s application library and documentation files can be installed in any conve nient location on your workstation s hard drives Dynamic C SE for Rabbit 2000 TCP IP Development Kit Version 7 04T2 x Choose Destination Location Select folder where Setup will install files Q Please enter the location where you would like to install the program You may type a new folder name or click the Browse button to find a new location C NDCRABBIT_704T2 Browse Instalshied lt Back Can
14. C using the File menu Open command This program is the same as the first program except that a variable 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 DEMOBRD2 C Now type lt Ctrl W gt to open the watch window and add the watch expression k to the top of the list of watch expressions Now type lt Ctrl U gt Each time you type lt Ctrl U gt 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 lt Ctrl U gt several times to observe the watch expressions k and k 5 3 7 2 5 Summary of Features So far you have practiced using the following features of Dynamic C e 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
15. LED2 8 2 12 SW3 DEMO BOARD oS sale eo 0 0 ee es o Os sw sw sw Sead O 03 LED4 11 Sw2 Figure 4 Connections Between TCP IP Development Board and Demonstration Board Getting Started 21 Now open the file DEMOBRD1 C which is in the Samples ICoM folder The program will appear in a window as shown in Figure 5 below minus some comments Use the mouse to place the cursor on the function name WrPortI in the program and type lt Ctrl H gt This will bring up a documentation box for the function WrPortTI In general you can do this with all functions in Dynamic C libraries including libraries you write yourself Close the documentation box and continue C programs begin with main main eid Set up Port D to output to LED1 and LED2 int j al WrPortI PDDDR amp PDDDRShadow 0x03 WrPortI PDDCR amp PDDCRShadow 0x00 Start a loop while 1 4 Turn on LED1 and sf turn off LED2 BitWrPortI PDDR amp PDDRShadow OxFF 0 BitWrPortI PDDR amp PDDRShadow 0x00 1 Time delay by counting for j 0 j lt 20000 j lt __ to 20 000 BitWrPortI PDDR amp PDDRShadow 0x00 0 Turn off LED1 and BitWrPortI PDDR amp PDDRShadow 0xFF 1 turn on LED2 SOEKE Uy r Time delay by counting to 20 000 end while 1 End of the endless loop end of main Note See the Rabbit 2000 Microprocessor User s Manual Software Chapter for details on the routines th
16. This leaves 256 3 253 available IP addresses for the example given Getting Started 33 4 4 How IP Addresses are Used The actual hardware connection via an Ethernet uses Ethernet adapter addresses also called MAC addresses These are 48 bit addresses and are unique for every Ethernet adapter manufactured In order to send a packet to another computer given the IP address of the other computer it is first determined if the packet needs to be sent directly to the other computer or to the gateway In either case there is an Ethernet address on the local network to which the packet must be sent A table is maintained to allow the protocol driver to determine the MAC address corresponding to a particular IP address If the table is empty the MAC address is determined by sending an Ethernet broadcast 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 Some IP address ranges are reserved for use on internal networks and can be allocated freely as long as no two internal hosts have the same IP address These internal IP addresses are not routed to the Internet and any internal hosts using one of these reserved IP addresses cannot communicate on the external Internet without being connected to a host that has a valid Internet IP a
17. the run command If the pro gram is not already compiled the run command will compile it first e 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 F8 key the subroutine is executed at full speed when the statement that calls it is stepped over e Setting break points The F2 key is used to turn on or turn off toggle a break point at the cursor position if the program has already been compiled You can set a break point if the program is paused at a break point You can also set a break point in a program 24 TCP IP Development Kit that is running at full speed This will cause the program to break if the execution thread hits your break point e Watch expressions A watch expression is a C expression that is evaluated on command in the watch window An expression is basically any type of C formula that can include operators variables and function calls but not statements that require multiple lines such as for or switch You can have a list of watch expressions in the watch window If you are single stepping then they are all evaluated on each step You can also command the watch expression to be evaluated by using the lt Ctrl U gt command When a watch expression is evaluated at a break point it is evaluated as if the statement was at the beginning of the function where you are single stepping If your progr
18. 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 to restore them later It is not necessary to edit the gate way address since the gateway is not used with direct connect TCP IP Dev IP 10 10 6 101 Board Netmask 255 255 255 0 J User s PC A Ethernet crossover cable Direct Connection PC to TCP IP Development Board Getting Started 39 4 8 Run the PINGME c Demo Connect the crossover cable from your computer s Ethernet port to the TCP IP Develop ment Board s RJ 45 Ethernet connector Open the PINGME C sample program from the SAMPLES TCPIP IcMP folder compile the program and start it running under Dynamic C When the program starts running the green LNK light on the TCP IP Development Board should be on to indicate an Ethernet connection is made Note If the LNK light does not light you may not have a crossover cable or if you are using a hub perhaps the power is off on the hub The next step is to ping the board from your PC This can be done by bringing up the MS DOS window and running the ping program ping 10 10 6 100 or by Start gt Run and typing the command ping 10 10 6 100 Notice that the red ACT light flashes on the TCP IP Development Board while the ping is taking place indicating the transf
19. used to connect to the Internet Many networks use IP addresses that are assigned using DHCP When your computer comes up and periodically after that it requests its networking information from a DHCP server The DHCP server may try to give you the same address each time but a fixed IP address is usually not guaranteed If you are not concerned about accessing the TCP IP Development Board from the Internet you can place the TCP IP Development Board on the internal network using an IP address assigned either statically or through DHCP Getting Started 35 4 6 Placing Your Device on the Network In many corporate settings users are isolated from the Internet by a firewall and or a proxy server These devices attempt to secure the company from unauthorized network traffic and 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 TCP IP Development Board you have several options You can either place the TCP IP Development Board directly on the Internet with a real Internet address or place it behind the firewall If you place the TCP IP Development Board behind the firewall you need to configure the fire wall to translate and forward packets from the Internet to the TCP IP Development Board Firewall Proxy Server Network Ether
20. 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 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 also in the online documentation set 2 3 1 Technical Support NOTE If you purchased your TCP IP Development Board through a distributor or through a Z World or Rabbit Semiconductor partner contact the distributor or Z World partner first for technical support If there are any problems at this point e Check the Z World Rabbit Semiconductor Technical Bulletin Board at www zworld com support bb e Use the Technical Support e mail form at www zworld com support support_submit html 12 TCP IP Development Kit 3 INSTALLING DYNAMIC C To develop and debug programs for the TCP IP Development Board and for all other Z World and Rabbit Semiconductor hardware you must install and use Dynamic C This chapter takes you through the installation of Dynamic C and then pro vides a tour of its major features with respect to the TCP IP Development Board 3 1 An Overview of Dynamic C Dynamic C integrates the following development functions into one program Editing Compiling Linking Loading Debugging In fact compiling linking and loading are one function Dynamic C does not use an In Circuit Emulator progra
21. also included Users can directly write to TCP or UDP sock ets to develop custom applications In addition extensive sample programs are provided to assist with development No run time royalties are required leading to significant cost savings for OEMs over the life of their application 4 TCP IP Development Kit 1 4 How to Use This Manual This Getting Started manual is intended to give users a quick but solid start with the TCP IP Development Board It does not contain detailed information on the hardware capabilities or the Dynamic C development environment Most users will want more detailed information on some or all of these topics in order to put the TCP IP Development Board to effective use TIP We recommend that anyone not thoroughly familiar with single board computers at least read through the rest of this manual to gain the necessary familiarity to make use of the more advanced information 1 4 1 Additional Reference Information 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 develop ing systems based on the TCP IP Development Board e Dynamic C User s Manual e Dynamic C Function Reference Manual e Dynamic C TCP IP User s Manual Rabbit 2000 Microprocessor User s Manual An Introduction to TCP IP 1 4 2 Using Online Documentation We provide the bulk of our user and reference documentation in two ele
22. goes low This prevents the Vcc line from draining the battery VCC VRAM A R23 00 A 9 Q3 4 FDV302P IRES MA MMBT3904 22 kQ Figure B 4 VRAM Switch R24 10 kQ Transistor Q3 is needed to provide a very small voltage drop between Vcc and VRAM lt 100 mV typically 10 mV so that the processor lines powered by Vcc will not have a significantly different voltage than VRAM When the TCP IP Development Board is not resetting pin 2 on U4 is high the RES line will be high This turns on Q4 causing its collector to go low This turns on Q3 allowing VRAM to nearly equal Vcc When the TCP IP Development Board is resetting the RES line will go low This turns off Q3 and Q4 providing an isolation between Vcc and VRAM The battery backup circuit keeps VRAM from dropping below 2 V B 2 3 Reset Generator The TCP IP Development Board uses a reset generator U2 to reset the Rabbit 2000 microprocessor when the voltage drops below the voltage necessary for reliable operation The reset occurs between 4 50 V and 4 75 V typically 4 63 V 64 TCP IP Development Kit B 2 4 Installing Replacing the Backup Battery Board An optional pluggable backup battery board is available from Rabbit Semiconductor To install the backup battery board align the battery board over the outline as shown in Figure B 5 and plug it in Be careful to align the connectors and the backup battery board Fasten the backup boar
23. last for its full shelf life when external power is applied to the TCP IP Development Board 62 TCP IP Development Kit B 2 1 Battery Backup Circuit Figure B 3 shows the battery backup circuitry on the TCP IP Development Board D2 VBAT EXT gt R35 2 kQ External Battery R39 i thermistor 22 KQ R37 T l Figure B 3 TCP IP Development Board Battery Backup Circuit The battery backup circuit serves three purposes e It reduces the battery voltage to the SRAM and to the real time clock thereby limiting the current consumed by the real time clock and lengthening the battery life e It ensures that current can flow only out of the battery to prevent charging the battery e A voltage VOSC is supplied to U13 which keeps the 32 768 kHz oscillator working when the voltage begins to drop VRAM and Vcc are nearly equal lt 100 mV typically 10 mV when power is supplied to the TCP IP Development Board VRAM is also available on pin 34 of header J2 to facili tate battery backup of the external circuit Note that the recommended minimum resistive load at VRAM is 100 kQ and new battery life calculations should be done to take external loading into account Getting Started 63 B 2 2 Power to VRAM Switch The VRAM switch shown in Figure B 4 allows the battery backup to provide power when the external power goes off The switch provides an isolation between Vcc and the battery when Vcc
24. port you are plugged into Don t change anything in this menu except the COM number The baud rate should be 115 200 bps and the stop bits should be 1 3 7 2 Single Stepping Compile or re compile DEMOBRD1 C by clicking the Compile button on the task bar The program will compile and the screen will come up with a highlighted character green at the first executable statement of the program Use the F8 key to single step Each time the F8 key is pressed the cursor will advance one statement When you get to the for j 0 j lt statement it becomes impractical to single step further because you would have to press F8 thousands of times We will use this statement to illustrate watch expressions 3 7 2 1 Watch Expression Type lt Ctrl W gt or chose Add Del Watch Expression in the Inspect menu A box will come up Type the lower case letter j and click on add to top and close Now continue single stepping with F8 Each time you step the watch expression j will be evaluated and printed in the watch window Note how the value of j advances when the statement j is executed 3 7 2 2 Break Point Move the cursor to the start of the statement for j 0 j lt 20000 j To set a break point on this statement type F2 or select Breakpoint from the Run menu A red highlight will appear on the first character of the statement To get the program run ning at full speed type F9 or select Run on the Run menu The program will advance unti
25. readily available The TCP IP Development Board uses 10 Mbps Ethernet so the hub or Ethernet adapter must be either a 10 Mbps unit or a 10 100 Mbps unit 32 TCP IP Development Kit 4 3 IP Addresses Explained IP Internet Protocol addresses are expressed as 4 decimal numbers separated by periods for example 216 103 126 155 10 1 1 6 Each decimal number must be between 0 and 255 The total IP address is a 32 bit number consisting of the 4 bytes expressed as shown above A local network uses a group of adja cent IP addresses There are always 2 IP addresses in a local network The netmask also called subnet mask determines how many IP addresses belong to the local network The netmask is also a 32 bit address expressed in 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 126 255 The lowest and highest address are reserved for special purposes The lowest address 216 103 126 0 is used to identify the local network The highest address 216 103 126 255 is used as a broadcast address Usually one other address is used for the address of the gateway out of the network
26. real time programming machine level I O and provide standard string and math functions e Dynamic C compiles directly 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 Requirements To install and run Dynamic C your system must be running one of the following operating systems e Windows 95 e Windows 98 e Windows NT e Windows Me e Windows 2000 e Windows XP 3 2 1 Hardware Requirements The PC on which you install Dynamic C should have the following hardware e A Pentium or later microprocessor e 32 MB of RAM e At least 40 MB of free hard drive space e Atleast one free COM or USB serial port for communication with the target systems e A CD ROM drive for software installation RS 232 USB converter required 14 TCP IP Development Kit 3 3 Upgrading Dynamic C Dynamic C patches that focus on bug fixes are available from time to time Check the Web sites e www zworld com support or e www rabbitsemiconductor com support for the latest patches workarounds and bug fixes 3 3 1 Add On Modules Dynamic 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 uC OS II real time operating system as well as PPP
27. sample program has two indepen dent tasks The first task flashes LED2 once a second The second task uses button SW1 on the Demonstration Board to toggle the logical value of a virtual switch vswitch and flash LED1 each time the button is pressed This task also debounces button SW1 Note that the Demonstration Board has to be connected to the TCP IP Development Board as described in Section 3 7 1 to be able to run DEMOBRD3 C Getting Started 25 main int vswitch li etare Or virtual sviton Comcrollec by burcon Si WrPortI PDDDR amp PDDDRShadow 0x03 set port D bits 0 1 as outputs WrPortI PDDCR amp PDDCRShadow 0x00 set port D to not open drain mode vswitch 0 initialize virtual switch as off 1 while 1 endless loop First task will flash LED4 for 200 ms once per second 2 costate BitWrPortI PDDR amp PDDRShadow OxFF 1 Pi tura MD em 3 waitfor DelayMs 200 wait 200 ms BitWrPortI PDDR amp PDDRShadow 0x00 1 Pi eurn TED OFE waitfor DelayMs 800 wait 800 ms 4 Second task debounce SW1 and toggle vswitch costate 5 if BitRdPortI PDDR 2 abort if button not down skip out waitfor DelayMs 50 wait 50 ms if BitRdPortI PDDR 2 abort if button not still down exit vswitch vswitch toggle since button was down 50 ms while 1 waitfor BitRdPortI PDDR 2 wait for button to go up waitfor DelayMs 200 wait a
28. termination resistors in a multidrop network should only be enabled on both end nodes of the network Disable the termination and bias resistors on the intervening TCP IP Development Boards in the network by removing both jumpers from header JP6 Note that older versions of the TCP IP Development Board do not have this jumper fea ture and the surface mounted bias and termination resistors shown in Figure 8 have to be removed in networks containing more than 10 TCP IP Development Boards 5 1 3 Programming Port The TCP IP Development Board has a 10 pin programming header labeled J4 The pro gramming port uses the Rabbit 2000 s Serial Port A for communication The Rabbit 2000 startup mode pins SMODE0 SMODE1 are presented to the programming port so that an externally connected device can force the TCP IP Development Board to start up in an external bootstrap mode NOTE Refer to the Rabbit 2000 Microprocessor User s Manual for more information related to the bootstrap mode The programming port is used to start the TCP IP Development Board in a mode where the TCP IP Development Board will download a program from the port and then execute the program The programming port transmits information to and from a PC while a pro gram is being debugged The TCP IP Development Board can be reset from the programming port The Rabbit 2000 status pin is also presented to the programming port The status pin is an output that can be used to send a g
29. typed via TCP IP 4 10 Where Do Go From Here NOTE If you purchased your TCP IP Development Board through a distributor or through a Z World or Rabbit Semiconductor partner contact the distributor or Z World partner first for technical support If there are any problems at this point e Check the Z World Rabbit Semiconductor Technical Bulletin Board at www zworld com support bb e Use the Technical Support e mail form at www zworld com support support_submit html If the sample programs ran fine you are now ready to go on Refer to the Dynamic C TCP IP User s Manual to develop your own applications An Introduction to TCP IP provides background information on TCP IP and is included on the CD Getting Started 41 42 TCP IP Development Kit 5 SERIAL PORTS AND DIGITAL I O Chapter 5 describes how to set up TCP IP Development boards for serial communication and how to use the digital I O Getting Started 43 5 1 Serial Communication In the factory default configuration the TCP IP Development Board has one RS 232 3 wire serial channel one RS 485 serial channel and one synchronous CMOS serial channel The TCP IP Development Board may be configured for 5 wire RS 232 or two 3 wire RS 232 channels The exact configuration instructions depend on the version of the TCP IP Devel opment Board you have This information is etched on the bottom side of the printed cir cuit board or you can readily determine y
30. 3 7 2 4 Watching Variables Dynamically esessseessseeesseessssreeerssesssseeerseressrsrsersseessesenseseesersesets 24 3 7 2 5 Summary of Features ccccceeccescesseesceseeeeceseeececaeesaecsaesaeceecsaeeeeseseseseeeseeseaeseeeesesseeeaeenaes 24 3 7 3 Cooperative Multitasking misra eein aeeie EEE EEE SE EE EEEE EEEa EEEE EEEE E 25 3 7 4 Advantages of Cooperative Multitasking cccceccesceesscecsecssecseceeeeeeeeceeeereeeseeseseeeeeeaeeeenaees 27 3 8 Spectrum Spreader easiness NEEE EE EEEE EEEE E EEEE ETEK SEESE eS ESEESE 28 Getting Started Chapter 4 Using the TCP IP Features 29 AM TEPIP Connections senyen a iets Gace tesco ld a a n aS 29 4 2 Primer on IP Addresses ien erige E EE R E is Mana ieee en 32 4 3 IP Addresses Explained anesini e r ae e EE E E Mab aes 33 4 4 How IP Addresses are Usedicnstieeiii oinin iie E A E REA E re EE ERE 34 4 5 Dynamically Assigned Internet Addresses 0 cccccccceeseseceeceseeseeeseesecseesecesceseeneceseeeaeeaeecaeceenaeeneeas 35 4 6 Placing Your Device on the Network ccccceccecsccsseeseessessecseceseceeceseesecescnseceseeeenseeseeeaeeaeeeseceeeeeerenes 36 4 7 Running TCP IP Sample Programs anann EEE TE E ET 37 4 7 1 How to Set IP Addresses in the Sample Programs ccccsccesceeseesceseesseeseceeeeseceeenteeerenseetenes 38 4 7 2 How to Set Up your Computer s IP Address for Direct Connect s sssssssrsesseeeesersrsersreressese 39 4 8 Run th PINGME C Demo
31. 4 dimensions programming cable TCP IP Development Board 56 DIAG connector 0 0 70 Getting Started 75 programming port PIMOUE sess overseen aiid 70 used as diagnostic port 70 protected variables 14 R real time kernel RTK oes 14 programming eee 14 registers WINdOW eeeceeeeeeseeseeeteeeeees 13 TESEL Sera a eee 11 48 reset generator 64 RS 232 neoan iaren 47 RSA8S nenastane i 47 termination and bias resis LOTS cr reie EE 48 RTK real time kernel 14 running TCP IP sample pro BTAMS aeoieo 32 S sample programs how to set IP address 38 running TCP IP sample pro PT AMS cress eeri ires En 32 PEP IP srono eeso 37 DISPLAY MAC C 34 PINGME C neee 40 SSLC tae Bat eden 41 serial communication 44 programming pott 48 RS 232 description 47 RS 232 RS 485 options EEE E 44 45 46 RS 485 description 47 RS 485 network seses 47 common power supply 47 RS 485 termination and bias TESISLOIS 2a enet 48 serial communication pinout 3 shared variables 0008 14 software digital I O digit ce Ms ate ei aden 53 digOut o cc avcnseeen 53 sample program 53 libraries PACKET LIB 49 RS232 LI Biisin 49 serial communication sample programs 49 51 serB485RX o ceeceeeeestees 49 SeIB485 TX enoe 49 serMode ccccecssceeeeeees 49 Specifications ceeeee
32. Semiconductor TCP IP Development Kit Integrated C Development System Getting Started Manual 019 0079 040531 G TCP IP Development Kit Getting Started Manual Part Number 019 0079 040531 G Printed in U S A 2000 2004 Rabbit Semiconductor All rights reserved Rabbit Semiconductor reserves the right to make changes and improvements to its products without providing notice Trademarks Rabbit 2000 is a registered trademark of Rabbit Semiconductor Dynamic C is a registered trademark of Z World Inc Rabbit Semiconductor 2932 Spafford Street Davis California 95616 6800 USA Telephone 530 757 8400 Fax 530 757 8402 www rabbitsemiconductor com TCP IP Development Kit TABLE OF CONTENTS Chapter 1 Overview 1 1 1 Desctiption innccn eat bee Aes ots eee hepsi anes heer oni 1 1 1 1 TCP IP Development Board Features cesccsessssseseseeceeseeeeeeceeceecseesessecaeeaeeeceaecaseecetsnaeaeeatenes 1 1 1 2 Key Benefitsiessen iaa nna neon ck bias EEEE EE AEE aoa as 2 1 1 3 TEP IP Capabilities 2 5 5 5 tecscessccstivessisisaastofSleseqeniesaasasstaupetiessansh asain anes EA AR EE EAR eNA RERE PRSES 2 1 2 Physical and Electrical Specifications ssesesesesesessesesrsessrsesreeseressrenseresesenentesereseneseseesesrseseneeereesenese 3 1 3 Development Software scicccccccstissiccscseccssesensssvateesasiesezecsicesvassesiccnsnanssegdaveeasbes dasgecsedecsaganaescsszavsbieesseeneges 4 LA How to U
33. ality control inspections or mechanical defects analyzer inspections Specifications are based on characterization of tested sample units rather than testing over temperature and voltage of each unit Rabbit Semiconductor products may qualify compo nents to operate within a range of parameters that is different from the manufacturer s rec ommended range This strategy is believed to be more economical and effective Additional testing or burn in of an individual unit is available by special arrangement Getting Started 73 74 TCP IP Development Kit INDEX A Dynamic C incu 13 14 J COM port sercis 19 assembly language 13 direct compilation 13 jumper configurations ere 58 59 assembly window s s s 13 telephone based technical JP1 RS 485 bias and termina B SUpport eeeeeeeeeeeeeeeees 15 tiOn resistors seco 48 upgrades and patches 15 JP1 SRAM size srren 59 backup battery board 65 JP2 flash memory size 59 installing 65 E JP3 flash memory size 59 battery backup circuit 63 editing 13 JP4 digital input pull up pull NS eseseesesessssssesensnnnesesnee downresistors acces 59 battery connections 62 CMIOL PEIEE 13 JP5 flash bank battery life oo eens 62 embedded assembly code 13 flash memory ba sats select cai tivecch tives 9 c p P JP6 RS 485 bias and termina tion resistors 59 C language 0 13 14 E
34. am is running you can also evaluate watch expressions with a lt Ctrl U gt if your program has a runwatch command 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 3 7 3 Cooperative Multitasking Cooperative multitasking is a convenient way to perform several different tasks at the same time An example would be to step a machine through a sequence of steps and at the same time independently carry on a dialog with the operator via a human interface Coop erative multitasking differs from a different approach called preemptive multitasking Dynamic C supports both types of multitasking In cooperative multitasking each separate task voluntarily surrenders its compute time when it does not need to perform any more activity immediately In preemptive multitasking control is forcibly removed from the task via an interrupt Dynamic C has language extensions to support multitasking The major C constructs are called costatements cofunctions and slicing These are described more completely in the Dynamic C User s Manual The example below sample program DEMOBRD3 C uses cos tatements A costatement is a way to perform a sequence of operations that involve pauses or waits for some external event to take place A complete description of costatements is in the Dynamic C User s Manual The DEMOBRD3 C
35. at read and write I O ports Figure 5 Sample Program DEMOBRD1 C To run the program DEMOBRD1 C load it with the File menu compile it using the Com pile menu and then run it by selecting Run in the Run menu LED1 and LED on the Demonstration Board should start going on and off if everything went well If this doesn t work review the following points e 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 lt Ctrl Y gt or select Recompile BIOS from the Compile menu e A message reports No Rabbit Processor Detected in cases where the wall transformer is either not connected or is not plugged in 22 TCP IP Development Kit e The programming cable must be connected to the TCP IP Development Board The colored wire on the programming cable is closest to pin 1 on header J4 on the TCP IP Development Board as shown in Figure 1 The other end of the programming cable must be connected to the PC serial port The COM port specified in the Dynamic C Options menu must be the same as the one the programming cable is connected to e To check if you have the correct serial port select Compile then Compile BIOS or type lt Ctrl Y gt If the BIOS successfully compiled message does not display try a different serial port using the Dynamic C Options menu until you find the serial
36. ates how to turn the I O on and off Getting Started 53 54 TCP IP Development Kit APPENDIX A TCP IP DEVELOPMENT BOARD SPECIFICATIONS Getting Started 55 A 1 Electrical and Mechanical Specifications Figure A 1 shows the mechanical dimensions for the TCP IP Development Board id J2 _4X20LCD 14 z oo0o0o0o00000 0H 2 C53 C12 4 30 109 4 00 102 U13 5 rik R43 R42
37. cel The default location as shown in the example above is in a folder named for the version of Dynamic C placed in the root folder of the C drive If this location is not suitable enter a different root path before clicking Next gt Files are placed in the specified folder so do not set this location to a drive s root directory 16 TCP IP Development Kit 3 4 2 Installation Type Dynamic C has two components that can be installed together or separately One compo nent is Dynamic C itself with the development environment support files and libraries The other component is the documentation library in HTML and PDF formats which may be left uninstalled to save hard drive space or installed elsewhere on a separate or net work drive for example Dynamic C SE for Rabbit 2000 TCP IP Development Kit Version 7 04T2 Setup Type Choose the setup type that best suits your needs Q Click the type of Setup you prefer r Description This will install all necessary program executables libraries help files sample programs and manuals InstallShield lt Back Cancel The installation type is selected in the installation menu shown above The options are e Typical Installation Both Dynamic C and the documentation library will be installed in the specified folder default e Compact Installation Only Dynamic C will be installed e Custom Installation You will be allowed to ch
38. ctronic formats HTML and Adobe PDF We do this for several reasons We believe that providing all users with our complete library of product and reference manuals is a useful convenience However printed manuals are expensive to print stock and ship Rather than include and charge for manuals that every user may not want or pro vide only product specific manuals we chose to provide our complete documentation and reference library in electronic form with every Development Kit and with our Dynamic C development environment Finding Online Documents The online documentation is installed along with Dynamic C and an icon for the docu mentation menu is placed on the workstation s desktop Double click this icon to reach the menu If the icon is missing create a new desktop icon that points to default htm in the docs folder found in the Dynamic C installation folder The latest versions of all documents are always available for free unregistered download from our Web sites as well User s Manual 5 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 e Print from the Adobe PDF versions of the files not the HTML versions NOTE The most current version of Adobe Acrobat Reader can always be downloaded from Adobe s web site at http www adobe com We recommend
39. d using a 4 40 x 3 16 screw and lockwashert NOTE Before replacing the backup battery board make sure that the TCP IP Develop ment Board is receiving power from the standard power supply This makes sure that data in RAM are not lost when the battery backup board is removed temporarily To replace the backup battery board remove the screw and unplug the old battery board Then install a replacement backup battery board Remove screw Unplug board Figure B 5 Installing Backup Battery Board Do not attempt to recharge the old battery and do not dispose of it in regular trash to avoid any risk of explosion or fire You may either return the old backup battery board to Rabbit Semiconductor for recycling or send the battery yourself to an approved recycling facility Getting Started 65 B 3 Chip Select Circuit Figure B 6 shows a schematic of the chip select circuit VRAM R29 ICSRAM a6 ICS1 HD Qs VRAM R31 R34 10 kQ 100 kQ R33 RES Pt NVV Q7 p ap A C4 2200 pF 300 ka Figure B 6 Chip Select Circuit The current drain on the battery in a battery backed circuit must be kept at a minimum When the TCP IP Development Board is not powered the battery keeps the SRAM mem ory contents and the real time clock RTC going The SRAM has a powerdown mode that greatly reduces powe
40. dditional 200 ms if BitRdPortI PDDR 2 break if button still up break out of while loop end of costate make LED1 agree with vswitch 6 BitWrPortI PDDR amp PDDRShadow vswitch 0 7 end of while loop end of main The numbers in the left margin are reference indicators and are not a part of the code Load and run the program Note that LED2 flashes once per second Push button SW1 several times and note how LED is toggled The flashing of LED2 is performed by the costatement starting at the line marked 2 Cos tatements need to be executed regularly often at least every 25 ms To accomplish this the costatements are enclosed in a while loop The term while loop is used as a handy way to describe a style of real time programming in which most operations are done in one loop The while loop starts at 1 and ends at 7 The statement at 3 waits for a time delay in this case 200 ms The costatement is being executed on each pass through the big loop When a wait for condition is encountered 26 TCP IP Development Kit the first time the current value of MS_TIMER is saved and then on each subsequent pass the saved value is compared to the current value If a wait for condition is not encoun tered then a jump is made to the end of the costatement 4 and on the next pass of the loop when the execution thread reaches the beginning of the costatement execution passes directly to the wait for sta
41. ddress The host would either translate the data or it would act as a proxy Each TCP IP Development Board has its own MAC address which consists of the prefix 0090C2 followed by a code that is unique to each TCP IP Development Board For exam ple a MAC address might be 0090C2C002C0 TIP You can always obtain the MAC address on your board by running the sample pro gram DISPLAY_MAC C from the SAMPLES TCPIP folder 34 TCP IP Development Kit 4 5 Dynamically Assigned Internet Addresses In many instances devices on a network do not have fixed IP addresses This is the case when for example you are assigned an IP address dynamically by your Internet service provider ISP or when you have a device that provides your IP addresses using the Dynamic Host Configuration Protocol DHCP The RCM3700 modules can use such IP addresses to send and receive packets on the Internet but you must take into account that this IP address may only be valid for the duration of the call or for a period of time and could be a private IP address that is not directly accessible to others on the Internet These addresses can be used to perform some Internet tasks such as sending e mail or browsing the Web but it is more difficult to participate in conversations that originate elsewhere on the Internet If you want to find out this dynamically assigned IP address under Windows 98 you can run the winipefg program while you are connected and look at the interface
42. e RJ 12 jack has RAW_485 and GND which means that only one TCP IP Devel opment Board needs to be connected to an external power source via an AC adapter When doing so ensure that the AC adapter has sufficient capacity for the network each TCP IP Development Board nominally draws 100 mA at 24 VDC CAUTION If you plan to connect a power supply to more than one TCP IP Devel AN opment Board in an RS 485 network using the RJ 12 jacks rework the RS 485 cables so they do not connect RAW_RS485 through the RJ 12 jack to the boards in the network NOTE The RS 485 port is available only in the factory default configuration The RS 485 port will not be available when you select the configuration option for both 3 wire RS 232 ports or one 5 wire RS 232 port Getting Started 47 The TCP IP Development Board comes with a 220 Q termination resistor and two 680 Q bias resistors installed and enabled with jumpers across pins 1 2 and 5 6 on header JP6 as shown in Figure 8 bias termi nation bias COKOSY ha or J7PWR 2 485 485 2 X 2S NS Figure 8 RS 485 Termination and Bias Resistors The bias and
43. e mail ser vices e FTP File Transfer Protocol server and client application protocol part of the TCP IP protocol stack used for transferring files between network nodes Server with password support for file transfers between network nodes available on the Rabbit 2000 e TFTP Trivial File Transfer Protocol server and client simplified version of FTP that allows files to be transferred from one computer to another over a network e POP3 Post Office Protocol client e Serial to Telnet gateway Additional TCP IP capabilities are added on an ongoing basis 2 TCP IP Development Kit 1 2 Physical and Electrical Specifications Table 1 lists the basic specifications for the TCP IP Development Board Table 1 TCP IP Development Board Specifications Specification Data Power Supply 9 V to 40 V DC Board Size with optional 4 30 x 4 71 x 0 79 backup battery board 109 mm x 120 mm x 20 mm Environmental 40 C to 70 C 5 95 humidity noncondensing The TCP IP Development Board has 15 pins on header J7 one RJ 12 jack for RS 232 or RS 485 serial communication and one RJ 45 Ethernet jack The pinouts are shown in Figure 1 Ssh RS 485 3 wire RS 232 two 3 wire RS 232 one 5 wire RS 232 J7 RJ 12 Z COM JACK RJ 12 Z COM JACK RJ 12 Z COM JACK a SVLSVEOESSDYPVSVAs SKSKSVVSRDIGOVSVAS SCSKPVLEVOVJOVSQ
44. ector Do not use the DIAG connector which is used for a normal serial connection Connect the other end of the programming cable to a COM port on your PC NOTE Some PCs now come equipped only with a USB port If your PC has no RS 232 COM port but has a USB port you should buy an RS 232 USB converter from Z World s Web store _ Install a J2 4X20LCD 4 rubber feet at corners R7 1 amr Sy a O 175 0206 shown SCs 3 Some components BACKUP BATTERY o o are laid out slightly differentlyon older versions To PC COM port ovia N Colored side LNK LED down ACT LED
45. eeeeee 55 electrical oo eeeeseeeeeees 57 mechanical dimensions 56 temperature oo eeeeeeeee 57 spectrum spreader s s s 28 stack WALIWA nies 13 STDIO window ccceeees 13 T TCP IP connections 29 31 1l0Base ndr iis 32 additional resources 41 Ethernet cables 32 IP addresses cccccceceees 33 Steps iro as doostveien 29 TCP IP primer ou eee eeeeeeeee 32 W watch WINdOW o eeeeesecessecssseenseeeeees 13 windows assembly ce eeeeeeeeeeeeeees 13 TE QISCET 3 cilecccssivedevass reesi 13 StaCK 4220 deveined 13 STDIO nanen nnn 13 Wathen eai 13 76 TCP IP Development Kit SCHEMATICS 090 0095 TCP IP Development Board Schematic www rabbitsemiconductor com documentation schemat 090 0095 pdf 090 0042 Demonstration Board Schematic www rabbitsemiconductor com documentation schemat 090 0042 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 latest schematics directly Getting Started 77
46. eeeeeeaeeseeeaeeseesees 56 A 2 Jumper Configurations ccccccescessesscesseesceseescecaeeesecseesaecseceaecnecsaeeeeceseeeceseseeeeaeeaeecaeeaecsecsseneenaees 58 A 3 Conformal Coating inisieer ieia iiti i E EE Da ease cod eccevsne dds Weise A E etd He wee hess 60 Appendix B Power Management 61 Bolo Power Supple Sron 8 es e EE Seatac eee eas eae ecw ioe te ee nei cts A ee 61 B 2 Batteries and External Battery Comnections cceccescseccesseseceseeeeceseeseeesceseeeaeeseecsecsaeeaeeeseceenaeereees 62 B22 Battery Backup Circuits e a deci Seve erated ON Ace SR LA AE A 63 Bi2 2 Powerto VRAM Switch cs ccescs as abe adtestecug iss EE E 64 Bi233 ReS t Generator ororena en i i Eeo EKER E EE OEE EET EEO EER ES 64 B 2 4 Installing Replacing the Backup Battery Board cccccescesscescesseeeceseeeeceseecseceenaeeecsseeneeeseens 65 B33 Chip Select Circi snien n e rA a oot Bae Coed EE aA ues beads at eld bas 66 Appendix C Programming Cable 69 Notice to Users 73 Index 75 Schematics 77 TCP IP Development Kit 1 OVERVIEW The TCP IP Development Kit provides a hardware platform based on the Rabbit 2000 microprocessor Dynamic c and the tools necessary to develop a robust 10Base T Ethernet appli cation 1 1 Description The TCP IP Development Kit includes a TCP IP Development Board with a Rabbit 2000 microprocessor flash memory SRAM Ethernet hardware serial ports digital I O Dynamic C development software w
47. eneral digital signal 48 TCP IP Development Kit 5 1 4 Serial Communication Software Library files included with Dynamic C provide a full range of serial communications sup port The RS232 LIB library provides a set of circular buffer based serial functions The PACKET LIB library provides packet based serial functions where packets can be delim ited by the 9th bit by transmission gaps or with user defined special characters Both libraries provide blocking functions which do not return until they are finished transmit ting or receiving and nonblocking functions which must be called repeatedly until they are finished For more information see the Dynamic C User s Manual and Technical Note 213 Rabbit 2000 Serial Port Software The following function calls are specific to the TCP IP Development Board User interface to set up up serial communication lines for the TCP IP Development Board Call this function after serXOpen PARAMETERS mode is the defined serial port configuration of the devices installed Serial Port Mode B Cc 0 RS 485 RS 232 3 wire 1 RS 232 3 wire RS 232 3 wire 2 RS 232 5 wire CTS RTS RETURN VALUE 0 if correct mode 1 if not SEE ALSO serB485Tx serB485Rx Sets pin 3 DE high to disable Rx and enable Tx SEE ALSO serMode serB485Rx Resets pin 3 DE low to enable Rx and disable Tx SEE ALSO serMode serB485Tx 5 1 4 1 Sample Serial Communication Pro
48. er of data The ping routine will ping the board four times and write a summary message on the screen describing the operation 40 TCP IP Development Kit 4 9 Running More Sample Programs With Direct Connect The programs STATIC C and SSI C SAMPLES TCPIP HTTP demonstrate how to make the TCP IP Development Board a Web server This program allows you to turn the LEDs on an attached Demonstration Board from the Tool Kit on and off from a remote Web browser As long as you have not modified the TCPCONFIG 1 macro in the sample program enter the following server address in your Web browser to bring up the Web page served by the sample program http 10 10 6 100 Otherwise use the TCP IP settings you entered in the TCP_CONFIG LIB library This should bring up the Web page served by the sample program The demo program STATIC C is a static Web page The sample program SSI C allows you to control the TCP IP Development Board from the Web browser turning the LED indicators on and off on the Demo Board attached to the main TCP IP Development Board The sample program RXSAMPLE C SAMPLES TELNET allows you to communicate with the TCP IP Development Board using the Telnet protocol To run this program edit the IP address and compile it and start it running Run the telnet program on your PC Start gt Run telnet 10 10 6 100 Each character you type will be printed in Dynamic C s STDIO window indicating that the board is receiving the characters
49. eseseseeeesecaeecaesaeecaecseeaeenaeeaeens 15 3 3 1 Add On Modules esineen aa eae ween ee eee bee ase nee 15 3 4 Installing Dynamic Coca ses cae casketcotecccdspesnvtedtaneeahtesdasiaacteldnsh codes iavicctstecacachcacacasdateshecetestieaedeusceagencestalic 16 3 4 1 Program amp Documentation File Location ccccccceseessescecsecssececeaeeeceeceeeeeeeereeeeeaeeeeecaeeeeeeaees 16 34 2 Install ath On Dy pe sneer aiene a ense ra rie Sea EPEE EO PN OEE REPARE aa NEE aa SPA NA EEEn EEn Ea E SEENTE 17 343 Select COM Pott erener AEE EE E EE A E ch 18 BAA Desktop Icons enses eiie AERE aE KEE E RE E tous RE eee 18 3 5 Starting Dynamic G i isssissemossrorrissi eisses sorsi sond nione ri Sgene urs saei pSt Eses A EnS VASS cosas a SaS iDa EISE RE EEES taal 19 3 5 1 Communication Error Messages yic icciecscsseacacesscvacseasesdeaceses cecessees ess r asise testan sii tie reies iiis 19 Bs PONG Crerar ae a a e S E E 20 3 7 Sample Programs scenene i E E E E E E E EE iS 21 3 7 1 Running Sample Program DEMOBRDL C sssssssssssssssssssssesersreresresrestsresreseserstssesesessesessrereseese 21 31 2 Sin gle Steppine serene osese ENa EE EET EEEE EEE taeda 23 3 1 2 1 WatchsEXpressiOmiy isessenssscsessnsscniceseiacedissnsigsigaesdoasecnsegaisupedsigescionss EREA E ASTANE REEERE 23 3 7 2 2 Break Pointas a a O E teee 23 3 1 23 Editing the Program 2 ciscsiesteucisccsseanidesieviesemeseegussunnsphatastanasiveesisiaticlaviaedtaseaeiedaeascesstatsianeens 24
50. for providing CE approved surge lighting protection Rabbit Semiconductor recommends placing digital I O or analog cables that are 3 m or longer in a metal conduit to assist in maintaining CE compliance and to conform to good cable design practices When installing or servicing the TCP IP Development Board it is the responsibility of the end user to use proper ESD precautions to prevent ESD damage to the TCP IP Development Board Safety All inputs and outputs to and from the TCP IP Development Board must not be con nected to voltages exceeding SELV levels 42 4 V AC peak or 60 V DC The lithium backup battery circuit on the TCP IP Development Board has been designed to protect the battery from hazardous conditions such as reverse charging and excessive current flows Do not disable the safety features of the design 1 5 2 Interfacing the TCP IP Development Board to Other Devices Since the TCP IP Development Boards are designed to be connected to other devices good EMC practices should be followed to ensure compliance CE compliance is ultimately the responsibility of the integrator Additional information tips and technical assistance are available from your authorized Rabbit Semiconductor distributor and are also available on the Z World Web site at www zworld com TCP IP Development Kit 2 HARDWARE CONNECTIONS Chapter 2 explains how to connect the power supply to the TCP IP Development Board and how to connect the program
51. ftware function call must also be set to match the hardware configuration being used Table 2 a Serial Communication Configurations Version 175 0188 Rev A amp B Item Factory One eee Two 3 wire RS 232 One 5 wire RS 232 R58 R60 In Out Out R61 R62 Out In In U10 In Out Out 37 3 amp J5 3 RS 485 TxB TxB J1 4 amp J5 4 RS 485 RxB RxB 17 6 TxC TxC RTS 77 7 RxC RxC CTS 44 TCP IP Development Kit Version 175 0188 Rev C The RS 232 transceiver may be used as a 5 wire RS 232 channel or as two 3 wire RS 232 channels at the expense of the RS 485 channel which is connected through 0 Q surface mounted resistors at R82 and R83 as shown in Figure 7 b R82 and R83 shown in Figure 7 b must be removed when configuring the TCP IP Development Board for either one 5 wire RS 232 or two 3 wire RS 232 U10 and the associated bias and termination resistors R58 R59 and R60 must also be removed but R82 and R83 are left installed if you wish the TxB and RxB RS 232 signals to be available on header J5 mso oe EA Ej 33338 esy LSH Factory Default RS 232 3 wire RS 485 RS 232 5 wire or two RS 232 No RS 232 on J5 eeu Joy R58 I
52. grams RS 232 Getting Started 49 1 Connect RX to TX as shown in Figure 9 below TCP IP DEVELOPMENT BOARD Dia KEYPAD Figure 9 TCP IP Development Board Setup for RS 232 Serial Communication Demonstration 2 Connect the programming cable to header J4 on the TCP IP Development Board Apply power to the TCP IP Development Board 3 Open the sample program SAMPLES ICOM ICOM232 C and press F9 This program demonstrates a simple RS 232 loopback displayed in the Dynamic C STDIO window 50 TCP IP Development Kit RS 485 1 Connect 485 to 485 485 to 485 and GND to GND as shown in Figure 10 below If you do not have a separate wall transformer for the other board also connect PWR to PWR as shown in Figure 10 TCP IP DEVELOPMENT BOARD ENET J6 KEYPAD QYdAJA 9 JANA TCP IP DEVELOPMENT BOARD Figure 10 TCP IP Development Board Setup for RS 485 Serial Communication Demonstration 2 Connect the programming cable to header J4 on one TCP IP Development Board This will be the slave the other board will be the master Apply power to the TCP IP Development Boards 3 Open the sample program SAMPLES ICOM ICOM485 C You will find some code for the master and some code for the slave Copy and save the master and slave versions separately 4 Open t
53. he CS1 voltage is high Q6 will conduct It takes time for the transistors to turn on creating a propagation delay This delay is typically very small about 10 ns to 15 ns The signal that turns the transistors on is a high on the processor s reset line RES When the TCP IP Development Board is not in reset the reset line will be high turning on n channel Q5 and Q7 Q7 is a simple inverter needed to turn on Q6 a p channel MOSFET When a reset occurs the RES line will go low This will cause C14 to discharge through R32 and R34 This small delay about 160 us ensures that there is adequate time for the processor to write any last byte pending to the SRAM before the processor puts itself into a reset state When coming out of reset CS will be enabled very quickly because D1 con ducts to charge capacitor C14 Getting Started 67 68 TCP IP Development Kit APPENDIX C PROGRAMMING CABLE Appendix C provides additional information for the Rabbit 2000 microprocessor when using the DIAG and PROG connec tors on the programming cable The PROG connector is used only when the programming cable is attached to the program ming connector header J4 while a new application is being developed Otherwise the DIAG connector on the programming cable allows the programming cable to be used as an RS 232 to CMOS level converter for serial communication which is appropriate for monitoring or debugging an Intellicom system while it is run
54. he programming port The RESET line and the SMODE1 and SMODED pins are not connected to this connector The programming port is then enabled as a diagnostic port by polling the port periodically to see if communication needs to begin or to enable the port and wait for interrupts The pull up resistors on RXA and CLKA prevent spurious data reception that might take place if the pins floated If the clocked serial mode is used the serial port can be driven by having two toggling lines that can be driven and one line that can be sensed This allows a conversation with a device that does not have an asynchronous serial port but that has two output signal lines and one input signal line The line TXA also called PC6 is zero after reset if the cold boot mode is not enabled A possible way to detect the presence of a cable on the programming port is for the cable to connect TXA to one of the SMODE pins and then test for the connection by raising PC6 by configuring it as a general output bit and reading the SMODE pin after the cold boot mode has been disabled The value of the SMODE pin is read from the SPCR register 70 TCP IP Development Kit Once you establish that the programming port will never again be needed for program ming it is possible to use the programming port for additional I O lines Table C 1 lists the pins available for this alternate configuration Table C 1 TCP IP Development Board Programming Port Pinout Configurations
55. he sample slave program and press F9 5 Connect the programming cable to header J4 on the master TCP IP Development Board 6 Open the master program and press F9 This program demonstrates a simple RS 485 transmission of lower case letters to a slave The slave will send back converted upper case letters back to the master which then dis plays them in the Dynamic C STDIO window Getting Started 51 5 2 Digital I O 5 2 1 Digital Inputs Pins 8 11 on header J7 have the four digital inputs INO IN3 Each of the four digital 0 V to 5 V inputs is protected over a range of 36 V to 36 V The TCP IP Development Board is factory configured for the digital inputs to be pulled up to 5 V but the digital inputs can also be pulled down by moving the surface mounted jumper at JP4 The jumper set tings and the location of JP4 are shown in Figure 11 D10 D11 A am iz g aa ABRT3 CA
56. hrough a simple change to the following BIOS line in a way that is similar to the clock doubler described above define ENABLE_SPREADER 1 Set to 0 to disable spectrum spreader 1 to enable normal spreading or 2 to enable strong spreading NOTE The strong spectrum spreading setting is unnecessary for the TCP IP Develop ment Board There is no spectrum spreader functionality for TCP IP Development Boards that do not carry the CE mark or when using any TCP IP Development Kit with a version of Dynamic C prior to 7 30 28 TCP IP Development Kit 4 USING THE TCP IP FEATURES Chapter 4 provides an introduction to using the TCP IP features on your TCP IP Development Board 4 1 TCP IP Connections Before proceeding you will need to have the following items e If you don t have Ethernet access you will need at least a 10Base T Ethernet card available from your favorite computer supplier installed in a PC e Two RJ 45 straight through Ethernet cables and a hub or an RJ 45 crossover Ethernet cable The Ethernet cables and Ethernet hub are available from Rabbit Semiconductor in a TCP IP tool kit More information is available at www rabbitsemiconductor com 1 Connect the AC adapter and the programming cable as shown in Section 2 2 Connec tions 2 Ethernet Connections There are four options for connecting the TCP IP Development Board to a network for development and runtime purposes These connections are shown i
57. ith TCP IP stack and documentation on CD ROM not a trial version a demonstration board a power supply and a serial programming cable The TCP IP Development Board included in the kit allows for immediate evaluation and development of TCP IP applications using the Rabbit 2000 microprocessor Executable code can be downloaded into flash memory or SRAM an optional battery backup board for SRAM and the real time clock is available Two communication ports are available an RS 232 port and a RS 485 port Other features of the TCP IP Development Board include four high current outputs four digital inputs seven timers a real time battery backable clock and a 10Base T Ethernet interface 1 1 1 TCP IP Development Board Features e 18 432 MHz Rabbit 2000 Processor e 10Base T Ethernet interface e 4 high current outputs 200 mA 40 V DC e 4 digital input points 0 5 V DC nominal e RS 232 serial port e RS 485 serial port may be factory configured to second RS 232 e 512K flash memory 2 x 256K e 128K SRAM e 7 built in timers e Time date real time clock requires battery backup board available separately e Watchdog timer User s Manual 1 1 1 2 Key Benefits e Ethernet ready port to an Ethernet chip is done for the Rabbit 2000 chip e Cost effective no run time royalties e Simplified development a complete Dynamic C software package with integrated editor compiler and debugger is provided No in circuit emula
58. l it hits the break point The break point will start flashing both red and green colors Note that LED1 on the Demonstration Board is now solidly turned on This is because we have passed the statement turning on LED1 To remove the break point type F2 or select Toggle Breakpoint on the Run menu To continue program execution type F9 or select Run from the Run menu Now LED1 should be flashing again because the program is running at full speed 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 Getting Started 23 3 7 2 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 Cc Now change the number 20000 in the for statement to 10000 Then use the F9 key to recompile and run the program The LEDs will start flashing but it will flash much faster than before because you have changed the loop counter terminal value from 20000 to 10000 3 7 2 4 Watching Variables Dynamically Go back to edit mode select edit and load the program DEMOBRD2
59. macros to define the IP address assigned to the board and the IP address of the gateway if there is a gateway Instead of the TCPCONFIG macro you will see aMY_IP_ADDRESS macro and other macros define MY_IP_ADDRESS 10 10 6 170 define MY_NETMASK 255 255 255 0 define MY_GATEWAY 10 10 6 1 define MY_NAMESERVER 10 10 6 1 In order to do a direct connection the following IP addresses can be used for the TCP IP Development Board define MY_IP_ADDRESS 10 1 1 2 define MY_NETMASK 255 255 255 0 define MY_GATEWAY 10 10 6 1 define MY_NAMESERVER 10 10 6 1 In this case the gateway and nameserver are not used and are commented out The IP address of the board is defined to be 10 1 1 2 The IP address of your PC can be defined as10 1 1 1 38 TCP IP Development Kit 4 7 2 How to Set Up your Computer s IP Address for Direct Connect When your computer is connected directly to the TCP IP Development Board via an Ethernet connection you need to assign an IP address to your computer To assign the PC the address 10 10 6 101 with the netmask 255 255 255 0 do the following Click on Start gt Settings gt Control Panel to bring up the Control Panel and then dou ble click the Network icon Depending on which version of Windows you are using look for the TCP IP Protocol Network gt Dial Up Connections Network line or tab Double click on this line or select Properties or Local Area Connection gt Properties to bring
60. ms being developed are downloaded to and executed from the target system via an enhanced serial port connection Program development 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 can be executed and debugged interactively at the source code or machine code level Pull down menus and keyboard shortcuts for most commands make Dynamic C easy to use Dynamic C also supports assembly language programming It is not necessary to leave C or the development system to write assembly language code C and assembly lan guage may be mixed together Debugging under Dynamic C includes the ability to use printf commands watch expressions breakpoints and other advanced debugging features Watch expressions can be used to compute C expressions involving the target s program variables or func tions Watch expressions can be evaluated while stopped at a breakpoint or while the target is running its program Getting Started 13 e Dynamic C provides extensions to the C language such as shared and protected vari ables costatements and cofunctions that support real world embedded system devel opment Interrupt service routines may be written in C Dynamic C supports cooperative and preemptive multi tasking e Dynamic C comes with many function libraries all in source code These libraries sup port
61. n Figure 6 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 of these options for initial development e No LAN The simplest alternative for desktop development Connect the TCP IP Development Board s Ethernet port directly to the PC s network interface card using an RJ 45 crossover cable A crossover cable is a special cable that flips some connections between the two connectors and permits direct connection of two client systems A standard RJ 45 network cable will not work for this purpose e Micro LAN Another simple alternative for desktop development Use a small Ethernet 10Base T hub and connect both the PC s network interface card and the TCP IP Development Board s Ethernet port to it using standard network cables Getting Started 29 3 The following options require more care in address selection and testing actions as conflicts with other users servers and systems can occur LAN Connect the TCP IP Development Board s Ethernet port to an existing LAN preferably one to which the development PC is already connected You will need to obtain IP addressing information from your network administrator WAN The TCP IP Development Board is capable of direct connection to the Inter net and other Wide Area Networks but exceptional care should be used with IP address settings and all netw
62. net Ethernet TCP IP Dev Typical Corporate Network Board If your system administrator can give you an Ethernet cable along with its IP address the netmask and the gateway address then you may be able to run the sample programs with out having to set up a direct connection between your computer and the TCP IP Develop ment 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 36 TCP IP Development Kit 4 7 Running TCP IP Sample Programs We have provided a number of sample programs demonstrating various uses of TCP IP for networking embedded systems These programs require you to connect your PC and the TCP IP Development Board board together on the same network This network can be a local private network preferred for initial experimentation and debugging or a connection via the Internet TCP IP Dev Board N Jser s PC Ethernet ee TCP IP Dev Board Ethernet cables Fae crossover J To additional cable network Hub Direct Connection Ooy elements Network of 2 computers Direct Connection Using a Hub Getting Started 37 4 7 1 How to Set IP Addresses in the Sample Programs With the introduction of Dynamic C 7 30 we have taken steps to make it easier to r
63. ning Getting Started 69 The programming port which is shown in Figure C 1 can serve as a convenient commu nications port for field setup or other occasional communication need for example as a diagnostic port If the port is simply to perform a setup function that is write setup infor mation to flash memory then the controller can be reset through the programming port and a cold boot performed to start execution of a special program dedicated to this func tionality PROGRAMMING PORT PIN ASSIGNMENTS Rabbit PQFP pins are shown in parenthesis mies STATUS output 38 soko SMODEO 36 GND 50 kQ SMODE1 35 GND Programming Port Pin Numbers 50 kQ m TERANO E E 30 4 2 GND ET ie ok a a ae 10 KQ Sd DERESE T UR lt 3 ESAS r 6 TXA 54 T 8 9 0 Figure C 1 Programming Port Pin Assignments When the PROG connector is used the RESET line can be asserted by manipulating DTR and the STATUS line can be read as DSR on the serial port The target can be restarted by pulsing reset and then after a short delay sending a special character string at 2400 bps To simply restart the BIOS the string 80h 24h 80h can be sent When the BIOS is started it can tell whether the programming cable is connected because the SMODE and SMODEO pins are sensed as being high Alternatively the DIAG connector can be used to connect t
64. oose which components are installed This choice is useful to install or reinstall just the documentation Getting Started 17 3 4 3 Select COM Port Dynamic C uses a COM serial port to communicate with the target development system The installation allows you to choose the COM port that will be used Dynamic C SE for Rabbit 2000 TCP IP Development Kit Version 7 04T2 Setup Type Choose the setup type that best suits your needs a Choose COM Port InstallShield lt Back Cancel The default selection as shown in the example above is COM1 You may select any avail able port for Dynamic C s use If you are not certain which port is available 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 modem etc may cause temporary prob lems when Dynamic C is started 3 4 4 Desktop Icons Once your installation is complete you will have up to three icons on your PC desktop as shown below an lt 3 25 i R Dynamic C 7 03P DC 7 03P Docs DC 7 03P RFU One icon is for Dynamic C one opens the documentation menu and the third is for the Rabbit Field Utility a tool used to download precompiled software to a target system 18 TCP IP Development Kit 3 5 Starting Dynamic C Once the TCP IP Development Board is set up and connected as described in Chap
65. opment Kit 5 1 1 RS 232 The TCP IP Development Board s RS 232 serial channel is connected to an RS 232 trans ceiver U11 U11 provides the voltage output slew rate and input voltage immunity required to meet the RS 232 serial communication protocol Basically the chip translates the Rabbit 2000 s 0 V to Vcc signals to RS 232 signal levels Note that the polarity is reversed in an RS 232 circuit so that 5 V is output as approximately 10 V and 0 V is out put as approximately 10 V U11 also provides the proper line loading for reliable commu nication The maximum baud rate is 115 200 bps RS 232 can be used effectively at this baud rate for distances up to 15 m 5 1 2 RS 485 The TCP IP Development Board has one RS 485 serial channel which is connected to the Rabbit 2000 Serial Port B through U10 an RS 485 transceiver The chip s slew rate limit ers provide for a maximum baud rate of 250 000 bps which allows for a network of up to 1200 m or 4000 ft The half duplex communication uses the Rabbit 2000 s PCO pin to control the data enable on the communication line The RS 485 signals are available on pins 3 and 4 of header J7 and on J5 the RJ 12 jack The TCP IP Development Board can be used in an RS 485 multidrop network Connect the 485 to 485 and 485 to 485 using single twisted pair wires nonstranded tinned Alternatively the RS 485 multidrop network may be hooked up using cables with RJ 12 plugs Note that th
66. ork related programming and development We recommend that development and debugging be done on a local network before connecting a TCP IP Development Board to the Internet TIP Checking and debugging the initial setup on a micro LAN is recommended before connecting the system to a LAN or WAN The PC running Dynamic C does not need to be the PC with the Ethernet card Apply Power Plug in the AC adapter The TCP IP Development Board is now ready to be used NOTE A hardware RESET is accomplished by unplugging the AC adapter then plug ging it back in When working with the TCP IP Development Board the green LNK light is on when a program is running and the board is properly connected either to an Ethernet hub or to an active Ethernet card The red ACT light flashes each time a packet is received 30 TCP IP Development Kit J2 4X20LCD 1 To PC COM port PC with 5 N Colored side To 10Base T Ethernet card Ethernet card Crossover cable gs 58 8 2 g KEYPAD
67. our version by examining the diagrams below to find the one that matches your board Version 175 0188 Rev A amp B The RS 232 transceiver may be used as a 5 wire RS 232 channel or as two 3 wire RS 232 channels at the expense of the RS 485 channel by adding 0 Q surface mounted resistors at R61 and R62 as shown in Figure 7 a The RS 485 chip U10 and the associated bias and termination resistors R58 R59 and R60 shown in Figure 7 must be removed when con figuring the TCP IP Development Board for either one 5 wire RS 232 or two 3 wire RS 232 a 485 TxB Ree fUn gs o i J7 3 amp J5 3 gC Ega Bee i oe oa k g TxC RTS 7 ER ie R61 E 485 RxB B En J7 4 amp J5 4 oQ RxC CTS 1 97 7 DD Y2 R 51 R52 C30 RS 232 3 wire RS 232 5 wire amp RS 485 or two RS 232 rm 485 TxB Default oS Roles il 175 0188 485 RxB R58 P R58 Rev A amp B J5 4 g R60 al m ilo Serial Options Figure 7 a RS 232 RS 485 Serial Communication Options Table 2 a summarizes the options Note that the parameters in the serMode so
68. ower Supply Schematic Capacitor C28 provides surge current protection for the voltage regulator and allows the external power supply to be located some distance away from the TCP IP Development Board A switching power regulator is used The input voltage range is from 9 V to 40 V Getting Started 61 B 2 Batteries and External Battery Connections A battery board with a 1000 mA h lithium coin cell is available to provide power to the real time clock and SRAM when external power is removed from the circuit This allows the TCP IP Development Board to continue to keep track of time and preserves the SRAM memory contents Figure B 2 shows the battery board circuit J1 J2 VBAT 1 2 VIN VBAT 2 1 GND AeA e 3 4 GND 4 3 VIN Figure B 2 Battery Board Circuit Alternatively starting with the 175 0206 version of the TCP IP Development Board there is provision to add a soldered in battery directly on the TCP IP Development Board The drain on the battery is typically less than 20 pA when there is no external power applied The battery can last more than 5 years 1000 mA h 20 uA The drain on the battery is typically less than 4 uA when external power is applied The battery can last for its full shelf life 1000 mA h 4 uA 5 7 years 28 5 years shelf life 10 years Since the shelf life of the battery is 10 years the battery can
69. r consumption This powerdown mode is activated by raising the chip select CS signal line Normally the SRAM requires Vcc to operate However only 2 V is required for data retention in powerdown mode Thus when power is removed from the circuit the battery voltage needs to be provided to both the SRAM power pin and to the CS signal line The CS control circuit accomplishes this task for the CS signal line In a powered up condition the CS control circuit must allow the processor s chip select signal CS1 to control the SRAM s CS signal CSRAM So with power applied CSRAM must be the same signal as CS1 and with power removed CSRAM must be held high but only needs to be battery voltage high Q5 and Q6 are MOSFET transistors with opposing polarity They are both turned on when power is applied to the circuit They allow the CS signal to pass from the processor to the SRAM so that the processor can peri odically access the SRAM When power is removed from the circuit the transistors will turn off and isolate CSRAM from the processor The isolated CSRAM line has a 100 KQ pullup resistor to VRAM R29 This pullup resistor keeps CSRAM at the VRAM voltage level which under no power condition is the backup battery s regulated voltage at a little more than 2 V 66 TCP IP Development Kit Transistors Q5 and Q6 are of opposite polarity so that a rail to rail voltage can be passed When the CS1 voltage is low Q5 will conduct When t
70. rd Jumper Configurations Factory Header Description Pins Connected Default 1 2 128K x JP1 SRAM Size 2 3 512K None 32K 1 2 128K 256K x JP2 Flash 1 Memory Size U5 2 3 512K 1 2 128K 256K x JP3 Flash 2 Memory Size U6 2 3 512K Digital Input Pull Up Pull Down 2 Pulled up x l Resistors 2 3 Pulled down 1 2 Normal Mode x JPS Flash Memory Bank Select Bank Mode 3 2 Bias and termination resistors x 6 1 RS 485 Bias and Termination 5 6 connected Resistors JP6 Bias and termination resistors not connected RS 232 TxB RxB also TxC RxC or RTS CTS signals on J7 RS 232 TxC RxC and x 3 4 JP7 RS 232 RS 485 Select g g RE 6 RS 485 signals on J7 5 6 RS 232 TxB RxB signals on J5 U10 must be removed NOTE Only headers JP6 and JP7 use actual jumpers The other connections are made using 0 Q surface mounted resistors Getting Started A 3 Conformal Coating The areas around the crystal oscillator and the battery backup circuit on the TCP IP Development Board have had the Dow Corning silicone based 1 2620 conformal coating applied The conformally coated areas are shown in Figure A 3 The conformal coating protects these high impedance circuits from the effects of moisture and contaiminants over time are J2_4X20LCD 4 ooooo0o0o oOo OOo
71. s secscsavisctes oc becies ease vel via EE E NE E ERA ERE RG 40 4 9 Running More Sample Programs With Direct Conmect cceccecceescesseeseeceseeceeeeeceeceseeseceseneeneenaees 41 4 10 Where D T Go From Here nicaieri ionni ste vdacu losses Sousd gcse vensbagelsbcsestiaiet sola i a sie D 41 Chapter 5 Serial Ports and Digital I O 43 5 1 Seral Communication enora pare EEE EAEE Sacto buen EEN aden ds E ees 44 DEPT ORS 5 D3 P A A PEE NE E L RA S Mara ie aco unas ea a as ana CR 47 A RE a n aN N S E T neoibecnenssadevensnunedvuncerdvectenseredetvenetets tess 47 51 3 Programming Portis ceneo E E E A EAE A EE EA A R Tins 48 5 1 4 Serial Communication Software cccccscesccessssssescseeeesceseeesecseeesecaeesaecseceaeceecsaeneesesesesenesereneeenes 49 5 1 4 1 Sample Serial Communication Programs cccccecceeseesseeceeeeseecseceeecaecsseeeecsecsseeeeneenaeens 49 DD DI Gita UO ERE sh Aon ash E E E EET ENE E E EEEE 52 5 2 l Digital Inputs eiei goiti a a E E A EEE TN TR EEE ew 52 9 222 Digital Outputs a E E E E ese eee Bees 52 5 2 3 Digital I O Software sence src ssctcos Ca esesceces chet edie ae tevas Ree Pa aeesies on oth ease Bio aes 53 5 2 4 Sample Digital I O Programs ccceccccccesesseceseeeceeceeeecececaeeesecaecsnecseceaecaecsaeeaeceseneseneenreaeeses 53 Appendix A TCP IP Development Board Specifications 55 A l Electrical and Mechanical Specifications ccceeccescesseesceseeesceseeesecaeesseeseeeceseseeces
72. s 4 protected to 36 V DC Digital Outputs 4 open collector sinking 200 mA 40 V DC max Speaker Output Software adjustable volume and frequency 3 serial ports e one 5 V CMOS compatible programming port Serial Ports e either two RS 232 3 wire one RS 485 and one RS 232 3 wire or one RS 232 5 wire Serial Rat Max burst rate CLK 32 Max sustained rate Burst 2 Connectors 15 screw terminals 1 RJ 12 and 1 RJ 45 Real Time Clock Yes 5 eight bit timers four cascadable from the first and one Amery 10 bit timer with two match registers Watchdog Supervisor Yes Power 9 40 V DC 2 4 W backlighting on Operating Temperature 0 C to 50 C Storage Temperature 20 C to 60 C Humidity 5 to 95 noncondensing Board Size with backup battery board 4 30 x 4 71 x 0 80 109 mm x 120 mm x 20 3 mm Enclosure Size 5 7 x 6 7 x 2 0 145 mm x 170 mm x 51 mm Table A 1 lists the electrical mechanical and environmental specifications for the TCP IP Development Board Getting Started 57 A 2 Jumper Configurations Figure A 2 shows the header locations used to configure the various TCP IP Development Board options via jumpers J2_4X20LCD 1 Figure A 2 Location of TCP IP Development Board Configurable Positions 58 TCP IP Development Kit Table A 2 lists the configuration options Table A 2 TCP IP Development Boa
73. s shown in Figure 7 c The jumper configurations are shown in Figure 7 c alta i wf Un D al g TxC RTS 1 J7 6 13 KORAN RxC CTS 8 genn ET 485 RxB 3 J7 4 J7 3 m 0 Emo o a A fos oa 3 X lt RS 232 3 wire RS 232 5 wire RS 485 or two RS 232 JP7 o f 3 Ly 1 485 TxB J5 3 485 RxB J5 4 on J5 Nk OD No RS 232 Serial Options 175 0206 Figure 7 c RS 232 RS 485 Serial Communication Options Table 2 c summarizes the options Note that the parameters in the serMode software function call must also be set to match the hardware configuration being used Table 2 c Serial Communication Configurations Version 175 0206 ten Factory One 3 wire RS 232 Two 3 wire One 5 wire RS 232 Default amp RS 485 RS 232 RS 232 on J5 rarer an an Header JP6 ae a T ae U10 In In In Out J7 3 RS 485 TxB TxB J7 4 RS 485 RxB RxB J7 6 TxC TxC RTS TxC or RTS J7 7 RxC RxC CTS RxC or CTS J5 3 RS 485 TxB J5 4 RS 485 RxB 46 TCP IP Devel
74. se This Mati ball oo cis sed ccexcvadt igeded neces dun davceevscwbv ecu ener oia EEE EESTE E EESE ENTERS ona 5 1 4 1 Additional Reference Information ccccccceescessscessecsscecsseeeeeecseceeecseeesseeeeeeceeseseesseecsseeeaseenees 5 1 4 2 Using Online Documentation oj se czesccsseccecesteanscadescaese coe vvacasecinesva careesreecdsiadeuesceisecustens seeeeeneseencsee 5 1 5 CE Compliance iseni E E acini E EE EEE EA nae 7 L531 Design Guide lames sssrinin einne aE e ENERET SER N Sant 8 1 5 2 Interfacing the TCP IP Development Board to Other Devices ceceseseesceecseeeeeneeseeeeeeceaeees 8 Chapter 2 Hardware Connections 9 2 1 Development Kit Contents asics sscssscstscavsisct sea ivcegeseensetenon sckastesesncelvceesavn sth osessenscdanevenesebietoumnscaaebenenes 9 2 Di COMME CU ONS serrera rena rE a nE AEE OE ER AA Ea Ee EEEa Era E ERAR PEAR 10 23 Where Do1 Go From Here esrenierasa er RE 12 2 3 1 Technical SUpport siressa erie reren aE EEEE RERA E E EER ENEE Eeti EE EARE ERRE 12 Chapter 3 Installing Dynamic C 13 3 1 An Overview of Dymamie Cesenesiesisne iiine a E RE R EEE EE TE EEEE E Ein 13 3 2 System Requirement c ccccceccesssescescessceseceseeeceseeseceseeeecsecseecaecsaecseceaessecaessseseeseseeseseceeeseseenaees 14 3 2 1 Hardware Requirement s cis csisussievstesasstestececeecenceteateeta ceevs ated sats edie EEEE E ai 14 3 3 Upgrading Dynamic C o ececeecceccesscessessessceseeeseeseecseceaesaecssesaecuecssesaecaesa
75. tement Once 200 ms has passed the statement after the waitfor is executed The costatement has the property that it can wait for long periods of time but not use a lot of execution time Each costatement is a little program with its own statement pointer that advances in response to conditions On each pass through the big loop as little as one statement in the costatement is executed starting at the current posi tion of the costatement s statement pointer Consult the Dynamic C User s Manual for more details The second costatement in the program debounces the switch and maintains the variable vswitch Debouncing is performed by making sure that the switch is either on or off for a long enough period of time to ensure that high frequency electrical hash generated when the switch contacts open or close does not affect the state of the switch The abort state ment is illustrated at 5 If executed the internal statement pointer is set back to the first statement within the costatement At 6 a use for a shadow register is illustrated A shadow register is used to keep track of the contents of an I O port that is write only it can t be read back If every time a write is made to the port the same bits are set in the shadow register then the shadow register has the same data as the port register In this case a test is made to see the state of the LED and make it agree with the state of vswitch This test is not strictly necessary the o
76. ter 2 and Dynamic C has been installed start Dynamic C by double clicking on the Dynamic C icon Dynamic C defaults to using the serial port on your PC that you specified during installation If the port setting is correct Dynamic C should detect the TCP IP Develop ment Board and go through a sequence of steps to cold boot the TCP IP Development Board and to compile the BIOS Some versions of Dynamic C will not do the initial BIOS compile and load until the first time you compile a program If you receive the message beginning BIOS successfully compiled you are ready to continue with the sample programs in the next chapter 3 5 1 Communication Error Messages If you receive the message No Rabbit Processor Detected the programming cable may be connected to the wrong COM port a connection may be faulty or the target system may not be powered up First check both ends of the programming cable to ensure that it is firmly plugged into the PC and the programming port If there are no faults with the hardware select a different COM port within Dynamic C From the Options menu select Communications Select another COM port from the list then click OK Press lt Ctrl Y gt to force Dynamic C to recompile the BIOS If Dynamic C still reports it is unable to locate the target system repeat the above steps until you locate the active COM port You should receive a Bios compiled successfully message once this step is completed successfully
77. that you use version 4 0 or later e Print only the sections you will need to refer to often e Print manuals overnight when appropriate to keep from tying up shared resources dur ing the work day e If your printer supports duplex printing print pages double sided to save paper and increase convenience NOTE If you do not have a suitable printer or do not want to print the manual yourself most retail copy shops e g Kinkos AlphaGraphics etc will print the manual from the PDF file and bind it for a reasonable charge about what we would have to charge for a printed and bound manual 6 TCP IP Development Kit 1 5 CE Compliance Equipment is generally divided into two classes CLASS A CLASS B Digital equipment meant for light industrial use Digital equipment meant for home use Less restrictive emissions requirement less than 40 dB V m at 10 m 40 dB relative to 1 wV m or 300 V m More restrictive emissions requirement 30 dB uV m at 10 m or 100 pV m These limits apply over the range of 30 230 MHz The limits are 7 dB higher for frequencies above 230 MHz Although the test range goes to 1 GHz the emissions from Rabbit based systems at frequencies above 300 MHz are generally well below background noise levels The TCP IP Development Board has been tested and was found to be in conformity with the following applicable immunity and emission stan dards Boards that are CE compliant have the CE mark
78. thernet connections 29 31 JP7 ree select 59 CE compliance IP addresses cccceeeeeees 32 jumper locations aiai 58 design guidelines 8 MAC addresses 05 34 chip select circuit 0 000 66 SEEPS oeeeeeseeeeeeeeeteeeteeeees 29 30 L compilation Kee ee ae 13 F libraries A rsrenent 14 i real time programming 14 SPCOd sciatic ails 13 14 function libraries 14 mee Sane eg ee ee ee eee mae ac linking sorisa 13 compiling oo eee eee eee 13 connections H M Ethernet cable 0 31 h D ia 48 MAC addresses 0 0 eeeeeeeeees 34 EEE K debugger seseesseeeseseeseeee 13 l debugging 0 ecco 13 1 0 bi 4 pinout assembly level view 13 Pinout annie a i4 programming port 70 Demonstration Board 9 BANGED SIGS TOUUNES zr power management 61 wire assembly eesse 9 IP addresses ss00 s 33 39 power supplies ceee 61 Development Kit how tO Set ssessoseeressseee 38 battery backup 6 62 Demonstartion Board 9 how to set PC IP address 39 battery backup circuit 63 wire assembly c000 9 battery life oe 62 digital inputs 2 0 0 0 eee 52 chip select circuit 66 pullup pulldown configura VRAM switch oe 64 THON EA 52 programming digital outputs eee 52 programming port 48 SINKING oe eee eeeeeeeteeeteeees 52 real time nsee 1
79. tops are designed to be connected and disconnected and will present the least problem If your PC boots from the network or is dependent on the net work for some or all of its disks then it probably should not be disconnected If a second Ethernet adapter is used be aware that Windows TCP IP will send messages to one adapter or the other depending on the IP address and the binding order in Microsoft prod ucts Thus you should have different ranges of IP addresses on your private network from those used on the corporate network If both networks service the same IP address then Windows may send a packet intended for your private network to the corporate network A similar situation 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 TCP IP Development Board uses a 10Base T type of Ethernet connection which is the most common scheme The RJ 45 connectors are similar to U S style telephone con nectors are larger and have 8 contacts An alternative to the direct connection using a crossover cable is a direct connection using a hub The hub relays packets received on any port to all of the ports on the hub Hubs are low in cost and are
80. tor is required e A head start sample programs including HTTP Web server and SMTP mail client provide an advanced starting point for development e Quick development time full hardware reference schematics help reduce develop ment efforts 1 1 3 TCP IP Capabilities e Socket Level TCP Transmission Control Protocol provides reliable full duplex data transmission e Socket Level UDP User Datagram Protocol simple protocol exchanges datagrams without acknowledgements or guaranteed delivery e ICMP Internet Control Message Protocol network layer Internet protocol that reports errors and provides other information relevant to IP packet processing e DNS Domain Name System client a distributed Internet directory service that is used mostly to translate between domain names and IP addresses and to control Inter net e mail delivery e DHCP Dynamic Host Configuration Protocol client provides a framework for pass ing configuration information to hosts on a TCP IP network DHCP is based on the Bootstrap Protocol BOOTP adding the capability of automatic allocation of reusable network addresses and additional configuration options e HTTP Hypertext Transfer Protocol server the protocol used by Web browsers and Web servers to transfer files such as text and graphic files Includes facilities for Server Side Includes SSI and CGI routines e SMTP Simple Mail Transfer Protocol client Internet protocol providing
81. un many of our sample programs You will see a TCPCONFIG macro This macro tells Dynamic C to select your configuration from a list of default configurations You will have three choices when you encounter a sample program with the TCPCONFIG macro 1 You can replace the TCPCONFIG macro with individual MY_IP_ADDRESS MY_NETMASK MY_GATEWAY and MY_NAMESERVER macros in each program 2 You can leave TCPCONF1IG at the usual default of 1 which will set the IP configurations to 10 10 6 100 the netmask to 255 255 255 0 and the nameserver and gateway to 10 10 6 1 If you would like to change the default values for example to use an IP address of 10 1 1 2 for the TCP IP Development Board and 10 1 1 1 for your PC you can edit the values in the section that directly follows the General Configuration comment in the TCP_CONF IG 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 library in the LIB TCPIP directory 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_CONF IG LIB library in the LIB TCPIP directory More information is available in the Dynamic C TCP IP User s Manual IP Addresses Before Dynamic C 7 30 Most of the sample programs use
82. utput regis ter could be set every time to agree with vswitch but it is placed here to illustrate the con cept of a shadow register To illustrate the use of snooping use the watch window to observe vswitch while the program is running Add the variable vswitch to the list of watch expressions Then tog gle vswitch and the LED Then type lt Ctrl U gt to observe vswitch again 3 7 4 Advantages of Cooperative Multitasking Cooperative multitasking as implemented with language extensions has the advantage of being intuitive Unlike preemptive multitasking variables can 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 that the biggest problem would be response time because of the big loop time becoming long as the program grows Our solution for that is a device caused slicing that is further described in the Dynamic C User s Manual Getting Started 27 3 8 Spectrum Spreader TCP IP Development Boards that carry the CE mark have a Rabbit 2000 microprocessor that features a spectrum spreader which helps to mitigate EMI problems By default the spectrum spreader is on automatically for TCP IP Development Boards that carry the CE mark when used with Dynamic C 7 32 or later versions but the spectrum spreader may also be turned off or set to a stronger setting The means for doing so is t
83. ynamic C Samples directory The various subdi rectories contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries The sample program PONG C demonstrates the output to the STDIO window The ICOM and TCPIP folders provide sample programs specific to the TCP IP Development Board The sample programs illustrate the topics associated with the TCP IP Development Board See An Introduction to TCP IP for more information on these topics Each sample program has comments that describe the purpose and function of the program 3 7 1 Running Sample Program DEMOBRD1 C This sample program will be used to illustrate some of the functions of Dynamic C Before running this sample program you will have to connect the Demonstration Board from the TCP IP Development Kit to the TCP IP Development Board Proceed as follows 1 Use the wires included in the TCP IP Development Kit to connect header J1 on the Demonstration Board to header J7 on the TCP IP Development Board The connections are shown in Figure 4 2 Make sure that your TCP IP Development Board is connected to your PC and that the power supply is connected to the TCP IP Development Board and plugged in as described in Section 2 2 TCP IP DEVELOPMENT BOARD Ly Db ow KEYPAD TCP IP Development Board Demonstration Board Header J7 Header J1 PWR 5V mmm GND GND 4 10 Sw1 e vo e
Download Pdf Manuals
Related Search
Related Contents
HappyPress - HappyFabric Enterasys Securestack B3 48 port Jasco 17419 Instruction Manual Vitro-grill Professional USER GUIDE Camera Adaptor Imation 4GB Micro Hard Drive KitchenAid KGCV465 User's Manual FCB1010 manual Falk® Orange Peel • Proteções para eixos rotativos Copyright © All rights reserved.