RabbitCore RCM3400 C-Programmable Analog Core Module with 10/100Base-T Reference Design User’s Manual 019–0122_N
RabbitCore RCM3400 User’s Manual ©2011 Digi International® Inc. All rights reserved. Rabbit, Dynamic C, Rabbit 4000, Digi, Digi International, Digi International Company, and the Digi and Rabbit logos are trademarks or registered trademarks of Digi International, Inc. in the United States and other countries worldwide. All other trademarks are the property of their respective owners.
TABLE OF CONTENTS Chapter 1. Introduction 1 1.1 RCM3400 Features ...............................................................................................................................1 1.2 Advantages of the RCM3400 ...............................................................................................................3 1.3 Development and Evaluation Tools......................................................................................................4 1.3.1 RCM3400 Development Kit ..
.4 A/D Converter .................................................................................................................................... 31 4.4.1 A/D Converter Calibration ......................................................................................................... 33 4.4.2 A/D Converter Power Supply..................................................................................................... 33 4.5 Other Hardware .............................................................
C.3 Placing Your Device on the Network ..............................................................................................100 C.4 Running TCP/IP Sample Programs..................................................................................................101 C.4.1 How to Set IP Addresses in the Sample Programs...................................................................102 C.4.2 How to Set Up your Computer’s IP Address for Direct Connect ............................................103 C.
RabbitCore RCM3400
1. INTRODUCTION The RCM3400 is a compact module that incorporates the powerful Rabbit® 3000 microprocessor, flash memory, static RAM, digital I/O ports, analog inputs, and PWM outputs. The Development Kit has the essentials that you need to design your own microprocessor-based system, and includes a complete Dynamic C software development system. This Development Kit also contains a Prototyping Board that will allow you to evaluate the RCM3400 and to prototype circuits that interface to the RCM3400 module.
• One additional analog input (CONVERT) • External reset input • Alternate I/O bus can be configured for 8 data lines and 6 address lines (shared with parallel I/O lines), I/O read/write • Ten 8-bit timers (six cascadable) and one 10-bit timer with two match registers • 512K flash memory, 512K SRAM, (options for 256K flash memory and 256K SRAM) • Real-time clock • Watchdog supervisor • Provision for customer-supplied backup battery via connections on header J2 • 10-bit free-running PWM counter and four widt
1.2 Advantages of the RCM3400 • Fast time to market using a fully engineered, “ready-to-run/ready-to-program” microprocessor core. • Competitive pricing when compared with the alternative of purchasing and assembling individual components. • Easy C-language program development and debugging • Rabbit Field Utility to download compiled Dynamic C .bin files, and cloning board options for rapid production loading of programs.
1.3 Development and Evaluation Tools 1.3.1 RCM3400 Development Kit The RCM3400 Development Kit contains the hardware essentials you will need to use your RCM3400 module. The items in the Development Kit and their use are as follows. • RCM3400 module. • Prototyping Board. • AC adapter, 12 V DC, 1 A. (Included only with Development Kits sold for the North American market.
1.3.2 Software The RCM3400 is programmed using version 7.32 or later of Dynamic C. A compatible version is included on the Development Kit CD-ROM. Digi also offers add-on Dynamic C modules containing the popular C/OS-II real-time operating system, as well as PPP, Advanced Encryption Standard (AES), and other select libraries. In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support module is also available for purchase.
6 RabbitCore RCM3400
2. GETTING STARTED This chapter describes the RCM3400 hardware in more detail, and explains how to set up and use the accompanying Prototyping Board. NOTE: This chapter (and this manual) assume that you have the RCM3400 Development Kit. If you purchased an RCM3400 module by itself, you will have to adapt the information in this chapter and elsewhere to your test and development setup. 2.
2.2 Hardware Connections 2.2.1 Attach Module to Prototyping Board Turn the RCM3400 module so that the Rabbit 3000 chip is facing up and the Rabbit logo is facing the direction shown in Figure 2 below. Align the pins from headers J1 and J2 on the bottom side of the module into header sockets RCM1JA and RCM1JB on the Prototyping Board. The shaded corner notch at the top left corner of the RCM3400 module should face the same direction as the corresponding notch below it on the Prototyping Board.
2.2.2 Connect Programming Cable The programming cable connects the RCM3400 to the PC running Dynamic C to download programs and to monitor the RCM3400 module during debugging. Connect the 10-pin connector of the programming cable labeled PROG to header J2 on the RCM3400 Prototyping Board as shown in Figure 3. Be sure to orient the marked (usually red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a normal serial connection.
2.2.3 Connect Power When all other connections have been made, you can connect power to the Prototyping Board. Connect the wall transformer to jack J8 on the Prototyping Board as shown in Figure 3. Plug in the wall transformer. The power LED on the Prototyping Board should light up. The RCM3400 and the Prototyping Board are now ready to be used. NOTE: A RESET button is provided on the Prototyping Board to allow a hardware reset without disconnecting power. 2.2.3.
2.3 Run a Sample Program If you already have Dynamic C installed, you are now ready to test your programming connections by running a sample program. Start Dynamic C by double-clicking on the Dynamic C icon or by double-clicking on dcrab_XXXX.exe in the Dynamic C root directory, where XXXX are version-specific characters. Dynamic C uses the serial port specified during installation.
2.4 Where Do I Go From Here? If the sample program ran fine, you are now ready to go on to the sample programs in the RCM3400 User’s Manual (click the documentation icon on your PC) and to develop your own applications. The sample programs can be easily modified for your own use. The user's manual also provides complete hardware reference information and software function calls for the RCM3400, the Prototyping Board, the Ethernet reference design, and the optional LCD/Keypad module.
3. RUNNING SAMPLE PROGRAMS To develop and debug programs for the RCM3400 (and for all other Digi hardware), you must install and use Dynamic C. This chapter provides a tour of its major features with respect to the RCM3400. 3.1 Introduction To help familiarize you with the RCM3400 modules, Dynamic C includes several sample programs.
3.2 Sample Programs Of the many sample programs included with Dynamic C, several are specific to the RCM3400. These programs will be found in the SAMPLES\RCM3400 folder. Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program. • CONTROLLED.c—Demonstrates use of the digital inputs by having you turn LEDs DS1 and DS2 on the Prototyping Board on or off from the STDIO window on your PC.
• FLASHLED1.c—demonstrates the use of assembly language to flash LEDs DS1 and DS2 on the Prototyping Board at different rates. Once you have compiled and run this program, LEDs DS1 and DS2 will flash on/off at different rates. • FLASHLED2.c—demonstrates the use of cofunctions and costatements to flash LEDs DS1 and DS2 on the Prototyping Board at different rates. Once you have compiled and run this program, LEDs DS1 and DS2 will flash on/off at different rates. • TOGGLESWITCH.
• PARITY.C—This program demonstrates the use of parity modes by repeatedly sending byte values 0–127 from Serial Port D to Serial Port C. The program will switch between generating parity or not on Serial Port D. Serial Port C will always be checking parity, so parity errors should occur during every other sequence.
The RS-485 connections between the slave and master devices are as follows. • RS485+ to RS485+ • RS485– to RS485– • GND to GND • SIMPLE485MASTER.C—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 RCM3400 and display them in the STDIO window. Use SIMPLE485SLAVE.C to program the slave. • SIMPLE485SLAVE.
• THERMISTOR.C—Demonstrates how to use analog input THERM_IN7 to calculate temperature for display to the STDIO window. This sample program assumes that the thermistor is the one included in the Development Kit whose values for beta, series resistance, and resistance at standard temperature are given in the part specification. • DNLOADCALIB.C—Demonstrates how to retrieve analog calibration data to rewrite it back to simulated EEPROM in flash with using a serial utility such as Tera Term. • UPLOADCALIB.
4. HARDWARE REFERENCE Chapter 4 describes the hardware components and principal hardware subsystems of the RCM3400. Appendix A, “RCM3400 Specifications,” provides complete physical and electrical specifications. Figure 4 shows the Rabbit-based subsystems designed into the RCM3400. A/D Converter SRAM Flash RABBIT® 3000 External scaling circuitry logic-level serial signal Level converter 32 kHz osc 29.4 MHz osc RabbitCore Module RS-232, RS-485, IrDA and Ethernet drivers on motherboard Figure 4.
4.1 RCM3400 Digital Inputs and Outputs Figure 5 shows the RCM3400 pinouts for headers J1 and J2. J1 J2 GND PB6 PB5 PB3 PB1 PA6 PA4 PA2 PC2 PC0 PC6-TxA PC7-RxA PG2 PG0 PD4 PD6 PD7 PF1 PF0 PB4 PB2 PA7 PA5 PA3 PA1 PA0 PC3 PC1 PG3 PG1 PD0 PD5 /RESET_IN VBAT_EXT LN3 LN2 LN1 LN0 VREF PF6 PF4 PB7 PE6 PE4 PE1 GND PG7 PG5 /IORD SMODE1 /RES LN7 LN6 LN5 LN4 CONVERT PF7 PF5 PE7 PE5 PE2 PE0 +3.3 V_IN PG6 PG4 STATUS /IOWR SMODE0 n.c. = not connected Note: These pinouts are as seen on the Bottom Side of the module.
Figure 6 shows the use of the Rabbit 3000 microprocessor ports in the RCM3400 modules. PC0, PC2 PC1, PC3 PG2, PG6 PA0PA7 PB1PB7 PD0 PD4PD7 Port A Port B Port D Port C RABBIT® Port E PE0PE2 PE4PE7 Port F PF0PF1 PF4PF7 (Serial Ports C & D) Port G PG3, PG7 (Serial Ports E & F) PB1, PC6 Programming Port PC7, /RES PC4* PC5* * PC4 and PC5 are not available on RCM3400 I/O pins.
Table 2. RCM3400 Pinout Configurations Pin Pin Name Default Use Alternate Use Notes 1 LN3 Analog Input 2 LN7 Analog Input 3 LN2 Analog Input 4 LN6 Analog Input 5 LN1 Analog Input 6 LN5 Analog Input 7 LN0 Analog Input 8 LN4 Analog Input 9 VREF Analog Output 1.15 V/2.048 V/2.500 V on-chip ref.
Table 2. RCM3400 Pinout Configurations (continued) Pin Pin Name Default Use Alternate Use Notes 23 GND 24 +3.
Table 2.
Table 2.
4.1.1 Memory I/O Interface The Rabbit 3000 address lines (A0–A19) and all the data lines (D0–D7) are routed internally to the onboard flash memory and SRAM chips. I/0 write (/IOWR) and I/0 read (/IORD) are available for interfacing to external devices. Parallel Port A can also be used as an external I/O data bus to isolate external I/O from the main data bus. Parallel Port B pins PB2–PB7 can also be used as an auxiliary address bus.
4.2 Serial Communication The RCM3400 board does not have any serial transceivers directly on the board. However, an Ethernet or other serial interface may be incorporated on the board the RCM3400 is mounted on. For example, the Prototyping Board has RS-232, RS-485, IrDA, and Ethernet transceiver chips. 4.2.1 Serial Ports There are five serial ports designated as Serial Ports A, C, D, E, and F. All five serial ports can operate in an asynchronous mode up to the baud rate of the system clock divided by 8.
Alternate Uses of the Programming Port All three clocked Serial Port A signals are available as • a synchronous serial port • an asynchronous serial port, with the clock line usable as a general CMOS I/O pin The programming port may also be used as a serial port via the DIAG connector on the programming cable. In addition to Serial Port A, the Rabbit 3000 startup-mode (SMODE0, SMODE1), status, and reset pins are available on the programming port.
4.3 Serial Programming Cable The programming cable is used to connect the serial programming port of the RCM3400 to a PC serial COM port. The programming cable converts the RS-232 voltage levels used by the PC serial port to the CMOS voltage levels used by the Rabbit 3000. When the PROG connector on the programming cable is connected to the programming header on the RCM3400 Prototyping Board, programs can be downloaded and debugged over the serial interface.
A program “runs” in either mode, but can only be downloaded and debugged when the RCM3400 is in the program mode. Refer to the Rabbit 3000 Microprocessor User’s Manual for more information on the programming port and the programming cable. 4.3.2 Standalone Operation of the RCM3400 The RCM3400 must be programmed via the RCM3400 Prototyping Board or via a similar arrangement on a customer-supplied board.
4.4 A/D Converter The RCM3400 has an onboard ADS7870 A/D converter whose scaling and filtering are done via the motherboard on which the RCM3400 module is mounted. The A/D converter multiplexes converted signals from eight single-ended or four differential inputs to Serial Port B on the Rabbit 3000. The eight analog input pins, LN0–LN7, each have an input impedance of 6–7 M, depending on whether they are used as single-ended or differential inputs.
If a device such as a battery is connected across two channels R10 AIN0 for a differential measurement, LN0 ADC and it is not referenced to 1 nF R0 Device + analog ground, then the current I + from the device will flow 1 nF R1 through both sets of attenuator R11 AIN1 resistors as shown in Figure 9. LN1 This will generate a negative voltage at one of the inputs, Figure 9. Current Flow from Ungrounded LN1, which will almost ceror Floating Source tainly lead to inaccurate A/D conversions.
4.4.1 A/D Converter Calibration All single-ended inputs are factory-calibrated with actual voltages at a gain code of 0. Typical values for the other gain codes and for other calibration constants for current and differential measurements are used to populate the table to allow A/D conversions to be done “out of the box.” See Appendix B.4.3.3 for information on performing your own calibrations in situations where you require enhanced accuracy. 4.4.
4.5 Other Hardware 4.5.1 Clock Doubler The RCM3400 takes advantage of the Rabbit 3000 microprocessor’s internal clock doubler. A built-in clock doubler allows half-frequency crystals to be used to reduce radiated emissions. The 29.4 MHz frequency specified for the RCM3400 is generated using a 14.7 MHz resonator. The clock doubler may be disabled if 29.4 MHz clock speeds are not required.
4.6 Memory 4.6.1 SRAM RCM3400 boards have 256K–512K of SRAM installed at U6. 4.6.2 Flash EPROM RCM3400 boards also have 256K–512K of flash EPROM installed at U4. NOTE: Digi recommends that any customer applications should not be constrained by the sector size of the flash EPROM since it may be necessary to change the sector size in the future. Writing to arbitrary flash memory addresses at run time is also discouraged. Instead, define a “user block” area to store persistent data.
36 RabbitCore RCM3400
5. SOFTWARE REFERENCE Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Rabbit Semiconductor controllers and other controllers based on the Rabbit microprocessor. Chapter 5 provides the libraries, function calls, and sample programs related to the RCM3400. 5.1 More About Dynamic C Dynamic C has been in use worldwide since 1989.
Dynamic C has a number of standard features: • Full-feature source and/or assembly-level debugger, no in-circuit emulator required. • Royalty-free TCP/IP stack with source code and most common protocols. • Hundreds of functions in source-code libraries and sample programs: Exceptionally fast support for floating-point arithmetic and transcendental functions. RS-232 and RS-485 serial communication. Analog and digital I/O drivers. I2C, SPI, GPS, file system. LCD display and keypad drivers.
5.2 Dynamic C Function Calls 5.2.1 Digital I/O The RCM3400 was designed to interface with other systems, and so there are no drivers written specifically for the I/O. The general Dynamic C read and write functions allow you to customize the parallel I/O to meet your specific needs. For example, use WrPortI(PEDDR, &PEDDRShadow, 0x00); to set all the Port E bits as inputs, or use WrPortI(PEDDR, &PEDDRShadow, 0xFF); to set all the Port E bits as outputs.
5.2.4 Prototyping Board Function Calls The functions described in this section are for use with the Prototyping Board features. The source code is in the RCM34xx.LIB library in the Dynamic C LIB\RCM3400 folder if you need to modify it for your own board design. Other generic functions applicable to all devices based on Rabbit microprocessors are described in the Dynamic C Function Reference Manual. 5.2.5 Board Initialization void brdInit (void); Call this function at the beginning of your program.
5.2.6 Analog Inputs unsigned int anaInConfig(unsigned int instructionbyte, unsigned int cmd, long baud); Use this function to configure the A/D converter. This function will address the A/D converter in Register Mode only, and will return an error if you try the Direct Mode. Appendix B.4.3 provides additional addressing and command information.
PARAMETERS instructionbyte is the instruction byte that will initiate a read or write operation at 8 or 16 bits on the designated register address. For example, checkid = anaInConfig(0x5F, 0, 9600); // read ID and set baud rate cmd are the command data that configure the registers addressed by the instruction byte. Enter 0 if you are performing a read operation. For example, i = anaInConfig(0x07, 0x3b, 0); // write ref/osc reg and enable baud is the serial clock transfer rate of 9600 to 57,600 bps.
unsigned int anaInDriver(unsigned int cmd, unsigned int len); Reads the voltage of an analog input channel by serial-clocking an 8-bit command to the A/D converter by its Direct Mode method. This function assumes that Mode1 (most significant byte first) and the A/D converter oscillator have been enabled. See anaInConfig() for the setup. The conversion begins immediately after the last data bit has been transferred. An exception error will occur if Direct Mode bit D7 is not set.
RETURN VALUE A value corresponding to the voltage on the analog input channel: 0–2047 for 11-bit conversions (bit 12 for sign) -1 overflow or out of range -2 conversion incomplete, busy bit timeout SEE ALSO anaInConfig, anaIn, brdInit 44 RabbitCore RCM3400
unsigned int anaIn(unsigned int channel, int opmode, int gaincode); Reads the value of an analog input channel using the direct method of addressing the A/D converter. Note that it takes about 1 second to ensure an internal capacitor on the A/D converter is charged when the function is called the first time.
int anaInCalib(int channel, int opmode, int gaincode, int value1, float volts1, int value2, float volts2); Calibrates the response of the desired A/D converter channel as a linear function using the two conversion points provided. Four values are calculated and placed into global tables _adcCalibS, _adcCalibD, and adcCalibM to be later stored into simulated EEPROM using the function anaInEEWr(). Each channel will have a linear constant and a voltage offset.
value1 is the first A/D converter channel raw count value volts1 is the voltage or current corresponding to the first A/D converter channel value (0 to +20 V or 4 to 20 mA) value2 is the second A/D converter channel raw count value volts2 is the voltage or current corresponding to the first A/D converter channel value (0 to +20 V or 4 to 20 mA) RETURN VALUE 0 if successful. -1 if not able to make calibration constants.
float anaInVolts(unsigned int channel, unsigned int gaincode); Reads the state of a single-ended analog input channel and uses the previously set calibration constants to convert it to volts. PARAMETERS channel is the channel number (0 to 7) corresponding to ADC_IN0 to ADC_IN7 Channel Code Single-Ended Input Lines* Voltage Range† (V) 0 +AIN0 0–20 1 +AIN1 0–20 2 +AIN2 0–20 3 +AIN3 0–20 4 +AIN4 0–20 5 +AIN5 0–20 6 +AIN6 0–20 7 +AIN7 0–2‡ * Negative input is ground.
float anaInDiff(unsigned int channel, unsigned int gaincode); Reads the state of differential analog input channels and uses the previously set calibration constants to convert it to volts.
float anaInmAmps(unsigned int channel); Reads the state of an analog input channel and uses the previously set calibration constants to convert it to current. PARAMETERS channel is the channel number (0–7): Channel Code 4–20 mA Input Lines* 0 +AIN0 1 +AIN1 2 +AIN2 3 +AIN3† 4 +AIN4* 5 +AIN5* 6 +AIN6* 7 +AIN7 * Negative input is ground. † Applies to Prototyping Board. RETURN VALUE A current value between 4.00 and 20.00 mA corresponding to the current on the analog input channel.
root int anaInEERd(unsigned int channel, unsigned int opmode, unsigned int gaincode); Reads the calibration constants, gain, and offset for an input based on their designated position in the simulated EEPROM area of the flash memory, and places them into global tables _adcCalibS, _adcCalibD, and _adcCalibM for analog inputs. The constants are stored in the top 2K of the user block in a reserved memory area.
gaincode is the gain code of 0 to 7. The gaincode parameter is ignored when channel is ALLCHAN. Gain Code Voltage Range* (V) 0 0–20 1 0–10 2 0–5 3 0–4 4 0–2.5 5 0–2 6 0–1.25 7 0–1 * Applies to Prototyping Board. RETURN VALUE 0 if successful. -1 if address is invalid or out of range.
int anaInEEWr(unsigned int channel, int opmode unsigned int gaincode); Writes the calibration constants, gain, and offset for an input based from global tables _adcCalibS, _adcCalibD, and _adcCalibM to designated positions in the simulated EEPROM area of the flash memory. The constants are stored in the top 2K of the user block in a reserved memory area. Depending on the flash size, the following macros can be used to identify the starting address for these locations.
gaincode is the gain code of 0 to 7. The gaincode parameter is ignored when channel is ALLCHAN. Gain Code Voltage Range* (V) 0 0–20 1 0–10 2 0–5 3 0–4 4 0–2.5 5 0–2 6 0–1.25 7 0–1 * Applies to Prototyping Board. RETURN VALUE 0 if successful -1 if address is invalid or out of range.
5.3 Upgrading Dynamic C Dynamic C patches that focus on bug fixes are available from time to time. Check the Web site http://www.digi.com/support for the latest patches, workarounds, and bug fixes. The default installation of a patch or bug fix is to install the file in a directory (folder) different from that of the original Dynamic C installation. Digi recommends using a different directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation.
56 RabbitCore RCM3400
APPENDIX A. RCM3400 SPECIFICATIONS Appendix A provides the specifications for the RCM3400, and describes the conformal coating.
A.1 Electrical and Mechanical Characteristics RP4 JP3 C55 C50 R24 C9 U1 C8 R4 C2 C3 C4 C5 R3 C24 C25 C19 C14 C13 Y1 U7 C31 R11 C33 U3 C34 C22 U2 C28 Please refer to the RCM3400 footprint diagram later in this appendix for precise header locations. (34.9) D1 R17 C39 1.375 C40 R18 R21 C35 RP3 C32 R13 U5 R20 RP2 C53 C51 C62 JP2 C48 JP1 C59 C56 R25 C61 Figure A-1 shows the mechanical dimensions for the RCM3400. C1 R1 1.160 (4.4) (2.5) (4.4) 0.17 (2.5) 0.
(2.2) 0.086 (2) 0.08 (1) 0.04 It is recommended that you allow for an “exclusion zone” of 0.04" (1 mm) around the RCM3400 in all directions when the RCM3400 is incorporated into an assembly that includes other printed circuit boards. This “exclusion zone” that you keep free of other components and boards will allow for sufficient air flow, and will help to minimize any electrical or electromagnetic interference between adjacent boards. An “exclusion zone” of 0.
Table A-1 lists the electrical, mechanical, and environmental specifications for the RCM3400. Table A-1. RabbitCore RCM3400 Specifications Parameter Microprocessor RCM3400 RCM3410 Low-EMI Rabbit® 3000 at 29.
Table A-1. RabbitCore RCM3400 Specifications (continued) Parameter Watchdog/Supervisor Pulse-Width Modulators RCM3400 RCM3410 Yes 10-bit free-running counter and four pulse-width registers Input Capture 2-channel input capture can be used to time input signals from various port pins Quadrature Decoder 2-channel quadrature decoder accepts inputs from external incremental encoder modules Power Operating Temperature 3.0–3.45 V DC @ 29.4 MHz, 2.8–3.45 V DC @ 14.7 MHz 97 mA @ 3.3 V, 29.4 MHz; 57 mA @ 3.
A.1.1 Headers The RCM3400 uses headers at J1 and J2 for physical connection to other boards. J1 and J2 are 2 × 17 SMT headers with a 1.27 mm pin spacing. Figure A-3 shows the layout of another board for the RCM3400 to be plugged into. These values are relative to the designated fiducial. RCM3400 Footprint J1 J2 0.900 (1.3) 0.050 (22.9) 0.046 (1.2) 0.163 (4.1) 1.193 (30.3) Figure A-3.
A.2 Bus Loading You must pay careful attention to bus loading when designing an interface to the RCM3400. This section provides bus loading information for external devices. Table A-2 lists the capacitance for the various RCM3400 I/O ports. Table A-2. Capacitance of Rabbit 3000 I/O Ports I/O Ports Input Capacitance (pF) Output Capacitance (pF) 12 14 Parallel Ports A to G Table A-3 lists the external capacitive bus loading for the various RCM3400 output ports.
Figure A-4 shows a typical timing diagram for the Rabbit 3000 microprocessor external I/O read and write cycles.
Table A-5 lists the delays in gross memory access time for several values of VDD. Table A-5. Data and Clock Delays VDD ±10%, Temp, -40°C–+85°C (maximum) Clock to Address Output Delay (ns) 30 pF 60 pF 90 pF Data Setup Time Delay (ns) 3.3 6 8 11 2.8 7 10 13 VDD Spectrum Spreader Delay (ns) Normal Strong dbl/no dbl dbl/no dbl 1 3/4.5 4.5/9 1.5 3.5/5.5 5.5/11 The measurements are taken at the 50% points under the following conditions.
A.3 Rabbit 3000 DC Characteristics Table A-6. Rabbit 3000 Absolute Maximum Ratings Symbol Parameter Maximum Rating TA Operating Temperature -55° to +85°C TS Storage Temperature -65° to +150°C Maximum Input Voltage: • Oscillator Buffer Input • 5-V-tolerant I/O VDD Maximum Operating Voltage VDD + 0.5 V 5.5 V 3.6 V Stresses beyond those listed in Table A-6 may cause permanent damage.
A.4 I/O Buffer Sourcing and Sinking Limit Unless otherwise specified, the Rabbit I/O buffers are capable of sourcing and sinking 6.8 mA of current per pin at full AC switching speed. Full AC switching assumes a 29.4 MHz CPU clock and capacitive loading on address and data lines of less than 70 pF per pin. The absolute maximum operating voltage on all I/O is 5.5 V. Table A-8 shows the AC and DC output drive limits of the parallel I/O buffers when the Rabbit 3000 is used in the RCM3400. Table A-8.
A.5 Conformal Coating C53 C51 RP4 JP3 C55 C50 R24 C40 D1 R18 R21 R17 C24 C25 C9 C8 C3 C4 C5 C2 R3 U1 C19 C14 C13 R4 C22 U2 C28 Conformally coated area Y1 U7 C31 R11 C33 U3 C34 C39 C35 RP3 C32 R13 U5 R20 RP2 C62 JP2 C48 JP1 C59 C56 R25 C61 The areas around the 32 kHz real-time clock crystal oscillator have had the Dow Corning silicone-based 1-2620 conformal coating applied. The conformally coated area is shown in Figure A-5.
A.6 Jumper Configurations JP1 JP2 Figure A-6 shows the header locations used to configure the various RCM3400 options via jumpers. Top Side JP3 Figure A-6. Location of RCM3400 Configurable Positions Table A-9 lists the configuration options. Table A-9.
70 RabbitCore RCM3400
APPENDIX B. PROTOTYPING BOARD Appendix B describes the features and accessories of the Prototyping Board, and explains the use of the Prototyping Board to demonstrate the RCM3400 and to build prototypes of your own circuits. The RCM3400 Prototyping Board has power-supply connections and also provides some basic I/O peripherals (RS-232, RS-485, A/D converter screw-terminal header, IrDA transceiver, LEDs, and switches), as well as a prototyping area for more advanced hardware development.
B.1 Introduction The Prototyping Board included in the Development Kit makes it easy to connect an RCM3400 module to a power supply and a PC workstation for development. It also provides some basic I/O peripherals (RS-232, RS-485, an IrDA transceiver, an Ethernet port, LEDs, and switches), as well as a prototyping area for more advanced hardware development. For the most basic level of evaluation and development, the Prototyping Board can be used without modification.
B.1.1 Prototyping Board Features • Power Connection—A power-supply jack and a 3-pin header are provided for connection to the power supply. Note that the 3-pin header is symmetrical, with both outer pins connected to ground and the center pin connected to the raw V+ input. The cable of the AC adapter provided with the North American version of the Development Kit is terminated with a 5.5 mm plug that connects to the power-supply jack.
• RS-232—Two 3-wire or one 5-wire RS-232 serial ports are available on the Prototyping Board at header J5 and another two 3-wire or one 5-wire RS-232 serial ports are available at header J6. A 10-pin 0.1-inch spacing header strip is installed at J5 allows you to connect a ribbon cable that leads to a standard DE-9 serial connector. NOTE: An RS-232 driver chip needs to be installed at U5 along with a header at J6 and filtering capacitors in order to use header J6.
B.2 Mechanical Dimensions and Layout Figure B-2 shows the mechanical dimensions and layout for the RCM3400 Prototyping Board. 3.75 (2.5) 0.10 (95) LINK ACT JP10 CURRENT MEASUREMENT OPTION DS3 DS4 R61 R60 RxC J9 J7 C57 C58 C44 R58 C48 R50 R56 R55 R51 R53 R52 C38 C49 C39 RxF GND GND D7 /CS 4.80 D4 D5 +BKLT (122) D2 D3 GND D0 D1 +3.
Table B-1 lists the electrical, mechanical, and environmental specifications for the Prototyping Board. Table B-1. Prototyping Board Specifications Parameter Specification Board Size 4.80" × 6.70" × 0.98" (122 mm × 170 mm × 25 mm) Ethernet Port 10/100Base-T, RJ-45, 2 LEDs Operating Temperature –20°C to +60°C Humidity 5% to 95%, noncondensing Input Voltage 8 V to 24 V DC Maximum Current Draw 800 mA max. for +3.3 V supply, (including user-added circuits) 1 A total +3.
B.4 Using the Prototyping Board The Prototyping Board is actually both a demonstration board and a prototyping board. As a demonstration board, it can be used to demonstrate the functionality of the RCM3400 right out of the box without any modifications to either board. The Prototyping Board comes with the basic components necessary to demonstrate the operation of the RCM3400.
Selected signals from the Rabbit 3000 microprocessor are available on header J1 of the Prototyping Board. The remaining ports on the Rabbit 3000 microprocessor are used for RS-232, RS-485, and Ethernet serial communication. Table B-2 lists the signals on header J1 and explains how they are used on the Prototyping Board. Table B-2.
There is a 2" × 4" through-hole prototyping space available on the Prototyping Board. The holes in the prototyping area are spaced at 0.1" (2.5 mm). +3.3 V, +5 V, and GND traces run along the edge of the Prototyping Board for easy access. Small to medium circuits can be prototyped using point-to-point wiring with 20 to 30 AWG wire between the prototyping area, the +3.3 V, +5 V, and GND traces, and the surrounding area where surface-mount components may be installed.
B.4.3 Analog Features The Prototyping Board has typical support circuitry installed to complement the ADS7870 A/D converter on the RCM3400 module. B.4.3.1 A/D Converter Inputs Figure B-6 shows a pair of A/D converter input circuits. The resistors form an approx. 10:1 attenuator, and the capacitor filters noise pulses from the A/D converter input. +V ADC_IN0 178 kW ADC ADC_IN1 ADC 20 kW 1 nF 1 nF 20 kW 178 kW JP1 BVREF = 2.048 V 0W Factory Default AGND Figure B-6.
Many other possible ranges are possible by physically changing the resistor values that make up the attenuator circuit. It is also possible to read a negative voltage on ADC_IN0–ADC_IN5 by moving the 0 jumper (see Figure B-6) on header JP1, JP2, or JP9 associated with the A/D converter input from analog ground to the reference voltage generated and buffered by the A/D converter. Adjacent input channels are paired so that moving a particular jumper changes both of the paired channels.
B.4.3.2 Thermistor Input Analog input THERM_IN7 on the Prototyping Board was designed specifically for use with a thermistor in conjunction with the THERMISTOR.C sample program, which demonstrates how to use analog input THERM_IN7 to calculate temperature for display to the Dynamic C STDIO window. The sample program is targeted specifically for the thermistor included with the Development Kit with R0 @ 25°C = 3 k and 25/85 = 3965.
B.4.3.3 A/D Converter Calibration All single-ended inputs are factory-calibrated with actual voltages at a gain code of 0. Typical values for the other gain codes and for other calibration constants for current and differential measurements are used to populate the table to allow A/D conversions to be done “out of the box.” To get the best results form the A/D converter, it is necessary to calibrate each mode (single-ended, differential, and current) for each of its gains.
B.4.4 Serial Communication The RCM3400 Prototyping Board allows you to access five of the serial ports from the RCM3400 module. Table B-5 summarizes the configuration options. Note that Serial Ports E and F can be used only with the RCM3400 Prototyping Board. Table B-5.
B.4.4.1 RS-232 RS-232 serial communication on header J5 on both Prototyping Boards is supported by an RS-232 transceiver installed at U4. This transceiver 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 3000’s signals to RS-232 signal levels. Note that the polarity is reversed in an RS-232 circuit so that a +5 V output becomes approximately -10 V and 0 V is output as +10 V.
B.4.4.2 RS-485 The RCM3400 Prototyping Board has one RS-485 serial channel, which is connected to the Rabbit 3000 Serial Port E through an RS-485 transceiver. The half-duplex communication uses an output from PD0 on the Rabbit 3000 to control the transmit enable on the communication line. Using this scheme a strict master/slave relationship must exist between devices to insure that no two devices attempt to drive the bus simultaneously. Serial Port E is configured in software for RS-485 as follows.
The RCM3400 Prototyping Board comes with a 220 termination resistor and two 681 bias resistors installed and enabled with jumpers across pins 1–2 and 5–6 on header JP3, as shown in Figure B-9. LINK ACT C20 R33 C17 R30 C16 R24 C15 R20 C14 R17 C12 C10 C8 JP10 J8 CURRENT MEASUREMENT OPTION DS3 J9 C58 R50 R56 R55 R51 R53 R52 C57 C44 R58 C48 C47 D2 D4 D3 D5 GND D0 D1 +3.
B.4.4.3 Ethernet Port Figure B-10 shows the pinout for the Ethernet port (header J7). Note that there are two standards for numbering the pins on this connector—the convention used here, and numbering in reverse to that shown. 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 B-10) are always absolute, and the RJ-45 connector will work properly with offthe-shelf Ethernet cables. ETHERNET 1 8 1. 2. 3.
B.4.5 Other Prototyping Board Modules An optional LCD/keypad module is available that can be mounted on the RCM3400 Prototyping Board. Refer to Appendix D, “LCD/Keypad Module,” for complete information.
B.5 RCM3400 Prototyping Board Jumper Configurations Figure B-12 shows the header locations used to configure the various RCM3400 Prototyping Board options via jumpers. Battery JP3 JP10 JP8 JP4 JP6 JP7 Note JP6 and JP7 are located under the RCM3400 (if the RCM3400 module is plugged in) JP5 JP1 JP2 JP9 Figure B-12. Location of Configurable Jumpers on RCM3400 Prototyping Board Table B-6 lists the configuration options using either jumpers or 0 surface-mount resistors. Table B-6.
Table B-6. RCM3400 Prototyping Board Jumper Configurations (continued) Header JP9 JP10 JP3 JP4* JP6* JP7* JP8* Analog Voltage/4–20 mA Options Pins Connected Factory Default 1–2 Connect for 4–20 mA option on ADC_IN3 n.c. 3–4 Connect for 4–20 mA option on ADC_IN4 n.c. 5–6 Connect for 4–20 mA option on ADC_IN5 n.c. 7–8 Connect for 4–20 mA option on ADC_IN6 n.c. 1–2 Tied to VREF 2–3 Tied to analog ground 1–2 +5 V Connected 5–6 + 3.
92 RabbitCore RCM3400
APPENDIX C. USING THE TCP/IP FEATURES C.1 TCP/IP Connections Programming and development can be done with the RCM3400 modules without connecting the Ethernet port on the RCM3400 Prototyping Board to a network. However, if you will be running the sample programs that use the Ethernet capability or will be doing Ethernet-enabled development, you should connect the RCM3400 Prototyping Board’s Ethernet port at this time. Before proceeding you will need to have the following items.
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 RCM3400 Prototyping 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.
C.2 TCP/IP Primer on IP Addresses Obtaining IP addresses to interact over an existing, operating, network can involve a number of complications, and must usually be done with cooperation from your ISP and/or network systems administrator. For this reason, it is suggested that the user begin instead by using a direct connection between a PC and the RCM3400 using an Ethernet crossover cable or a simple arrangement with a hub. (A crossover cable should not be confused with regular straight through cables.
Hub(s) T1 in Adapter Ethernet Firewall Proxy Server Network Ethernet Typical Corporate Network RCM3400 System 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 without having to setup a direct connection between your computer and the RCM3400.
C.2.1 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 adjacent IP addresses. There are always 2N IP addresses in a local network. The netmask (also called subnet mask) determines how many IP addresses belong to the local network.
C.2.2 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 IP address on the local network to which the packet must be sent.
C.2.3 Dynamically Assigned Internet Addresses In many instances, there are no fixed IP addresses. This is the case when, for example, you are assigned an IP address dynamically by your dial-up Internet service provider (ISP) or when you have a device that provides your IP addresses using the Dynamic Host Configuration Protocol (DHCP).
C.3 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 network. If you want users on the Internet to communicate with your RCM3400, you have several options.
C.4 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 RCM3400 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.
C.4.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 run 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.
C.4.2 How to Set Up your Computer’s IP Address for Direct Connect When your computer is connected directly to the RCM3400 Prototyping 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 > Settings > Control Panel to bring up the Control Panel, and then double-click the Network icon.
C.5 Run the PINGME.C Sample Program Connect the crossover cable from your computer’s Ethernet port to the RJ-45 Ethernet connector on the RCM3400 Prototyping Board. Open this 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 RCM3400 Prototyping Board should be on to indicate an Ethernet connection is made.
C.7 Where Do I Go From Here? NOTE: If you purchased your RCM3400 through a distributor or through a Rabbit Semiconductor partner, contact the distributor or partner first for technical support. If there are any problems at this point: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Rabbit Semiconductor Technical Bulletin Board at http://forums.digi.com/support/formum/index.. • Use the Technical Support e-mail form at http://www.digi.com/support.
106 RabbitCore RCM3400
APPENDIX D. LCD/KEYPAD MODULE An optional LCD/keypad is available for the Prototyping Board. Appendix D describes the LCD/keypad and provides the software function calls to make full use of the LCD/keypad. D.1 Specifications Two optional LCD/keypad modules—with or without a panel-mounted NEMA 4 waterresistant bezel—are available for use with the RCM3400 Prototyping Board. They are shown in Figure D-1. LCD/Keypad Modules Figure D-1.
Mounting hardware and a 60 cm (24") extension cable are also available for the LCD/ keypad module through your sales representative or authorized distributor. Table D-1 lists the electrical, mechanical, and environmental specifications for the LCD/ keypad module. Table D-1. LCD/Keypad Specifications Parameter Specification Board Size 2.60" × 3.00" × 0.75" (66 mm × 76 mm × 19 mm) Bezel Size 4.50" × 3.60" × 0.30" (114 mm × 91 mm × 7.
D.2 Contrast Adjustments for All Boards Starting in 2005, LCD/keypad modules were factory-configured to optimize their contrast based on the voltage of the system they would be used in. Be sure to select a KDU3V LCD/keypad module for use with the RCM3400 Prototyping Board — these modules operate at 3.3 V. You may adjust the contrast using the potentiometer at R2 as shown in Figure D-3. LCD/keypad modules configured for 5 V may be used with the 3.3 V RCM3400 Prototyping Board, but the backlight will be dim.
D.3 Keypad Labeling The keypad may be labeled according to your needs. A template is provided in Figure D-4 to allow you to design your own keypad label insert. 1.10 (28) 2.35 (60) Figure D-4. Keypad Template To replace the keypad legend, remove the old legend and insert your new legend prepared according to the template in Figure D-4. The keypad legend is located under the blue keypad matte, and is accessible from the left only as shown in Figure D-5.
D.4 Header Pinouts DB6B DB4B DB2B DB0B A1B A3B GND LED7 LED5 LED3 LED1 /RES VCC Figure D-6 shows the pinouts for the LCD/keypad module. J3 GND LED7 LED5 LED3 LED1 /RES VCC GND DB6B DB4B DB2B DB0B A1B A3B DB7B DB5B DB3B DB1B A0B A2B GND GND LED6 LED4 LED2 PE7 +5BKLT J1 GND GND LED6 LED4 LED2 PE7 +5BKLT GND DB7B DB5B DB3B DB1B A0B A2B J2 Figure D-6. LCD/Keypad Module Pinouts D.4.
D.5 Mounting LCD/Keypad Module on the Prototyping Board Install the LCD/keypad module on header sockets LCD1JA, LCD1JB, and LCD1JC of the Prototyping Board as shown in Figure D-7. Be careful to align the pins over the headers, and do not bend them as you press down to mate the LCD/keypad module with the Prototyping Board. LINK ACT C20 R33 C17 R30 C16 R24 C15 R20 C14 R17 C12 C10 C8 JP10 J8 J9 C58 R56 R55 C57 GND D4 D5 +3.
D.6 Bezel-Mount Installation This section describes and illustrates how to bezel-mount the LCD/keypad module designed for remote installation. Follow these steps for bezel-mount installation. 1. Cut mounting holes in the mounting panel in accordance with the recommended dimensions in Figure D-8, then use the bezel faceplate to mount the LCD/keypad module onto the panel. 0.125 D, 4x 0.230 (5.8) 2.870 (86.4) 0.130 (3.3) CUTOUT 3.400 (3) (72.9) 3.100 (78.8) Figure D-8.
3. Fasten the unit with the four 4-40 screws and washers included with the LCD/keypad module. If your panel is thick, use a 4-40 screw that is approximately 3/16" (5 mm) longer than the thickness of the panel. Bezel/Gasket DISPLAY BOARD U1 C1 U2 C4 U3 C3 C2 Q1 R17 D1 J1 R1 R2 R4 R3 R5 R7 R6 R8 R15 R14 R13 R12 R11 R9 R10 Panel R18 Q2 Q3 Q4 Q5 Q6 Q8 Q7 C5 R16 KP1 J3 RN1 U4 C6 C7 C8 J2 Figure D-9.
D.6.1 Connect the LCD/Keypad Module to Your Prototyping Board The LCD/keypad module can be located as far as 2 ft. (60 cm) away from the RCM3400 Prototyping Board, and is connected via a ribbon cable as shown in Figure D-10. C5 D1 C7 JP1 R3 U2 C4 U1 C10 C9 R4 R5 C11 Pin 1 CR1 C13 C12 R7 LCD1 R6 D2 C1 C6 C3 R1 C2 R2 U3 U4 Q1 J5 J1 R25 R8 Q4 Q6 3.3 V 2.8 V n.c.
D.7 Sample Programs Sample programs illustrating the use of the LCD/keypad module with the Prototyping Board are provided in the SAMPLES\RCM3400\LCD_KEYPAD directory. These sample programs use the auxiliary I/O bus on the Rabbit 3000 chip, and so the #define PORTA_AUX_IO line is already included in the sample programs. Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program.
D.8 LCD/Keypad Module Function Calls When mounted on the Prototyping Board, the LCD/keypad module uses the auxiliary I/O bus on the Rabbit 3000 chip. Remember to add the line #define PORTA_AUX_IO to the beginning of any programs using the auxiliary I/O bus. D.8.1 LCD/Keypad Module Initialization The function used to initialize the LCD/keypad module can be found in the Dynamic C LIB\DISPLAYS\LCD122KEY7_LIB library. void dispInit(); Initializes the LCD/keypad module.
D.8.3 LCD Display The functions used to control the LCD display are contained in the GRAPHIC.LIB library located in the Dynamic C LIB\DISPLAYS\GRAPHIC library folder. When x and y coordinates on the display screen are specified, x can range from 0 to 121, and y can range from 0 to 31. These numbers represent pixels from the top left corner of the display. void glInit(void); Initializes the display devices, clears the screen. RETURN VALUE None.
void glSetContrast(unsigned level); Sets display contrast. NOTE: This function is not used with the LCD/keypad module since the support circuits are not available on the LCD/keypad module. void glFillScreen(char pattern); Fills the LCD display screen with a pattern. PARAMETER The screen will be set to all black if pattern is 0xFF, all white if pattern is 0x00, and vertical stripes for any other pattern. RETURN VALUE None.
void glFastFillRegion(int left, int top, int width, int height, char pattern); Fills a rectangular block in the LCD buffer with the pattern specified. The block left and width parameters must be byte-aligned. Any portion of the block that is outside the LCD display area will be clipped. PARAMETERS left is the x coordinate of the top left corner of the block. top is the y coordinate of the top left corner of the block. width is the width of the block. height is the height of the block.
void glBlock(int left, int top, int width, int height); Draws a rectangular block in the page buffer and on the LCD if the buffer is unlocked. Any portion of the block that is outside the LCD display area will be clipped. PARAMETERS left is the x coordinate of the top left corner of the block. top is the y coordinate of the top left corner of the block. width is the width of the block. height is the height of the block. RETURN VALUE None.
void glPlotPolygon(int n, int y1, int x1, int y2, int x2, ...); Plots the outline of a polygon in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything. PARAMETERS n is the number of vertices. y1 is the y coordinate of the first vertex. x1 is the x coordinate of the first vertex. y2 is the y coordinate of the second vertex.
void glFillPolygon(int n, int x1, int y1, int x2, int y2, ...); Fills a polygon in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything. PARAMETERS n is the number of vertices. x1 is the x coordinate of the first vertex. y1 is the y coordinate of the first vertex. x2 is the x coordinate of the second vertex.
void glXFontInit(fontInfo *pInfo, char pixWidth, char pixHeight, unsigned startChar, unsigned endChar, unsigned long xmemBuffer); Initializes the font descriptor structure, where the font is stored in xmem. Each font character's bitmap is column major and byte-aligned. PARAMETERS pInfo is a pointer to the font descriptor to be initialized. pixWidth is the width (in pixels) of each font item. pixHeight is the height (in pixels) of each font item.
void glPutFont(int x, int y, fontInfo *pInfo, char code); Puts an entry from the font table to the page buffer and on the LCD if the buffer is unlocked. Each font character's bitmap is column major and byte-aligned. Any portion of the bitmap character that is outside the LCD display area will be clipped. PARAMETERS x is the x coordinate (column) of the top left corner of the text. y is the y coordinate (row) of the top left corner of the text. pInfo is a pointer to the font descriptor.
void glPutChar(char ch, char *ptr, int *cnt, glPutCharInst *pInst) Provides an interface between the STDIO string-handling functions and the graphic library. The STDIO string-formatting function will call this function, one character at a time, until the entire formatted string has been parsed. Any portion of the bitmap character that is outside the LCD display area will be clipped. PARAMETERS ch is the character to be displayed on the LCD.
void glBuffLock(void); Increments LCD screen locking counter. Graphic calls are recorded in the LCD memory buffer and are not transferred to the LCD if the counter is non-zero. NOTE: glBuffLock() and glBuffUnlock() can be nested up to a level of 255, but be sure to balance the calls. It is not a requirement to use these procedures, but a set of glBuffLock() and glBuffUnlock() bracketing a set of related graphic calls speeds up the rendering significantly. RETURN VALUE None.
int glGetBrushType(void); Gets the current method (or color) of pixels drawn by subsequent graphic calls. RETURN VALUE The current brush type. SEE ALSO glSetBrushType void glXGetBitmap(int x, int y, int bmWidth, int bmHeight, unsigned long xBm); Gets a bitmap from the LCD page buffer and stores it in xmem RAM. This function automatically calls glXGetFastmap if the left edge of the bitmap is byte-aligned and the left edge and width are each evenly divisible by 8.
void glPlotDot(int x, int y); Draws a single pixel in the LCD buffer, and on the LCD if the buffer is unlocked. If the coordinates are outside the LCD display area, the dot will not be plotted. PARAMETERS x is the x coordinate of the dot. y is the y coordinate of the dot. RETURN VALUE None. SEE ALSO glPlotline, glPlotPolygon, glPlotCircle void glPlotLine(int x0, int y0, int x1, int y1); Draws a line in the LCD buffer, and on the LCD if the buffer is unlocked.
void glRight1(int left, int top, int cols, int rows); Scrolls byte-aligned window right one pixel, left column is filled by current pixel type (color). PARAMETERS left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8, otherwise truncates. rows is the number of rows in the window. RETURN VALUE None.
void glHScroll(int left, int top, int cols, int rows, int nPix); Scrolls right or left, within the defined window by x number of pixels. The opposite edge of the scrolled window will be filled in with white pixels. The window must be byte-aligned. Parameters will be verified for the following: 1. The left and cols parameters will be verified that they are evenly divisible by 8. If not, they will be truncated to a value that is a multiple of 8. 2.
void glVScroll(int left, int top, int cols, int rows, int nPix); Scrolls up or down, within the defined window by x number of pixels. The opposite edge of the scrolled window will be filled in with white pixels. The window must be byte-aligned. Parameters will be verified for the following: 1. The left and cols parameters will be verified that they are evenly divisible by 8. If not, they will be truncated to a value that is a multiple of 8. 2.
void glXPutFastmap(int left, int top, int width, int height, unsigned long bitmap); Draws bitmap in the specified space. The data for the bitmap are stored in xmem. This function is like glXPutBitmap, except that it is faster. The restriction is that the bitmap must be byte-aligned. Any portion of a bitmap image or character that is outside the LCD display area will be clipped. PARAMETERS left is the top left corner of the bitmap, must be evenly divisible by 8, otherwise truncates.
void TextBorderInit(windowFrame *wPtr, int border, char *title); This function initializes the window frame structure with the border and title information. NOTE: Execute the TextWindowFrame function before using this function. PARAMETERS wPtr is a pointer to the window frame descriptor. border is the border style: SINGLE_LINE—The function will draw a single-line border around the text window. DOUBLE_LINE—The function will draw a double-line border around the text window.
void TextGotoXY(windowFrame *window, int col, int row); Sets the cursor location to display the next character. The display location is based on the height and width of the character to be displayed. NOTE: Execute the TextWindowFrame function before using this function. PARAMETERS window is a pointer to a font descriptor. col is a character column location. row is a character row location. RETURN VALUE None.
void TextPutChar(struct windowFrame *window, char ch); Displays a character on the display where the cursor is currently pointing. Once a character is displayed, the cursor will be incremented to the next character position. If any portion of a bitmap character is outside the LCD display area, the character will not be displayed. NOTE: Execute the TextWindowFrame function before using this function. PARAMETERS *window is a pointer to a font descriptor. ch is a character to be displayed on the LCD.
int TextMaxChars(windowFrame *wPtr); This function returns the maximum number of characters that can be displayed within the text window. NOTE: Execute the TextWindowFrame function before using this function. PARAMETERS wPtr is a pointer to the window frame descriptor. RETURN VALUE The maximum number of characters that can be displayed within the text window.
D.8.4 Keypad The functions used to control the keypad are contained in the Dynamic C LIB\KEYPADS\KEYPAD7.LIB library. void keyInit(void); Initializes keypad process RETURN VALUE None. SEE ALSO brdInit void keyConfig(char cRaw, char cPress, char cRelease, char cCntHold, char cSpdLo, char cCntLo, char cSpdHi); Assigns each key with key press and release codes, and hold and repeat ticks for auto repeat and debouncing. PARAMETERS cRaw is a raw key code index.
cSpdHi is a high-speed repeat tick, which is approximately one debounce period or 5 µs. How many times to repeat after low speed repeat. 0 = None. RETURN VALUE None. SEE ALSO keyProcess, keyGet, keypadDef void keyProcess(void); Scans and processes keypad data for key assignment, debouncing, press and release, and repeat. NOTE: This function is also able to process an 8 × 8 matrix keypad.
void keypadDef(); Configures the physical layout of the keypad with the desired ASCII return key codes. Keypad physical mapping 1 × 7 0 4 1 ['L'] 5 2 ['U'] ['–'] 6 ['D'] 3 ['R'] ['+'] ['E'] where 'L' represents Left Scroll 'U' represents Up Scroll 'D' represents Down Scroll 'R' represents Right Scroll '–' represents Page Down '+' represents Page Up 'E' represents the ENTER key Example: Do the following for the above physical vs. ASCII return key codes.
APPENDIX E. POWER SUPPLY Appendix D provides information on the current requirements of the RCM3400, and includes some background on the chip select circuit used in power management. E.1 Power Supplies The RCM3400 requires a regulated 2.8 V – 3.45 V DC power source. The RabbitCore design presumes that the voltage regulator is on the user board, and that the power is made available to the RCM3400 board through header J1. An RCM3400 with no loading at the outputs operating at 29.4 MHz typically draws 97 mA.
The drain on the battery by the RCM3400 is typically 7.5 µA when no other power is supplied. If a 165 mA·h battery is used, the battery can last about 2.5 years: 165 mA·h ------------------------ = 2.5 years. 7.5 µA The actual life in your application will depend on the current drawn by components not on the RCM3400 and on the storage capacity of the battery. The RCM3400 does not drain the battery while it is powered up normally.
INDEX A A/D converter calibration ................... 33, 83 function calls anaIn .............................. 45 anaInCalib ..................... 46 anaInConfig ................... 41 anaInDiff ....................... 49 anaInDriver ................... 43 anaInEERd .................... 51 anaInEEWr .................... 53 anaInmAmps ................. 50 anaInVolts ..................... 48 inputs current measurements ... 82 differential measurements . 81 negative voltages ...........
JP3 (RS-485 bias and termination resistors) ....87, 91 JP4 (PG7 RS-232/RS-485 select) ..........................91 JP5 (analog voltage/4–20 mA measurement options) 91 JP6 (PG3 IrDA/RS-232 select) .............................91 JP7 (PG2 IrDA/RS-232 select) .............................91 JP8 (PG6 RS-232/RS-485 select) ..........................91 JP9 (analog inputs reference) ...........................91 RCM3400 ..........................69 JP1 (flash memory size) 69 JP2 (flash memory bank select) ........
switching modes ............... 29 S sample programs ................... 14 A/D converter inputs AD_CAL_ALL.C ... 17, 83 AD_CAL_CHAN.C ...... 17 AD_CAL_DIFF.C ........ 17 AD_CALDIFF_CH.C ... 83 AD_CALMA_CH.C 17, 83 AD_RDDIFF_CH.C 17, 83 AD_RDMA_CH.C .. 17, 83 AD_RDVOLT_ALL.C 17, 83 AD_SAMPLE.C ........... 17 ANAINCONFIG.C ....... 17 D_CAL_CHAN.C ......... 83 DNLOADCALIB.C ...... 18 THERMISTOR.C ... 18, 82 UPLOADCALIB.C ....... 18 getting to know the RCM3400 CONTROLLED.C ........ 14 FLASHLED1.C ............
146 RabbitCore RCM3400