eDisplay (OP7200) ¼ VGA Operator Control Panel User’s Manual 019–0116 • 081115–L
OP7200 User’s Manual Part Number 019-0116 • 081115–L • Printed in U.S.A. ©2002–2008 Digi International Inc. • All rights reserved. No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Digi International. Permission is granted to make one or more copies as long as the copyright page contained therein is included.
TABLE OF CONTENTS Chapter 1. Introduction 1 1.1 Features .................................................................................................................................................1 1.2 Development and Evaluation Tools......................................................................................................3 1.2.1 Tool Kit .........................................................................................................................................3 1.2.
3.8 Keypad ............................................................................................................................................... 41 3.9 OP7200 CPLD.................................................................................................................................... 42 3.10 Programming Cable.......................................................................................................................... 44 3.10.1 Changing Between Program Mode and Run Mode......
Appendix B. Power Supply 139 B.1 Power Supplies.................................................................................................................................139 B.1.1 Power for Analog Circuits........................................................................................................140 B.1.2 Grounds ....................................................................................................................................140 B.1.3 RabbitNet Power Supplies...........
eDisplay (OP7200)
1. INTRODUCTION The OP7200 intelligent operator interface is a small, highperformance, C-programmable data acquisition and display unit that offers built-in I/O, Ethernet connectivity, and an optional touchscreen. The OP7200 can be used in a control system with RabbitNet™ expansion I/O cards. A Rabbit® 2000 microprocessor operating at 22.1 MHz provides fast data processing. The OP7200 is designed for panel mounting and is NEMA-4 compatible.
• Four serial ports (2 RS-232 or 1 RS-232 with RTS/CTS, 1 RS-485 or RabbitNet™ expansion port, and 1 CMOS-compatible programming port). • Onboard backup battery for real-time clock and SRAM, connection point for external battery included. • Watchdog. • External reset input. • Meets NEMA 4 watertightness specifications when front-panel mounted. • Optional 8-channel 12-bit A/D converter. • Optional 4096 × 4096 analog touchscreen. Two OP7200 models are available.
1.2 Development and Evaluation Tools 1.2.1 Tool Kit A Tool Kit contains the hardware essentials you will need to use your OP7200. The items in the Tool Kit and their use are as follows. • OP7200 Getting Started instructions. • Dynamic C CD-ROM, with complete product documentation on disk. • Programming cable, used to connect your PC serial port to the OP7200. • Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs).
1.2.2 Software The OP7200 is programmed using version 7.30 or later of Rabbit’s Dynamic C. A compatible version is included on the Tool Kit CD-ROM. Dynamic C v. 9.60 includes the popular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries that were previously sold as individual Dynamic C modules.
1.3 RabbitNet Peripheral Cards RabbitNet™ is an SPI serial protocol that uses a robust RS-422 differential signalling interface (twisted-pair differential signaling) to run at a fast 1 Megabit per second serial rate. The OP7200 has one RabbitNet port, which can support one peripheral card. Distances between a master processor unit and peripheral cards can be up to 10 m or 33 ft. The following low-cost peripheral cards are currently available.
1.4 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 µV/m) or 300 µV/m More restrictive emissions requirement: 30 dB µV/m at 10 m or 100 µV/m These limits apply over the range of 30–230 MHz. The limits are 7 dB higher for frequencies above 230 MHz.
1.4.1 Design Guidelines Note the following requirements for incorporating the OP7200 operator control panels into your application to comply with CE requirements. General • The power supply provided with the Tool 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 OP7200 to outdoor cables, the customer is responsible for providing CE-approved surge/lightning protection.
8 eDisplay (OP7200)
2. GETTING STARTED Chapter 2 explains how to connect the programming cable and power supply to the OP7200.
2.1 Power Supply Connections 1. First prepare the AC adapter for the country where it will be used by selecting the plug. The OP7200 Tool Kit presently includes Canada/Japan/U.S., Australia/N.Z., U.K., and European style plugs. Snap in the top of the plug assembly into the slot at the top of the AC adapter as shown in Figure 2, then press down on the spring-loaded clip below the plug assembly to allow the plug assembly to click into place.
2.2 Demonstration Program on Power-Up A repeating sequence of graphics and menus will be displayed on the LCD when power is first applied to the OP7200. Press any of the five keypad buttons immediately below the LCD to select the corresponding demonstration. When you are in a menu demo screen, press the diamond-shaped keypad button in the middle row to enter the menu choice that is highlighted, or press the up and down keys above and below the diamond-shaped keypad button to move around the menu.
2.3 Programming Cable Connections Connect the programming cable to download programs from your PC and to program and debug the OP7200. NOTE: Use only the programming cable that has a red shrink wrap around the RS-232 level converter (Part No. 101-0513), which is supplied with the OP7200 Tool Kit. Other Rabbit programming cables might not be voltage-compatible or their connector sizes may be different. Connect the 10-pin PROG connector of the programming cable to header J1 on the OP7200’s RabbitCore module.
2.4 Installing Dynamic C If you have not yet installed Dynamic C version 7.30 (or a later version), do so now by inserting the Dynamic C CD from the OP7200 Tool Kit in your PC’s CD-ROM drive. The CD will auto-install unless you have disabled auto-install on your PC. If the CD does not auto-install, click Start > Run from the Windows Start button and browse for the Dynamic C setup.exe file on your CD drive. Click OK to begin the installation once you have selected the setup.exe file.
2.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), then compile and run it by pressing F9 or by selecting Run in the Run menu. The STDIO window will open on the PC and will display a small square bouncing around in a box. This program shows that the CPU is working. The sample program described in Section 5.2.3, “Run the PINGME.
2.8 Remove Battery Tab The backup battery on the OP7200 has a plastic tab to protect the battery against discharging before the OP7200 is placed into service. Although the battery is located inside the OP7200’s protective casing, it is possible to reach the plastic tab using pliers or tweezers from the opening on the side of the OP7200 shown in Figure 4.
16 eDisplay (OP7200)
3. SUBSYSTEMS Chapter 3 describes the principal subsystems for the OP7200. • Digital I/O • Analog Features (OP7200 only) • Serial Communication • Memory • Liquid Crystal Display Controller • Keypad • OP7200 CPLD Figure 5 shows these Rabbit-based subsystems designed into the OP7200. 32 kHz 11 MHz osc osc SRAM Flash RABBIT 2000 RS-232 RS-485 CPLD Digital Input Digital Output A/D Converter Ethernet RabbitCore Module Touchscreen Controller Interface to LCD/Keypad Figure 5.
3.1 OP7200 Pinouts The OP7200 pinouts are shown in Figure 6.
3.2 Indicators 3.2.1 LEDs The OP7200 has two LEDs, Power Good and Microprocessor Bad. The green Power Good LED at DS2 indicates when power is applied to the OP7200 and that Vcc is within the proper operating range of 4.5 to 5.5 V. The LED turns off when the OP7200 is being reset. The red Microprocessor Bad LED at DS1 indicates the status of the OP7200. Following reset, DS1 will be ON and will remain ON until turned OFF by Dynamic C.
3.3 Digital I/O 3.3.1 Digital Inputs The OP7200 has 19 digital inputs, IN0–IN18, each of which is protected over a range of –36 V to +36 V. The inputs are factory-configured to be pulled up to +5 V, but they can also be pulled down to 0 V in banks of eight by changing a surface-mounted 0 Ω resistor. Figure 7 shows a sample digital input circuit. All 19 inputs are protected against noise spikes by a low-pass filter composed of a 22 kΩ series resistor and a 10 nF capacitor.
The digital inputs are each fully protected over a range of -36 V to +36 V, and can handle short spikes of ±40 V. Normal Switching Levels Digital Input Voltage +40 V +36 V Spikes Spikes +3.3 V 40 V Spikes Figure 8.
3.3.2 Digital Outputs The OP7200 has eight digital outputs, OUT0–OUT7, which are individually configurable with the digoutConfig or digoutTriStateConfig software function calls as sinking (up to 350 mA per channel) or as sourcing (up to 250 mA per channel). Figure 9 shows a wiring diagram for using the digital outputs in a sinking or a souring configuration. SINKING OUTPUTS +K Current Flow CPLD SINK CONTROL SIGNAL SOURCING OUTPUTS +K CPLD SOURCE CONTROL SIGNAL Current Flow Figure 9.
boards can be made to order in volume with the digital outputs pulled up to Vcc or +K, or pulled down to GND. Contact your authorized Rabbit distributor or your Rabbit sales representative for more information. +K is an externally supplied voltage of 9–40 V DC used primarily in combination with current sourcing outputs, and should be capable of delivering up to 2 A.
3.4 Analog Features (OP7200 only) The single A/D converter used in the OP7200 (the OP7210 does not have analog or touchscreen capabilities) has a resolution of 11 bits (single-ended mode) or 12 bits (differential mode). There are eight channels of A/D conversion, and the OP7200 also has provision for up to four digital inputs. Three of the four digital inputs are available on screw terminal header J2.
The A/D converter chip can make either single-ended or differential measurements depending on the value of the opmode parameter in the software function call. Adjacent A/D converter inputs are paired to make differential measurements. The default setup for the OP7200 is to measure only positive voltages for the ranges listed in Table 2. Table 2. Positive A/D Converter Input Voltage Ranges Min. Voltage (V) Max. Voltage (V) Amplifier 0.0 +20.0 1 10 0.0 +10.0 2 5 0.0 +5.0 4 2.5 0.0 +4.0 5 2.
The A/D converter chip can only accept positive voltages. When the 0 Ω resistor shown in Figure 11 ties the A/D attenuator circuit to analog ground, both differential inputs must be referenced to analog ground, and both inputs must be positive with respect to analog ground.
The input circuit of the OP7200 was designed to use the differential mode in a unique way to support measuring voltages in an equal range above and below ground. This method also requires you to move the 0 Ω jumper (see Figure 11) on the header associated with the A/D converter inputs (JP4, JP5, JP6, or JP7) from analog ground to the 2.048 V reference voltage. The input is connected to the even-numbered channel, and the odd-numbered channel is tied to analog ground.
3.4.3 Calibrating the A/D Converter Chip Manufacturing tolerances for resistors, bias currents, offset voltages, gain, and the like introduce errors into the A/D conversions. Ideally there would be a one-to-one straightline relationship between the input voltage and the output of the A/D converter, and a graph of such a line would have a slope of 1 and would pass through the (0,0) coordinate.
To get the best results form the A/D converter, it is necessary to calibrate each mode for each of its gains. The following table provides a grid for each possible set of calibration constants. Mode Single-Ended Gain Code 1 2 4 5 8 10 mA 16 20 4 Differential 1 2 4 5 8 10 16 20 0 1 Input 2 3 4 5 6 7 For the single-ended mode there are calibration constants for each channel and for each of its gains, for a total of 64 sets of calibration constants.
calibration is performed and the jumper is subsequently moved, the corresponding input(s) must be recalibrated. The calibration table only holds calibration constants based on mode, channel, and gain. Other factors affecting the calibration must be taken into account by calibrating using the same mode and gain setup as in the intended use. It is not necessary to fill out the entire calibration table. Only the entries associated with the modes, channels, and gains that you will be using are necessary.
3.4.4 Touchscreen The OP7200 analog touchscreen provides a high-resolution matrix of 4096 × 4096 elements. The touchscreen is mounted to the front of and is the same size as the LCD module. A four-conductor flex cable connects the touchscreen to the OP7200 at connector J13. The inputs from the touchscreen are protected from ESD by ferrite beads, capacitors, and shunt diodes. The ferrite beads and capacitors also serve to eliminate EMI radiating from the cable.
3.4.6 A/D Converter Reference Voltage (+V) A reference voltage of 2.048 V is generated by the A/D converter chip. The reference voltage is used by the touchscreen controller chip, and may also be used to bias the input attenuator circuits when bipolar inputs are to be measured. As shown in Figure 14, the factory default is for a surface-mounted 0 Ω resistor to connect pins 1–2 on header JP8. This enables the internal reference voltage of 2.048 V generated by the A/D converter chip.
3.5 Serial Communication The OP7200 has two RS-232 serial ports, which can be configured as one RS-232 serial channel (with RTS/CTS) or as two RS-232 (3-wire) channels using the serMode software function call. Table 5 summarizes the options. Table 5.
3.5.1 RS-232 The OP7200 RS-232 serial communication is supported by an RS-232 transceiver. 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 2000’s CMOS/TTL 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.
The OP7200 comes with a 220 Ω termination resistor and two 681 Ω bias resistors installed and enabled with jumpers across pins 1–2 and 4–6 on header J8, as shown in Figure 16.
3.5.3 RabbitNet Port The RJ-45 jack labeled RabbitNet is a serial I/O expansion port for use with RabbitNet I/O cards. The RabbitNet jack does not support Ethernet connections. There is also no provision for the OP7200 to supply power to any RabbitNet peripheral cards. When you are using the OP7200 in a RabbitNet network, Serial Port B is configured as a clocked serial port and the RS-485 chip drives the RabbitNet port—the OP7200 then cannot be used for RS-485 serial communication.
3.5.4 Ethernet Port Figure 17 shows the pinout for the Ethernet port (J2 on the OP7200’s RabbitCore module). 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 17) are always absolute, and the RJ-45 connector will work properly with off-the-shelf Ethernet cables.
3.5.5 Programming Port The RabbitCore module on the OP7200 has a 10-pin programming header. The programming port uses the Rabbit 2000’s Serial Port A for communication. Dynamic C uses the programming port to download and debug programs. The programming port is also used for the following operations. • Cold-boot the Rabbit 2000 on the RabbitCore module after a reset. • Remotely download and debug a program over an Ethernet connection using the RabbitLink EG2110.
3.6 Memory 3.6.1 SRAM The OP7200’s RabbitCore module is designed to accept 128K to 512K of SRAM packaged in an SOIC case. The standard OP7200’s RabbitCore modules come with 128K of SRAM. 3.6.2 Flash Memory The OP7200 is also designed to accept 128K to 512K of flash memory. The standard OP7200’s RabbitCore modules comes with one 256K flash memory.
3.7 Liquid Crystal Display Controller The LCD module controller chip provides support for the LCD module. The controller chip is attached to the data bus on the OP7200’s RabbitCore module, and is mapped to the I/O address space. This interface is composed of eight data bits, one address line, and three control lines (/IORD, /IOWR, and /LCDM-CS). The interface from the LCD controller to the LCD module is unidirectional. Data flow from the controller chip to the LCD module.
3.8 Keypad The OP7200 is equipped with a nine-position keypad. The keypad is attached to the front bezel with an adhesive backing and is connected through J16 to the OP7200 printedcircuit board with a flex cable. Only 7 of the 10 conductors in the cable are used at the present time. The extra lines are reserved for an expanded keypad or LED indicators. The interface to the keypad is through programmed I/O bits composed of four scan rows of three keys each.
3.9 OP7200 CPLD All the random logic used to control the OP7200 is contained within a single ComPlex Logic Device (CPLD). The AMD ATF1500A contains 32 macrocells and is packaged in a 44-pin TQFP. This device contains decoding and a number of I/O bits that can be set to high or low to control various functions of the OP7200. The CPLD interfaces to the address and data bus on the RabbitCore module, and is writeonly. Two chip select lines, /PE4 and /PE5, are used to enable the device.
Table 6.
3.10 Programming Cable The programming cable is used to connect the programming port of the RabbitCore module to a PC serial COM port. The programming cable converts the RS-232 voltage levels used by the PC serial port to the TTL voltage levels used by the Rabbit 2000. When the PROG connector on the programming cable is connected to the RabbitCore module’s programming header, programs can be downloaded and debugged over the serial interface.
3.11 Other Hardware 3.11.1 Spectrum Spreader OP7200 operator control panels that carry the CE mark on their RabbitCore module 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 OP7200 operator control panels that carry the CE mark when used with Dynamic C 7.30 or later versions, but the spectrum spreader may also be turned off or set to a stronger setting.
46 eDisplay (OP7200)
4. SOFTWARE Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with single-board computers and other devices based on the Rabbit microprocessor. Chapter 4 provides the libraries, function calls, and sample programs related to the OP7200. 4.1 Running Dynamic C You have a choice of doing your software development in the flash memory or in the static RAM included on the OP7200.
Developing software with Dynamic C is simple. Users can write, compile, and test C and assembly code without leaving the Dynamic C development environment. Debugging occurs while the application runs on the target. Alternatively, users can compile a program to an image file for later loading. Dynamic C runs on PCs under Windows 98 or later. Programs can be downloaded at baud rates of up to 460,800 bps after the program compiles. Dynamic C has a number of standard features.
4.1.1 Upgrading Dynamic C 4.1.1.1 Patches and Bug Fixes Dynamic C patches that focus on bug fixes are available from time to time. Check the Web site www.rabbit.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.
4.1.2 Accessing and Downloading Dynamic C Libraries The libraries needed to run the OP7200 are available on the CD included with the Development Kit. Upgrades may be downloaded from www.rabbit.com/support/downloads/ on our Web site. You may need to download upgraded or additional libraries to run selected RabbitNet peripheral boards or to use an OP7200 purchased after January, 2006, with a Dynamic C release prior to v. 9.40.
4.2 Font and Bitmap Converter The Font and Bitmap Converter is a utility included with Dynamic C to convert Windows fonts and monochrome bitmaps to a library file format compatible with Dynamic C applications and Rabbit’s graphic displays. These library files may be added to applications with the statement #use LIBRARYFILENAME.LIB or by cutting and pasting from the library file directly into the application. Remember to enter LIBRARYFILENAME.LIB into LIB.
4.3 Sample Programs Sample programs are provided in the Dynamic C SAMPLES folder. The sample program PONG.C demonstrates the output to the STDIO window. The various directories in the SAMPLES folder contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries. The SAMPLES\OP7200 folder provides sample programs specific to the OP7200. Each sample program has comments that describe the purpose and function of the program.
4.3.3 Serial Communication The following sample programs are found in the RS232 subdirectory in SAMPLES\OP7200. J10 IN12 IN13 IN14 IN15 /RST TXC RXC TXD/RTS RXD/CTS 485 +485 GND IN12 IN13 IN14 IN15 /RST TXC RXC TXD/RTS RXD/CTS 485 +485 GND • PUTS.C—This program transmits and then receives an ASCII string on Serial Ports C and D. The serial data received are displayed in the STDIO window.
• MASTER.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 OP7200 and display them in the STDIO window. Use SLAVE.C to program the slave. • SLAVE.C—This program demonstrates a simple RS-485 transmission of lower case letters to a master OP7200. The slave will send back converted upper case letters back to the master OP7200 and display them in the STDIO window. Use MASTER.
4.3.5 Graphic Display The following sample program is found in the LCD_BASIC subdirectory in SAMPLES\OP7200. • BUFFLOCK.C—Demonstrates how to improve LCD performance by using the glBuffLock and glBuffUnlock functions. • CONTRAST.C—Demonstrates how to adjust the contrast on the LCD. • PRIMITIVES.C—Demonstrates the primitive graphic functions to draw lines, circles, polygons, and bitmaps. • SCROLLING.C—Demonstrates the scrolling features of the GRAPHIC.LIB library. • TEXT.
4.3.8 Using System Information from the RabbitCore Module Calibration constants for the A/D converter are stored in the simulated EEPROM area of the flash memory. You may find it useful to retrieve the calibration constants and save them for future use, for example, if you should need to replace the RabbitCore module on the OP7200. The following sample programs, found in the Calib_Save_Retrieve subdirectory in SAMPLES\OP7200, illustrate how to save or retrieve the calibration constants.
4.4 OP7200 Libraries The following library folders contain the libraries whose function calls are used to develop applications for the OP7200. • OP7200—libraries associated with features specific to the OP7200. The functions in the OP72xx.LIB library are described in Section 4.5, “OP7200 Function APIs.”. • DISPLAYS—libraries associated with the LCD display. The GLMENU.LIB library provides function calls to display menus on the OP7200 LCD display. • KEYPADS—libraries associated with the keypad. The KEYPAD9.
4.5 OP7200 Function APIs 4.5.1 Board Initialization void brdInit (void); Call this function at the beginning of your program. This function initializes the system I/O ports and loads all the A/D converter calibration constants from flash memory into SRAM for use by your program. This function will turn off LED DS1 (Microprocessor Bad) to indicate that the initialization was successful. The ports are initialized according to Table A-3.
4.5.2 Digital I/O void digOutConfig(char outputMode); This functions is used to configure the high-current outputs as either a sinking or a sourcing type output. Note that brdInit must be executed before calling this function.
void digTriStateConfig(char triState); Allows a given channel to be configured as a tristate type output. When a channel is configured as a tristate output, then digOutTriState can be used to control that channel. A run-time error will occur for the following conditions: 1. digOut is disabled from controlling any channel that is configured as a tristate output. 2. brdInit was not executed before executing digTriStateConfig.
void digOutTriState(int channel, int state); Sets the state of a digital output channel (OUT0–OUT7). This function is intended to control a given channel as a tristate output, for example: 0 = Active low state (GND potential) 1 = Active High state (+K potential) 2 = High-Impedance state. Since switching from one state to another has some software overhead, the switching delay should be less than 1 µs. A run-time error will occur for the following conditions: 1. channel or state out of range. 2.
4.5.3 LEDs void ledOut(int led, int value) Turns LED DS1 (Microprocessor Bad) on or off. NOTE: Once the brdInit function executes, then the Microprocessor Bad indicator is available for other use in the application.
4.5.4 Serial Communication Library files included with Dynamic C provide a full range of serial communication support. 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 delimited by the 9th bit, by transmission gaps, or with user-defined special characters.
int serMode(int mode); User interface to set up OP7200 serial communication lines. Call this function after serXOpen(). Whether you are opening one or multiple serial ports, this function must be executed after executing the last serXOpen function AND before you start using any of the serial ports. This function is non-reentrant. If Mode 1 or Mode 3 is selected, CTS/RTS flow control is exercised using the serCflowcontrolOn and serCflowcontrolOff functions from the RS232.LIB library.
4.5.5 A/D Converter Inputs (OP7200 only) unsigned int anaIn(int channel, int opmode, int gaincode); Reads the state of an analog input channel.
int anaInCalib(int channel, int opmode, int gaincode, int value1, float volts1, int value2, float volts2); Calibrates the response of the A/D converter channel as a linear function using the two conversion points provided. Four values are calculated and placed into global table _adcCalib to be stored later into using the function anaInEEWr().
value1 is the first A/D converter channel value (0–2047). volts1 is the voltage or current corresponding to the first A/D converter channel value. value2 is the second A/D converter channel value (0–2047). volts2 is the voltage or current corresponding to the first A/D converter channel value. RETURN VALUE 0 if successful. -1 if not able to make calibration constants.
float anaInVolts(int channel, int gaincode); Reads the state of a single-ended analog input channel and uses the previously set calibration constants to convert the reading to volts.
float anaInDiff(unsigned int channel, unsigned int gaincode); Reads the state of a differential analog input channel and uses the previously set calibration constants to convert it to volts.
int anaInmAmps(unsigned int channel); Reads the state of an analog input channel and uses the previously set calibration constants to convert it to current. PARAMETER channel is 0–7: Channel 4–20 mA Input Lines 0 AIN0 1 AIN1 2 AIN2 3 AIN3 4 AIN4 5 AIN5 6 AIN6 7 AIN7 RETURN VALUE A current value between 4–20 mA (0.004 and 0.020 A) corresponding to the current on the analog input channel.
int anaInEERd(unsigned int channel, int opmode, unsigned int gaincode); Reads the calibration constants, gain, and offset for an input based on its designated channel code position into global table _adcCalib. The constants are stored in the top 1K of the reserved user block memory area. Use the sample program USERBLOCKINFOR.C in SAMPLES\OP7200 to get the addresses reserved for the calibration data constants and the addresses available for use by your program. NOTE: This function cannot be run in RAM.
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 on its designated channel code position from global table _adcCalib. The constants are stored in the top 1K of the reserved user block memory area. Use the sample program USERBLOCKINFOR.C in SAMPLES\OP7200 to get the addresses reserved for the calibration data constants and the addresses available for use by your program. NOTE: This function cannot be run in RAM.
RETURN VALUE 0 if successful. -1 if address is invalid or out of range.
4.5.6 Graphic Display Functions 4.5.6.1 On-Screen Menus The GLMENU.LIB library in the LIB\DISPLAYS\GRAPHIC directory provides function calls to display menus on the OP7200 LCD display. When x and y coordinates on the display screen are specified, x can range from 0 to 319, and y can range from 0 to 239. These numbers represent pixels counted from the top left corner of the display.
RETURN VALUE 0 = success -1 = border parameter value is invalid SEE ALSO glMenu, glMenuClear, glRefreshMenu int glMenu(windowMenu *mPtr, int *state, int x, int y); Displays a menu on the LCD display and get the menu options from the user. NOTE: This function will display an error message on the LCD if the menu width or height exceeds the LCD display boundaries. PARAMETERS mPtr is a pointer to structure that contains the information for the menu state is a pointer to the menu control parameter.
glMenuClear(windowMenu *mPtr); Clears the menu indicated by the WindowMenu descriptor pointer. PARAMETER mPtr is a windowMenu descriptor pointer RETURN VALUE None.
4.5.6.2 Graphic Drawing Routines The GRAPHIC.LIB library in the DISPLAYS\GRAPHIC directory provides function calls for primitive graphic drawing routines such as lines, circles, and polygons. void glInit(void); Initializes the display devices, clears the screen. This function call must be made prior to any other graphic function calls.
void glFillScreen(int pattern); Fills the LCD display screen with a pattern. PARAMETER pattern 0xFF = all black 0x00 = all white anything else = vertical stripes SEE ALSO glBlock, glBlankScreen, glPlotPolygon, glPlotCircle void glBlankScreen(void); Blanks (sets to white) the LCD display screen. SEE ALSO glFillScreen, glBlock, glPlotPolygon, glPlotCircle void glSetBrushType(int type); Sets the drawing method (or color) of pixels drawn by subsequent graphics calls.
void glGetBrushType(void); Gets the current method (or color) of pixels drawn by subsequent graphics calls. RETURN VALUE The current brush type. SEE ALSO glSetBrushType 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.
void glBlock(int x, int y, int bmWidth, int bmHeight); 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.
void glFillPolygon(int n, int x1, int y1, int x2, int y2, ...); Draws a filled 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. The function will also return, doing nothing, if there are less than 3 vertices.
void glPlotCircle(int xc, int yc, int rad); Draws a circle in the LCD page buffer, and on the LCD if the buffer is unlocked. Any portion of the circle that is outside the LCD display area will be clipped.
void glPrintf(int x, int y, fontInfo *pInfo, char *fmt, ...); Prints a formatted string (much like printf) on the LCD screen. Only the character codes that exist in the font set are printed, all others are skipped over. For example, '\b', '\t', '\n', and '\r' (ASCII backspace, tab, new line, and carriage return, respectively) will be printed if they exist in the font set, but will not have any effect as control characters.
unsigned long glFontCharAddr(fontInfo *pInfo, char letter); Returns the xmem address of a character from the specified font set. PARAMETERS pInfo is the xmem address of the bitmap font set latter is an ASCII character RETURN VALUE The xmem address of the bitmap character font, column-major and byte-aligned. SEE ALSO glPutFont, glPrintf 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.
int TextWindowFrame(windowFrame *window, fontInfo *pFont, int x, int y, int winWidth, int winHeight) Defines a text-only display window. This function provides a way to display characters within the text window only using character row and column coordinates. The text window feature provides end-of-line wrapping and clipping after the character in the last column and row is displayed.
void TextCursorLocation(windowFrame *window, int *col, int *row); Gets the current cursor location that was set by one of the graphic text functions. NOTE: Be sure to execute the TextWindowFrame function before using any of the text-only functions (TextGotoXY, TextPutChar, TextPrintf, TextCursorLocation).
void TextPrintf(struct windowFrame *window, char *fmt, ...); This function prints a formatted string (much like printf) on the LCD screen. Only printable characters in the font set are printed; escape sequences '\r' and '\n' are also recognized. All other escape sequences will be skipped over. For example, nothing will be displayed for '\b' and 't'. The text window feature provides end-of-line wrapping and clipping after the character in the last column and row is displayed.
void glHScroll(int left, int top, int cols, int rows, int nPix); Scrolls right or left within the defined window by nPix 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 column parameters will be verified that they are evenly divisible by 8. If not, they will be changed to be 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 nPix 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 column parameters will be verified that they are evenly divisible by 8. If not, they will be changed to be 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 is like glXPutBitmap, except that it's 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.
void glXGetFastmap(int left, int top, int width, int height, unsigned long xmemptr); Draws bitmap in the specified space. The data for the bitmap are stored in xmem. This is like glXPutBitmap, except that it's 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.
void TextWinClear(windowFrame *wPtr); Clears the entire area within the specified text window. PARAMETER wPtr is a pointer to the window frame descriptor SEE ALSO TextGotoXY, TextPrintf, TextWindowFrame, TextCursorLocation int TextMaxChars(windowFrame *wPtr); Returns the maximum number of characters that can be displayed within the text window. The TextWindowFrame function must be executed before running this function.
4.5.6.3 LCD Screen Control The SED1335F.LIB library in the DISPLAYS\GRAPHIC\320x240 directory provides low-level drivers for the SED1335F graphic chip. NOTE: Remember to call glInit from GRAPHIC.LIB before calling any of the functions described in this section. void glAnimation(int OnOff); Enables/disables the graphic animation mode. The animation mode is defaulted OFF when the graphic driver is executed. NOTE: The animation mode is intended to be used for special effects only.
void glSetContrast(int contrast); Sets the LCD display contrast. PARAMETER contrast represents the contrast level (0 to 31 for low to high contrast), with a typical setting of 20. SEE ALSO glBacklight void glDispOnOff(int onOff); This function is not supported at the present time.
4.5.7 Keypad Functions The KEYPAD9.LIB library in the Keypads directory provides function calls to keypad menus for the OP7200 keypad. void keyInit(void); Initializes keypad process 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. 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 3 × 4 [B] [+] [U] [-] [L] [E] [R] [S] [D] where 'E' represents the ENTER key ‘+’ represents Page Up ‘-’ represents Page Down 'D' represents Scroll Down 'U' represents Scroll Up 'L' represents Scroll Left 'R' represents Scroll Right 'S' represents Space ‘B’ represents Backspace Example: Do the following for the above physical vs. ASCII return key codes.
4.6 Touchscreen (OP7200 only) The GLTOUCHSCREEN.LIB library in the TouchScreens directory allows the user to link adjacent pixel locations on the LCD to create a button. The button can then be translated by the touchscreen when pressed.When x and y coordinates on the display screen are specified, x can range from 0 to 319, and y can range from 0 to 239. These numbers represent pixels from the top left corner of the display. unsigned long btnInit(int MaxButtons); Initializes the GLTOUCHSCREEN.
int btnRecall(unsigned long xmemPtr, int BtnID); Retrieves a btnData structure that was stored in xmem SRAM. This is function is normally called by the other functions as needed.
int btnCreateText(unsigned long xmemPtr, int BtnID, int xStart, int yStart,int xSize, int ySize, char Attribs, char Level, fontInfo *bFont, char *Text); Creates a button with a text label.
int btnCreateBitmap(unsigned long xmemPtr, int BtnID, int xStart, int yStart, char Attribs, char Level, unsigned long bmp, int bmpWidth, int bmpHeight); Creates a button with a bitmap.
int btnDisplayText(int xStart, int yStart, int xSize, int ySize, fontInfo *pInfo, char *Text); Displays text on the LCD. The text will be centered automatically both horizontally and vertically. '\n' within the text will give you the capability for multiline text.
int btnMsgBox(int xStart, int yStart, int xSize, int ySize, fontInfo *pInfo, char *Text, int Frame, int Invert); Displays a message or text box on the LCD. The box can be square or oval-framed, and it can be inverted. The text will be centered automatically both horizontally and vertically. '\n' within the text will give you the capability of multiline text.
int btnDisplayLevel(unsigned long xmemPtr, char Level); Displays predefined buttons having the same level setting. The level is defined by either btnCreateText or btnCreateBmp. btnDisplayLevel allows you to display a group of buttons with a single function call.
int btnAttributes(unsigned long xmemPtr, int btn, int RepeatCntrl,int InitRepeatDelay, int RepeatDelay, int BuzzerCntrl); Sets the button attributes for the action to be taken when the button is pressed.
int btnVerifyXY(unsigned long xmemPtr, int btn, int x, int y); Searches the list of buttons in use for a button that matches the x,y coordinates from the touchscreen. PARAMETERS xmemPtr is the xmem address of the pointer to an array of button descriptors btn is the button ID code of the button to be verified x is the x coordinate of the location on the touchscreen y is the y coordinate of the location on the touchscreen RETURN VALUE The button ID of the button corresponding to the button being verified.
The TS_R4096.LIB library in the TouchScreens directory provides low-level touchscreen function calls. int TsCalib(int x1, int y1, int x2, int y2); Calibrates the touchscreen as a linear function using the two sets of x,y coordinates provided. Gain and offset constants are calculated and placed into the global table _adcCalibTS.
void TsXYvector(int *xkey, int *ykey, int mode); Reads the current x,y coordinates of the touchscreen PARAMETERS xkey is a pointer to the x coordinate ykey is a pointer to the y coordinate mode is the mode of operation: 0 (RAW_MODE)—raw mode, returns touchscreen x, y coordinate's true raw data value 1 (CAL_MODE)—calibration mode, returns touchscreen x, y coordinates as normalized data values to match the LCD display resolution SEE ALSO TsActive, TsScanState, TsXYBuffer, brdInit int TsActive(void); This fu
long TsXYBuffer(void); This function returns either the x,y coordinates or the touchscreen BTN_RELEASE status code that was processed by the TsScanState function. RETURN VALUE The x coordinate is returned in the MSB, and the y coordinate is returned in the LSB of the long integer value.
4.7 RabbitNet Port The function calls described in this section are used to configure the OP7200 for use with RabbitNet peripheral boards. The user’s manual for the specific peripheral board you are using contains additional function calls related to the RabbitNet protocol and the individual peripheral board. Add the following lines at the start of your program.
void rn_sp_enable(int portnum); This is a macro that enables or asserts the OP7200 RabbitNet port select prior to data transfer. PARAMETERS portnum = 0 RETURN VALUE None void rn_sp_disable(int portnum); This is a macro that disables or deasserts the OP7200 RabbitNet port select to invalidate data transfer. PARAMETERS portnum = 0 RETURN VALUE None.
5. USING THE TCP/IP FEATURES Chapter 5 discusses using the TCP/IP features on the OP7200 boards. 5.1 TCP/IP Connections Before proceeding you will need to have the following items. • If you don’t have an Ethernet connection, you will need to install a 10Base-T Ethernet card (available from your favorite computer supplier) in your PC. • Two RJ-45 straight-through Ethernet cables and a hub, or an RJ-45 crossover Ethernet cable.
3. Apply Power Plug in the AC adapter. The OP7200 is now ready to be used. NOTE: A hardware RESET is accomplished by unplugging the AC adapter, then plugging it back in, or by momentarily grounding the board reset input at pin 5 on screwterminal header J10. When the PROG connector of the programming cable connects the OP7200 to your PC, and Dynamic C is running, a RESET occurs when you press .
5.2 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 that you connect your PC and the OP7200 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. 5.2.
5.2.2 How to Set Up Your Computer for Direct Connect Follow these instructions to set up your PC or notebook. Check with your administrator if you are unable to change the settings as described here since you may need administrator privileges. The instructions are specifically for Windows 2000, but the interface is similar for other versions of Windows. TIP: If you are using a PC that is already on a network, you will disconnect the PC from that network to run these sample programs.
5.2.3 Run the PINGME.C Demo Connect the crossover cable from your computer’s Ethernet port to the OP7200’s RJ-45 Ethernet connector. 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 OP7200 should be on to indicate an Ethernet connection is made.
5.2.4 Running More Demo Programs With a Direct Connection The sample programs discussed in this section use the Demonstration Board from the OP7200 Tool Kit to illustrate their operation. Appendix C, “Demonstration Board Connections,” contains diagrams of typical connections between the OP7200 and the Demonstration Board used to run these sample programs. The program FLASH_XML.C (SAMPLES\OP7200\TCPIP\) runs a Web server that has a Web page with a Macromedia Flash movie.
5.3 Where Do I Go From Here? NOTE: If you purchased your OP7200 through a distributor or Rabbit 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 Technical Bulletin Board and forums at www.rabbit.com/support/bb/ and at www.rabbit.com/forums/. • Use the Technical Support e-mail form at www.rabbit.com/support/.
120 eDisplay (OP7200)
6. INSTALLATION, MOUNTING, AND CARE GUIDELINES Chapter 6 describes some considerations for mounting the OP7200 in a panel, and includes detailed mounting instructions, protective grounding instructions, and care guidelines for cleaning the screen overlay. 6.1 Grounding CAUTION: Many of the OP7200 ICs are sensitive to static. Use extra caution when handling units in high-static areas.
6.2 Installation Guidelines When possible, following these guidelines when mounting an OP7200. 1. Leave sufficient ventilation space, at least 1" (2 cm) around the unit on all sides. 2. Do not install the OP7200 directly above machinery that radiates a lot of heat (for example, heaters, transformers, and high-power resistors). 3. Leave at least 8" (20 cm) distance from electric power lines and even more from highvoltage devices. 4.
6.3 Mounting Instructions The OP7200 comes with a gasket attached to the bezel. When properly mounted in a panel, the OP7200 bezel/gasket are designed to meet NEMA 4 specifications for water resistance. Since the OP7200 employs an LCD display, the viewing angle must be considered when mounting the display. The viewing angle is affected by the software-controlled contrast. Install the OP7200 at a height and angle that makes it easy for the operator to see the screen. 6.3.
2. Remove the OP7200 back cover. Set the screws and back cover aside since the back cover will be re-attached after the OP7200 is inserted through the cutout. 3. Carefully insert the OP7200. 4. Fasten the unit to the panel with the back cover and the four 4-40 screws that attach the back cover to the OP7200. If your panel is more than 0.1" (2.5 mm) thick, you will need to supply longer 4-40 screws.
6.4 Care Guidelines If it becomes necessary to clean the screen overlay, use a mild detergent, then rinse with lukewarm water using a clean sponge or a soft cloth. Dry thoroughly with a chamois or a moist cellulose sponge to prevent water spots. Do not use abrasives, which will scratch the hard coating on the overlay. Fresh paint splashes, grease, and smeared glazing compounds can be removed by rubbing gently with a grade of VM&P naphta, Windex®, or isopropyl alcohol.
126 eDisplay (OP7200)
APPENDIX A. SPECIFICATIONS Appendix A provides the specifications for the OP7200.
A.1 Electrical and Mechanical Specifications 5.67 (144) Figure A-1 shows the mechanical dimensions for the OP7200. 4.41 0.63 (16) (43) 1.70 (35) 1.38 0.91 (23.1) (11) 0.45 (112) 0.67 (17) 1.93 (49) 0.67 (17) 4.33 (110) Figure A-1. OP7200 Dimensions NOTE: All measurements are in inches followed by millimeters enclosed in parentheses.
Table A-1 lists the electrical, mechanical, and environmental specifications for the OP7200. Table A-1. OP7200 Specifications Feature OP7200 OP7210 Rabbit® 2000 at 22.
A.1.1 Physical Mounting Figure A-2 shows position information to assist with interfacing other boards with the OP7200. 3.470 GND J3 OUT6 OUT4 GND OUT3 OUT2 GND OUT1 OUT0 GND +K R16 DS2 DS1 LNK Y3 (112) 4.410 (119) +PWR GND +485 485 2.485 RXD (63.1) TXD RXC TXC /RST IN12 (7.0) 0.275 IN15 GND GND GND GND 4.695 PWR GND C86 R65 TVS1 GND EGND ACT J15 0.070 (1.8) (3.6) C14 JP6 0.
A.
A.3 Jumper Configurations Figure A-4 shows the header and jumper locations used to configure the various OP7200 options. JP12 JP11 JP1 JP4 JP5 JP8 JP10 Battery JP16 JP15 JP14 JP13 JP7 R62 R64 R65 JP6 J8 JP2 JP9 R71 JP3 Figure A-4. Location of OP7200 Configurable Positions (RabbitCore module is not shown) Table A-2 lists the configuration options. 0 Ω surface mount resistors are used for all the positions except JP10 and J8, which use standard pluggable jumpers. Table A-2.
Table A-2. OP7200 Jumper Configurations (continued) Header JP3 JP4 JP5 JP6 JP7 JP8 JP9 JP10 Description Pins Connected × 1–2 Pulled up to Vcc 2–3 Pulled down 1–2 Tied to 2.048 V 2–3 Tied to analog ground 1–2 Tied to 2.048 V 2–3 Tied to analog ground 1–2 Tied to 2.048 V 2–3 Tied to analog ground 1–2 Tied to 2.048 V 2–3 Tied to analog ground × 1–2 Based on A/D converter chip × 2–3 Based on ratiometric or ext.
Table A-2.
A.4 Use of Rabbit 2000 Parallel Ports Figure A-5 shows the Rabbit 2000 parallel ports. PA0PA7 Port A PC0, PC2 Port C (+Serial Ports C & D) PC1, PC3 Programming Port PC6 + 1 more output PB1, PC7, RES_IN + 2 more inputs PB0, PB2, PB4, PB5 PB7 Port B Ethernet Port Misc.
Table A-3.
A.5 I/O Address Assignments Table A-4 lists the external I/O address assignments. Table A-4. Display and Keypad I/O Addresses External Address Signal Name PBDR (Write) PB7 Port Pin 0 = LED off, 1 = LED on PB7-Up_Good LCD indicator PBDR (Read) PB5 serial data from device PB5_ADC_SDO Data from A/D converter or touchscreen /PD3_ADC_CS CS for A/D converter or touchscreen PDDR (Write) PD3 0 = ADC chip selected, 1 = touchscreen chip selected Function PEDR (Write) PE0 clock data to device on 0/1 trans.
Table A-4.
APPENDIX B. POWER SUPPLY Appendix B describes the power circuitry provided on the OP7200. B.1 Power Supplies Power is supplied to the OP7200 via pins 1 and 2 of screw-terminal header J3. The OP7200 is protected against reverse polarity by a full-wave bridge rectifier as shown in Figure B-1. The full-wave bridge rectifier also allows the OP7200 to be powered from 24 V AC.
B.1.1 Power for Analog Circuits Power to the analog circuits is provided by way of a single-stage low-pass filter, which isolates the analog section from digital noise generated by the other components. The analog power voltage +V powers the A/D converter chip, the touchscreen controller, and the reference circuit. The maximum current draw on +V is less than 10 mA. +V is not accessible to the user. B.1.
B.2 Batteries and External Battery Connections The SRAM and the real-time clock have battery backup. Power to the SRAM and the realtime clock (VRAM) on the OP7200’s RabbitCore module is provided by two different sources, depending on whether the main part of the OP7200 is powered or not. When the OP7200 is powered normally, and Vcc is within operating limits, the SRAM and the realtime clock are powered from Vcc. If power to the board is lost or falls below 4.
B.2.2 External Battery As an alternative to preserving the SRAM contents and the real-time clock settings while changing the backup battery, you may connect an external battery temporarily at header J7. The pins on header J7 have ground on the ends and positive in the center to allow the external battery to be connected without the potential of reversing its polarity. Connect the positive terminal of the external battery to pin 2 and the negative terminal to either pin 1 or pin 3 of header J7.
B.2.3 Battery-Backup Circuit Figure B-3 shows the battery-backup circuit located on the OP7200’s RabbitCore module. VBAT D3 R39 2 kW VRAM R41 11 kW R38 10 kW Vcc D2 D1 VBAT R37 22 kW C17 10 nF R36 47 kW C27 10 nF VOSC Figure B-3. OP7200 Backup Battery Circuit The battery-backup circuit serves three purposes: • 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.
B.2.4 Power to VRAM Switch The VRAM switch on the OP7200’s RabbitCore module, 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 goes low. This prevents the Vcc line from draining the battery. VCC R33 VRAM 0W Q5 FDV302P R30 10 kW /RES_OUT R17 22 kW Q2 MMBT3904 Figure B-4.
B.3 Chip Select Circuit Figure B-5 shows a schematic of the chip select circuit on the OP7200’s RabbitCore module. VRAM R28 /CSRAM 100 kW Q4 /CS1 Q3 VRAM SWITCH /RES_OUT Figure B-5. Chip Select Circuit The current drain on the battery in a battery-backed circuit must be kept at a minimum. When the OP7200 is not powered, the battery keeps the SRAM memory contents and the real-time clock (RTC) going. The SRAM has a powerdown mode that greatly reduces power consumption.
146 eDisplay (OP7200)
APPENDIX C. DEMONSTRATION BOARD CONNECTIONS Appendix C shows how to connect the Demonstration Board to the OP7200. C.1 Connecting Demonstration Board Before running sample programs based on the Demonstration Board, you will have to connect the Demonstration Board from the OP7200 Tool Kit to the OP7200 board. Proceed as follows. 1. Use the wires included in the OP7200 Tool Kit to connect header J1 on the Demonstration Board to the OP7200. The connections are shown in Figure C-1 for sample program DIGIN.
USR PWR R91 D8 OUT0 D9 C82 +K C84 C85 R151 R152 R36 Q31 R89 R84 R85 R83 R82 IN6 R169 C40 TXD RXC R87 R162 R88 IN5 PROG R86 J10 JP9 IN4 R165 R164 TXC IN3 RXD J16 IN7 R71 IN11 IN15 BUZZER LED4 LED3 LED2 LED1 K LED1 LED2 LED3 LED4 1-2 3-4 5-6 DEMO BOARD BUZZER H1 ·· ·· ·· ·· ·· ·· ·· +5V Jumpers: H1: None H2: As shown SW4 H2 SW3 SW4 8-7 SW3 6-5 SW2 4-3 SW1 2-1 J17 J11 J12 J13 J14 J15 SW2 K GND SW1 SW2 SW3 SW4 R-Net SW1 J31 +PWR J1012 GND
USR PWR R91 +K PWR C84 RXD TXD RXC TXC IN15 IN14 3-4 5-6 DEMO BOARD BUZZER IN12 H1 SW4 8-7 SW3 6-5 SW2 4-3 SW1 2-1 J10 BUZZER LED1 LED2 LED3 LED4 1-2 ·· ·· ·· ·· IN13 J1 LED4 LED3 C50 C51 J34 OUT00 GND J1012 J31&J33 +PWR+K J35 OUT01 J36 OUT02 J37 OUT03 J38 OUT04 Demonstration Board (Header R-Net J1) LED2 IN11 OP7200 (Headers J3/J10) E-Net ACT 1 LED1 IN10 J12 LNK K JP3 IN9 R90 C48 ·· ·· ·· +5V IN8 J6 H2 SW4 IN7 R71 R72 R59 R60 R66 SW3 C40 SW2 R8
USR PWR C18 C17 R37 D6 R39 D8 D9 OUT0 R55 +K C84 C85 485 R149 J16 R36 C40 IN7 TXD R71 IN15 IN14 IN13 IN12 J10 BUZZER LED4 LED3 3-4 5-6 DEMO BOARD BUZZER H1 SW4 8-7 SW3 6-5 SW2 4-3 SW1 2-1 J17 J11 J12 J13 J14 J15 J18 J19 J110 J111 LED1 LED2 LED3 LED4 1-2 ·· ·· ·· ·· K GND SW1 SW2 SW3 SW4 LED1 LED2 LED3 LED4 LED2 +PWR -PWR IN0 IN1 IN2 IN3 OUT0 OUT1 OUT2 OUT3 LED1 J31 J32 J61 J62 J63 J64 J34 J35 J36 J37 R-Net Demonstration Board (Header J1) K
APPENDIX D. RABBITNET D.1 General RabbitNet Description RabbitNet is a high-speed synchronous protocol developed by Rabbit to connect peripheral cards to a master and to allow them to communicate with each other. D.1.1 RabbitNet Connections All RabbitNet connections are made point to point. A RabbitNet master port can only be connected directly to a peripheral card, and the number of peripheral cards is limited by the number of available RabbitNet ports on the master.
Use a straight-through Ethernet cable to connect the master to slave peripheral cards, unless you are using a device such as the OP7200 that could be used either as a master or a slave. In this case you would use a crossover cable to connect an OP7200 that is being used as a slave (note that Dynamic C does not support the operation of the OP7200 as a slave at the present time). Distances between a master unit and peripheral cards can be up to 10 m or 33 ft. D.1.
D.2 Physical Implementation There are four signaling functions associated with a RabbitNet connection. From the master’s point of view, the transmit function carries information and commands to the peripheral board. The receive function is used to read back information sent to the master by the peripheral board. A clock is used to synchronize data going between the two devices at high speed. The master is the source of this clock.
D.3 Function Calls The function calls described in this section are used with all RabbitNet peripheral boards, and are available in the RNET.LIB library in the Dynamic C RABBITNET folder. If you are planning to use any of the RS-232 serial ports and the RabbitNet port on the OP7200, initialize the serial port(s) before you initialize the RabbitNet port. The following sample code illustrates this sequence.
int rn_device(char pna); Returns an address index to device information from a given physical node address. This function will check device information to determine that the peripheral board is connected to a master. PARAMETER pna is the physical node address, indicated as a byte. 7,6—Port number 5,4,3—Level 1 downstream port 2,1,0—Level 2 downstream port RETURN VALUE Pointer to device information. -1 indicates that the peripheral board either cannot be identified or is not connected to the master.
int rn_echo(int handle, char sendecho, char *recdata); The peripheral board sends back the character the master sent. This function will check device information to determine that the peripheral board is connected to a master. PARAMETERS handle is an address index to device information. Use rn_device() or rn_find() to establish the handle. sendecho is the character to echo back. recdata is a pointer to the return address of the character from the device.
int rn_read(int handle, int regno, char *recdata, int datalen); Reads a string from the specified device and register. Waits for results. This function will check device information to determine that the peripheral board is connected to a master. PARAMETERS handle is an address index to device information. Use rn_device() or rn_find() to establish the handle. regno is the command register number as designated by each device. recdata is a pointer to the address of the string to read from the device.
int rn_sw_wdt(int handle, float timeout); Sets software watchdog timeout period. Call this function prior to enabling the software watchdog timer. This function will check device information to determine that the peripheral board is connected to a master. PARAMETERS handle is an address index to device information. Use rn_device() or rn_find() to establish the handle. timeout is a timeout period from 0.025 to 6.375 seconds in increments of 0.025 seconds.
int rn_hitwd(int handle, char *count); Hits software watchdog. Set the timeout period and enable the software watchdog prior to using this function. This function will check device information to determine that the peripheral board is connected to a master. PARAMETERS handle is an address index to device information. Use rn_device() or rn_find() to establish the handle. count is a pointer to return the present count of the software watchdog timer.
int rn_comm_status(int handle, char *retdata); PARAMETERS handle is an address index to device information. Use rn_device() or rn_find() to establish the handle. retdata is a pointer to the return address of the communication byte. A set bit indicates which error occurred. This register is cleared when read.
INDEX A A/D converter ....................... 24 4–20 mA current measurements ............................. 27 analog reference voltage ................................. 31, 32 bipolar voltages ................. 27 calibration constants board serial number ....... 56 function calls anaIn .............................. 65 anaInCalib ..................... 66 anaInEERd .................... 71 anaInEEwR ................... 73 anaInmAmps ................. 70 anaInVolts .....................
K keypad function calls keyConfig ......................96 keyGet ...........................97 keyInit ............................96 keypadDef .....................98 keyProcess .....................97 keyScan .........................98 L LCD function calls glBlankScreen ...............79 glBlock ..........................81 glBuffUnlock .................78 glFillCircle .....................83 glFillPolygon .................82 glFillVPolygon ..............82 glFontCharAddr .............
S sample programs ................... 52 A/D converter ADCAL_DIFF_2V.C .... 54 ADCAL_DIFF_GND.C 54 ADCAL_MA_CH.C ..... 54 ADCAL_SE_ALL.C ..... 54 ADCAL_SE_CH.C ....... 54 ADRD_DIFF_2V.C ...... 54 ADRD_DIFF_GND.C ............................... 30, 54 ADRD_MA_CH.C .. 30, 54 ADRD_SE_ALL.C ....... 54 ADRD_SE_CH.C ......... 54 BOARD_ID.C ................... 52 calibration constants GETCALIB.C ............... 56 SAVECALIB.C ............ 56 digital I/O BUZZER.C ................... 52 DIGBANKOUT.C ........
164 eDisplay (OP7200)
SCHEMATICS 090-0120 RCM2200 Schematic www.rabbit.com/documentation/schemat/090-0120.pdf 090-0138 OP7200 Schematic www.rabbit.com/documentation/schemat/090-0138.pdf 090-0042 Demonstration Board Schematic www.rabbit.com/documentation/schemat/090-0042.pdf 090-0128 Programming Cable Schematic www.rabbit.com/documentation/schemat/090-0128.pdf You may use the URL information provided above to access the latest schematics directly.