Rabbit eDisplay, OP7200 User Manual

eDisplay (OP7200)
¼ VGA Operator Control Panel
User’s Manual
019–0116 • 081115–L
OP7200 User’s Manual
©2002–2008 Digi International Inc. • All rights res erved.
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. These copies of the manuals may not be let or sold for any reason without the express written permission of Digi International.
Digi International reserves the right to make changes and
improvements to its products without providing n otice.
T r ade mark s
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Rabbit 2000, RabbitCore, and RabbitNet are trademarks of Digi International Inc.
The latest revision of this manual is available on the Rabbit Web sit e, www.rabbit.com, for free, unregistered download.
Digi International Inc.
www.rabbit.com
eDisplay (OP7200)

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.2 Software........................................................................................................................................4
1.3 RabbitNet Peripheral Cards..................................................................................................................5
1.4 CE Compliance.....................................................................................................................................6
1.4.1 Design Guidelines.........................................................................................................................7
1.4.2 Interfacing the OP7200 to Other Devices .....................................................................................7
Chapter 2. Getting Started 9
2.1 Power Supply Connections.................................................................................................................10
2.2 Demonstration Program on Power-Up...............................................................................................11
2.3 Programming Cable Connections.......................................................................................................12
2.4 Installing Dynamic C..........................................................................................................................13
2.5 Starting Dynamic C ............................................................................................................................13
2.6 PONG.C..............................................................................................................................................14
2.7 Where Do I Go From Here? ...............................................................................................................14
2.8 Remove Battery Tab...........................................................................................................................15
Chapter 3. Subsystems 17
3.1 OP7200 Pinouts..................................................................................................................................18
3.1.1 Headers and Screw Terminals.....................................................................................................18
3.2 Indicators ............................................................................................................................................19
3.2.1 LEDs ...........................................................................................................................................19
3.2.2 Buzzer .........................................................................................................................................19
3.3 Digital I/O...........................................................................................................................................20
3.3.1 Digital Inputs...............................................................................................................................20
3.3.2 Digital Outputs............................................................................................................................22
3.4 Analog Features (OP7200 only).........................................................................................................24
3.4.1 A/D Converter Inputs..................................................................................................................24
3.4.2 Analog Current Measurements...................................................................................................27
3.4.3 Calibrating the A/D Converter Chip...........................................................................................28
3.4.4 Touchscreen................................................................................................................................31
3.4.5 Analog Supply Voltage...............................................................................................................31
3.4.6 A/D Converter Reference Voltage (+V).....................................................................................32
3.5 Serial Communication ........................................................................................................................33
3.5.1 RS-232 ........................................................................................................................................34
3.5.2 RS-485 ........................................................................................................................................34
3.5.3 RabbitNet Port.............................................................................................................................36
3.5.4 Ethernet Port ...............................................................................................................................37
3.5.5 Programming Port.......................................................................................................................38
3.6 Memory...............................................................................................................................................39
3.6.1 SRAM .........................................................................................................................................39
3.6.2 Flash Memory.............................................................................................................................39
3.7 Liquid Crystal Display Controller......................................................................................................40
User’s Manual
3.8 Keypad ...............................................................................................................................................41
3.9 OP7200 CPLD....................................................................................................................................42
3.10 Programming Cable..........................................................................................................................44
3.10.1 Changing Between Program Mode and Run Mode..................................................................44
3.11 Other Hardware................................................................................................................................45
3.11.1 Spectrum Spreader....................................................................................................................45
Chapter 4. Software 47
4.1 Running Dynamic C...........................................................................................................................47
4.1.1 Upgrading Dynamic C................................................................................................................49
4.1.2 Accessing and Downloading Dynamic C Libraries ...................................................................50
4.2 Font and Bitmap Converter................................................................................................................51
4.3 Sample Programs................................................................................................................................52
4.3.1 General OP7200 Sample Programs............................................................................................ 52
4.3.2 Digital I/O...................................................................................................................................52
4.3.3 Serial Communication................................................................................................................53
4.3.4 A/D Converter Inputs.................................................................................................................54
4.3.5 Graphic Display..........................................................................................................................55
4.3.6 Keypad........................................................................................................................................55
4.3.7 Touchscreen (OP7200 only).......................................................................................................55
4.3.8 Using System Information from the RabbitCore Module..........................................................56
4.4 OP7200 Libraries...............................................................................................................................57
4.5 OP7200 Function APIs.......................................................................................................................58
4.5.1 Board Initialization.....................................................................................................................58
4.5.2 Digital I/O...................................................................................................................................59
4.5.3 LEDs...........................................................................................................................................62
4.5.4 Serial Communication................................................................................................................63
4.5.5 A/D Converter Inputs (OP7200 only) ........................................................................................65
4.5.6 Graphic Display Functions.........................................................................................................75
4.5.7 Keypad Functions.......................................................................................................................96
4.6 Touchscreen (OP7200 only)...............................................................................................................99
4.7 RabbitNet Port..................................................................................................................................111
Chapter 5. Using the TCP/IP Features 113
5.1 TCP/IP Connections.........................................................................................................................113
5.2 TCP/IP Sample Programs.................................................................................................................115
5.2.1 How to Set IP Addresses in the Sample Programs...................................................................115
5.2.2 How to Set Up Your Computer for Direct Connect.................................................................116
5.2.3 Run the PINGME.C Demo.......................................................................................................117
5.2.4 Running More Demo Programs With a Direct Connection .....................................................118
5.3 Where Do I Go From Here?.............................................................................................................119
Chapter 6. Installation, Mounting, and Care Guidelines 121
6.1 Grounding.........................................................................................................................................121
6.2 Installation Guidelines......................................................................................................................122
6.3 Mounting Instructions......................................................................................................................123
6.3.1 Bezel-Mount Installation..........................................................................................................123
6.4 Care Guidelines................................................................................................................................125
Appendix A. Specifications 127
A.1 Electrical and Mechanical Specifications........................................................................................128
A.1.1 Physical Mounting...................................................................................................................130
A.2 Conformal Coating..........................................................................................................................131
A.3 Jumper Configurations....................................................................................................................132
A.4 Use of Rabbit 2000 Parallel Ports...................................................................................................135
A.5 I/O Address Assignments................................................................................................................137
eDisplay (OP7200)
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........................................................................................................140
B.2 Batteries and External Battery Connections .................................. ...... ....................................... . ....141
B.2.1 Replacing the Backup Battery..................................................................................................141
B.2.2 External Battery........................................................................................................................142
B.2.3 Battery-Backup Circuit.............................................................................................................143
B.2.4 Power to VRAM Switch...........................................................................................................144
B.2.5 Reset Generator........................................................................................................................144
B.3 Chip Select Circuit...........................................................................................................................145
Appendix C. Demonstration Board Connections 147
C.1 Connecting Demonstration Board....................................................................................................147
Appendix D. RabbitNet 151
D.1 General RabbitNet Description........................................................................................................151
D.1.1 RabbitNet Connections............................................................................................................151
D.1.2 RabbitNet Peripheral Cards......................................................................................................152
D.2 Physical Implementation..................................................................................................................153
D.2.1 Control and Routing.................................................................................................................153
D.3 Function Calls..................................................................................................................................154
D.3.1 Status Byte ...............................................................................................................................160
Index 161
Schematics 165
User’s Manual
eDisplay (OP7200)

1. INTRODUCTION

The OP7200 intelligent operator interface is a small, high­performance, C-programmable data acquisi tion and dis play 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 operating at 22.1 MHz provides fast data processing.
The OP7200 is designed for panel mounting and is NEMA-4 compatible. The OP7200 incorporates the powerful Rabbit 2000 microprocessor, flash memory, static RAM, industrialized digi­tal I/O ports, RS-232/RS-485 serial ports, a 10/100-compatible Ethernet port, and eight optional A/D converter inputs and touchscreen.
®
2000 microprocessor

1.1 Features

Small size: 4.4" × 5.7" × 1.7" (112 mm × 144 mm × 43 mm).
¼ VGA LCM display (320 × 240 pixels) with white LED backlight.
Software-controlled LCD contrast and backlight on/off.
9-key keypad.
LCD controller and SRAM compatible with OP7100.
4 status LEDs.
24 digital I/O: 16 filtered digital inputs with an input range of ±36 V DC and a switch-
ing point of 2.4 V, and 8 sourcing/sinking/tristate high-current outputs (250/350/0 mA).
Rabbit 2000 microprocessor operating at 22.1 MHz.
Audible alarm buzzer.
128K static RAM and 256K flash memory standard.
One RJ-45 10/100-compatible Ethernet port with a 10Base-T Ethernet interface.
User’s Manual 1
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. Their standard features are summarized in Table 1.
Table 1. OP7200 Models
Feature OP7200 OP7210
Microprocessor Rabbit 2000 running at 22.1 MHz Stati c RAM 128K Flash Memory 256K RJ-45 Ethernet Connector and
Filter Capacitors RabbitCore Module Used RCM2200 A/D Converter Inputs Yes No 4096 × 4096 To uchscreen Yes No
Yes
Additional 512K flash/512K SRAM memory options are available for custom orders involving nominal lead times. Contact your Rabbit sales representative or authorized distributor for more information.
Throughout this manual, the term OP7200 refers to the complete series of OP7200 opera­tor interfaces unless other production models are referred to specifically.
Appendix A provides detailed specifications.
Visit our Web site for up-to-date information about additional add-ons and features as they become available. The Web site also has the latest revision of this user’s manual.
2 eDisplay (OP7200)

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).
Demonstration Board with pushbutton switches and LEDs. The Demonstration Board can be hooked up to the OP7200 to demonstrate the I/O.
Wire assembly to connect Demonstration Board to OP7200.
Screwdriver.
Rabbit 2000 Processor Easy Reference poster.
Registration card.
Programming
DIAG
PROG
eDisplay (OP7200)
The OP7200 intelligent operator interface is a small, high-performance, C-programmable data acquisition and display unit that offers built-in I/O, Ethernet connectivity, and an optional touchscreen. These Getting Started instructions included with the Tool Kit will help you get your OP7200 up and running so that you can run the sample programs to explore its capabilities and develop your own applications.
Tool Kit Contents
The OP7200 Tool Kit contains the following items:
Dynamic C CD-ROM, with complete product documentation on disk.
Demonstration Board with pushbutton switches and LEDs.
Wire assembly to connect Demonstration Board to OP7200.
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).
Screwdriver.
Getting Started instructions.
Rabbit 2000 Processor Easy Reference poster.
Registration card.
Visit our online Rabbit store at www.rabbit.com/store/ for the latest information on peripherals and acces­sories that are available for the OP7200 operator interface.
Step 1 — Install Dynamic C
Before doing any development, you must install Dynamic C. Insert the CD from the Tool Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe program in the root directory of the Dynamic C CD. Install any Dynamic C modules after you install Dynamic C
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Cable
®
Getting Started
Instructions
Universal
AC Adapter
with Plugs
Screwdriver
Demo Board Wire
·
S
S
G
W
W
N
D
3
2
1
H2
.
· ·
SW1 SW2 SW3 SW4
· ·
· ·
3-4
5-6
LED1 LED2 LED3 LED4
1-2
DEMO BOARD
-1
L
K
+
S
S
E
E
5
W
W
V
D
D
4
2
1
·
·
·
·
H
·
·
·
·
1
2
8
6
4
-3
-7
-5
L
E
D
3
BUZZER
1
B
L
L
E
U
D
Z
4
Z
E
R
J
·
·
·
·
·
·
·
·
·
·
·
Demo Board
Figure 1. OP7200 Tool Kit
User’s Manual 3

1.2.2 Software

The OP7200 is programmed using version 7.30 or later of Rabbit’s Dynamic C. A compat-
ible 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), FA T file system, R abbit­Web, and other select libraries t hat were pr eviousl y sol d as indi vidual Dynamic C modu les.
Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library. In addi­tion to the Web-based technical support included at no extra charge, a one-year telephone­based technical support subscription is also available for purchase. Visit our Web site at
www.rabbit.com for further information and complete documentation, or contact your
Rabbit sales representative or authorized distributor.
4 eDisplay (OP7200)

1.3 RabbitNet Peripheral Cards

RabbitNet™ is an SPI serial protocol that uses a robust RS-422 differential signalling inter­face (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.
Digital I/O
A/D converter
D/A converter
Display/Keypad interface
Relay card
Appendix D provides additional information on RabbitNet peripheral cards and the Rabbit­Net protocol. Visit our Web site for up-to-date information about additional add-ons and fea-
tures as they become availa ble.
User’s Manual 5

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 o r 100 µV/m
These limits apply over the range of 30–230 MHz. The limits are 7 dB higher for frequencies above 230 MHz. Although the test range goes to 1 GHz, the emissions from Rabbit-based systems at frequencies above 300 MHz are generally well below background noise levels.
The OP7200 has been tested and was found to be in conformity with the following applicable immunity and emission standards. The OP7210 is also CE qualified as it is a sub-version of the OP7200. Boards that are CE-compliant have the CE mark.
NOTE: Earlier versions of the OP7200 sold before 2003 that do not
have the CE mark are not CE-compliant.
Immunity
The OP7200 operator control panels meet the following EN55024/1998 immunity stan­dards.
EN61000-4-2 (ESD)
EN61000-4-3 (Radiated Immunity)
EN61000-4-4 (EFT)
EN61000-4-6 (Conducted Immunity)
Additional shielding or filtering may be required for a heavy industrial environment.
Emissions
The OP7200 operator control panels meet the following emission standards emission stan­dards with the Rabbit 2000 spectrum spreader turned on and set to the normal mode. The spectrum spreader is only available with Rev. C or higher of the Rabbit 2000 microproces­sor. This microprocessor is used on the OP7200 operator control panels that carry the CE mark.
EN55022:1998 Class B
FCC Part 15 Class B
Your results may vary, depending on your application, so additional shielding or filtering may be needed to maintain the Class B emission qualification.
6 eDisplay (OP7200)

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 T ool 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 provid­ing CE-approved surge/lightning protection.
Rabbit recommends placing digital I/O or analog cables that are 3 m or longer in a metal conduit to assist in maintaining CE compliance and to conform to good cable design practices. Rabbit also recommends using properly shielded I/O cables in noisy electromagnetic environments.
While the OP7200 meets the EN61000-4-2 (ESD) requirements in that it can withstand contact discharges of ± 4 kV and air discharges of ± 8 kV, it is the responsibility of the end-user to use proper ESD precautions to prevent ESD damage when installing or ser­vicing the OP7200.
To meet electromagnetic compatibility requirements, and in particular to prevent mis­operation or damage from electrostatic discharges, connect the bezel to a protective ground via a low-impedance path as explained in Section 6.1.
Safety
For personal safety, all inputs and outputs to and from the OP7200 must not be con­nected to voltages exceeding SELV levels (42.4 V AC peak, or 60 V DC). Damage to the Rabbit 2000 microprocessor may result if voltages outside the design range of 0 V to 5.5 V DC are applied directly to any of its digital inputs.
The lithium backup battery circuit on the OP7200 has been designed to protect the bat­tery from hazardous conditions such as reverse charging and excessive current flows. Do not disable the safety features of the design.

1.4.2 Interfacing the OP 7200 to Other Devices

Since the OP7200 operator control panels are designed to be connected to other devices, good EMC practices should be followed to ensure compliance. CE compliance is ulti­mately the responsibility of the integrator. Additional information, tips, and technical assistance are available from your authorized Rabbit distributor, and are also available on our Web site at www.rabbit.com.
User’s Manual 7
8 eDisplay (OP7200)

2. GETTING S TARTED

Chapter 2 explains how to connect the programming cable and power supply to the OP7200.
User’s Manual 9

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 T ool 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.
Connect the bare ends of the power supply to the +PWR and -PWR positions on pins 1 and 2 of screw terminal header J3 as shown in Figure 2. The polarity of your connec­tions is not important because the power-supply circuit has a full-wave bridge rectifier.
USR PWR
DS1
Q5
1
D13
D14 D15
D12
R1
R2
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 IN9 IN10 IN11
J13
JP1
C1
1
R18
R15
C4
R17
R16
C2
C33
JP4
R20
R19
R61
R26
R108
R25
C65
R159
R28
R27
JP5
R30
C66
J2
JP6 R29 R31
R147
R40
R42
Q12
R41
R44
R43
R46
R45
Battery
C32
J2
JP7
L2
C31
J6
1
JP2
J1
C36
R75
R74
C43
R82
R83
R84
PROG
C44
JP3
R90
C48
J6
J12
C5
C61
C60
Y1
JP8
R80
D10
R76
R77
1
J9
C57
CAUTION: Disconnect power before making or removing terminal connections.
J7
R81
D11
R79
R78
R165
R164
R88
R87
R162
R85
R89
R86
LNK ACT
C51
C50
U2
60
J14
MSTR
132
JP10
SLAVE
LS1
Q13
C39
L9
J16
JP9
Q31
R36
R169
C40
J15
E-Net
R91
Q2
R24
Q4
R23
Q3
R22
Q8
R38
Q7
R37
Q6
R39
4
Q11
R55
Q10
R56
R64
C13
1
C49
D24
J10
1
R-Net
J3
C82
J8
R152
R151
DS2
J3
R14
D1
C7
D3
C8
D2
C6
D5
C18
D4
C17
D6 D8
C16 C30
D9
C29
R65
R62
C86
 +
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D23
D20
TVS1
C85
C84
R149
R71
R72 R59 R60 R66
J10
GND
RESET input
IN12 IN13 IN14 IN15 /RST TXC RXC TXD RXD 485 +485 GND
Remove slot cover,
1
insert tab into slot
Assemble
AC Adapter
Snap plug into place
2
Figure 2. Power Supply Connections
2. Apply power. Plug in the AC adapter. If you are using your own power supply, it must provide 9 V to
40 V DC or 24 V AC—voltages outside this range could damage the OP7200.
NOTE: A hardware RESET is done by unplugging the AC adapt er, then plugging it back in.
Y ou may al so reset the OP7200 by groundi ng the reset input l ocated on pin 5 of screw-t erminal header J10.
CAUTION: Unplug the power supply while you make or otherwis e work wit h the co nnection s
to the screw-terminal headers. This will prote ct your OP7 200 from inadver tent short s or power spikes.
10 eDisplay (OP7200)

2.2 Demonstration Program on Power-Up

A repeating sequence of graphics and menus will be displ ayed o n the LCD whe n 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 key­pad button to move around the menu.
Note that the programming cable should not be connected for this demonstration. This demonstration will be replaced by a new program when the programming cable is
attached and the new program is compiled and run. The demonstration is available for future reference in the Dynamic C SAMPLES\OP7200 directory as FUN.C.
User’s Manual 11

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. 1 01-0513), wh ich is s upplied wi th 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. Ensure that the colored edge lines up with pin 1 as shown. (Do not use the DIAG connector , which is used for monitoring only.) Connect the other end of the programming cable to a COM port on your PC. Make a note of the port to which you connect the cable, as Dynamic C will need to have this parameter configured. Note that COM1 on the PC is the default COM port used by Dynamic C.
J1
PROG
USR PWR
CAUTION: Disconnect power
before making or removing
1
terminal connections.
D
Q5
1
J10
U2
60
R 3 8
Q7
1
R
3
J14
MSTR
7
132
Q6
JP10
R
4
3 9
SLAVE
Q11
LS1
R 5 5
Q10
9 R 5 6
R
R
6
6
6
5
2
4
C13
C49
1 S
C
V
8
T
2
J8
R
R
C
C
1
1
8
8
5
5
5
4
2
1
R
D24
1 4
9
X
R
C X
T
R71
T
S
R72
R /
R59
R60
5
1
R66
IN
4 1
IN
3
1 N I
2 1
IN
J10
D13
D14 D15
D12
R
2
J13
J
C
P
1
1
C 4
C
C
2
3
3 J P
4
R61
J
C
R159
P
6
8
5
R 1
J7
4 7
R81
D11
R
C2
3
U3
Y2
9
R 7
9
EP
Flas
RO
h
M
JP
R165
3
R164
R162
JP1
DS2
L
D
N
S
K
1
ACT
C 5
C 6
1
C 6 0
Y1
C 5
7
Q13
C39
L9
C1
U8
U7
C7
J16
J P 9
Q31
1
R36
R169 C30
C40
JP2
C29
GND
JP5
GND
JP6
R-Net
EGND
J15
D
S
S
1
2
R91
J3
R14
D1
J3
Q2
R
2
4
Q4
3
R 2 3
D
Q3
2
R 2 2
D
Q8
5
C18
D
C17
4
D
6
C16
D
C30
8
D
C 2 9
R
C 8
6
D23
D20
D N
G
5 8 4
+
5 8 4
D X R
D X
T
C
D
C7
N G
7 T
D
U O
6
C8
T
U
C6
O
5 T U
O
4
T U O
3 T U
O
2 T U
O
1 T U
O
0
T U O
K
+
R
W P 
R W P +
To
PC COM port
Programming
Cable
Colored edge
Red
shrink wrap
DIAG
R 1
IN
J2
1
6 I
N
R
R
1
1
1
7
8
5
I N
R
R
1
1
1
8
7
6
R20
A IN
R 1
0
9 R 2
A
6
I N
R
PROG
3
IN
4
IN
5
I N 6
I N
7
IN
8
I N 9
IN
1 0
Q3
I
N 1 1
1
1
R25
0
A
8
R28
I
R
N
J
2
2
P
7
5
R
3
A
C
0
I
6
N
J P
7
R2
J P 2
3
Y1
6
R1
R 8 2
3
R41 R44
1
3
R46
R 4
5
L2
PROG
C
R
C4
7
7
4
5
C17
J9
R
R
8
8
4
R18
C14
R16
Y3
R29 R31
4 2
R 4
C32
C31
R
R8
C28
C 2
5
E-Net
5 0
R 4 0 R
Battery
R36
R 8 5
U2
C
6 J P
6
Q12
CAUTION
1
R80
D10
C
D2
3
C
R7
2 7
U6
R
R
R
7
7
3
7
6
8
8
R37
RT1
D3
R
R
8
8
8
7
R 8
9
J2
R86
C 5 1
D1
7 1
R R 4
JP4
LNK ACT
3 A
IN
4
A
IN 5 A
I N 6
A
I N 7
A
G N D
J2
J6
I N 0
J1
IN
1
IN 2
IN
C8
R9
J6
R 1
R
3
1
1
C43
BT1
U1
C44
R15
C12
R17
J
P
Q2
R21
C13
R22
3
R20
R90
R19
C48 Q4
Q5
J12
Figure 3. Programming Cable Connections
NOTE: Some PCs now come equipped only with a USB port. It may be possible to use an
RS-232/USB converter (Part No. 20-151-0178) with the programming cable supplied with the OP7200 Tool Kit. Note that not all RS-232/USB converters work with Dynamic C.
12 eDisplay (OP7200)

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 St art 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.
The online documentation is installed along with Dynamic C, and an icon for the docu­mentation menu is placed on the workstation’s desktop. Double-click this icon to reach the menu. If the icon is missing, create a new desktop icon that points to default.htm in the
docs folder, found in the Dynamic C installation folder.
The latest versions of all documents are always available for free, unregistered download from our web sites as well.
The Dynamic C User’s Manual provides detailed instructions for the installation of Dynamic C and any future upgrades.
NOTE: If you have an earlier version of Dynamic C already installed, the default instal-
lation of the la te r ver sion wi ll b e in a dif f erent fold er, and a separate icon will appear on your desktop.

2.5 Starting Dynamic C

Once the OP7200 is connected to your PC and to a power source, start Dynamic C by double-clicking the Dynamic C icon on your desktop or in your Start menu. Dynamic C uses the serial port specified during installation
If you are using a USB port to connect your PC to the OP7200, choose Options > Pro ject
Options cations
Dynamic C assumes, by default, that you are using serial port COM1 on your PC when you are running a program. If you OP7200 and go through a sequence BIOS. If the error message “Rabbit Processor Not Detected” appears, you have probably connected to a different PC serial port such as COM2, COM3, or COM4. You can change the serial port used by Dynamic C with the OPTIONS menu, then try to get Dynamic C to recognize the OP7200 by selecting Reset T arget/Compile BIOS on the Compile menu or by pressing <Ctrl-Y>. Try the different COM ports in the OPTIONS menu until you find the one you are connected to. If you still can’t get Dynamic C to recognize the target on any port, then the hookup may be wrong or the COM port might not working on your PC.
If you receive the “BIOS successfully compiled …” message after pressing <Ctrl-Y> or starting Dynamic C, and this message is followed by a communications error message, it is possible that your PC cannot handle the 115,200 bps baud rate. Try changing the baud rate to 57,600 bps as follows.
and check “Use USB to Serial Converter” in “Serial Options” on the Communi-
tab. Click OK to save the settings.
are
using COM1, then Dynamic C should detect the
of steps to cold-boot the OP7200 and to compile the
Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Change the baud rate to 57,600 bps.
User’s Manual 13

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 dis­play 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.C Demo,” tests the TCP/IP portion of the board.

2.7 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/. If the sample program ran fine, you are now ready to go on to explore other OP7200 fea-
tures and develop your own applications. The following sample programs illustrate the features and operation of the OP7200.
Basic Keypad Touchscreen
BUFFLOCK.C CONTRAST.C PRIMITIVES.C SCROLLING.C TEXT.C
KP_16KEY.LIB KP_ANALOG.C KP_BASIC.C KP_MENU.C
BTN_16KEY.C BTN_BASICS.C BTN_KEYBOARD.C CAL_TOUCHSCREEN.C RD_TOUCHSCREEN.C
These sample programs can be used as templates for applications you may wish to develop.
Chapter 3, “Subsystems,” provides a description of the OP7200’s features, Chapter 4, “Software,” describes the Dynamic C software libraries and introduces some sample pro­grams. Chapter 5, “Using the TCP/IP Features,” explains the TCP/IP features.
14 eDisplay (OP7200)

2.8 Remove Battery Tab

The backup battery on the OP7200 has a plastic tab to protect the battery against discharg­ing 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.
USR PWR
Pull
Plastic
Tab
R
R
1
2
IN 1 6 IN
1 7
IN
1
8 A IN
0 A
IN
1 A
IN 2 A
IN
3
A
R31
IN 4
A
IN 5
A
R41
IN
R44
R
6
A
4
1
3
R46
IN
R 4
7
5
A
G N D
J2
JP
7
L2
C31
J6
IN 0 IN
1 IN
2
IN 3 IN
J6
4 IN
R 13
5 IN
BT1
6
U1
IN
7 IN
R15
8
C12
IN
R17
9
Q2
IN
R20
R19
1 0
IN
C48
Q3
Q4
11
Q5
J12
PROG
J1
R2
JP 2
C
R
R
C4
36
Y1
7
7
R8
4
5
R1
C17
C8
R9
R 11
C43
J9
R
R
R
8
8
8
2
3
4
C44
R18
2
JP
C13
3
5
R21
R22
C14
R16
R90
Y3
J2
R
R
18
1
4
5
R
R
C
1
16
2
7
JP
R20
4
R
1 9 R
2 6
R
1
R25
0
R159
8
R28
R
J
2
P
7
5
R
3
C
0
6
6
JP
R29
6
R 4 0 R
4 2
Q12
Battery
C32
1
R80
R
3
D10
9
C
D2
3
C
R7
2
7
U6
D1
R77R
R
R
76
7
3
8
R
8
4
R36
1
R37
RT1
JP4
JP3
D3
R
R
8
8
8
7
LNK ACT
R
R
8
8
5
9
J2
R86
U2
C28
C
E-Net
C
C
5
5
1
0
JP
C
1
1
C
C
33
R61
C 6 5
R
1 4 7
R81
D11
R 79
R165
R164
R162
S
1
1
D13
J
P 8
J7
C2
Y2
EPROM
Flash
LN
D
K
D14 D15
D12
J13
U3
R36
R169
C30
JP2
JP5
JP1
JP6
DS2
EGND
ACT
CAUTION: Disconnect power
before making or removing
terminal connections.
C
5
C 6 1
C 6 0
Y1
C 5 7
Q13
C39
L9
C1
U8
U7
C7
J16
J
P 9
1
Q31
C40
C29
GND
GND
R-Net
J15
J14
J10
R60
R66
D
Q5
1
U2
J3
60
R 23
R 2
2
Q8
R 3 8
Q7
1
R 37
MSTR
132
Q6
JP10
R
4
39
SLAVE
Q11
LS1
D24
R71
R72 R59
J10
8
R 5 5
D
Q10
9 R 56
R
R
R
6
62
6
5
8
4
6
C13
C49
1 S
C
V
8
T
2
J8
R
R
C
C
1
1
85
8
5
5
4
2
1
R 1 4 9
R D X
T C
X
R C X
T T
S
/R
15
IN
4 1
3 IN
1
IN 2
1
IN
Q2
R
24
Q4
Q3
D
4
D
6D
C 2 9
C
D23
48
+
85
4
 D
X
D
S
S
1
2
R91
J3
R14
D1
D 3
D
2
D
5
C18
C17
C16 C30
+PW
D20
D
N
G 5
D
C7
N
7 G
T U O
C8
T6
U
C6
O
5
T
OU
T4
OU
3
T U
O
T2 U O
UT1 O
0
T U
O
+K
R
W
P
R
Figure 4. Remove Battery Tab
NOTE: Rabbit recommends that the battery tab not be removed until you are ready to
place the OP7200 in normal service with regular power connected to header J3.
The backup battery protects the contents of the SRAM and keeps the real-time clock running when regular power to the OP7200 is interrupted. If you plan to use the real-time clock functionality in your application, you will need to set the real-time clock once you remove the plastic tab. Set the real-time clock using the onscreen prompts in the demon­stration program. Alternatively, you may set the real-time clock using the
SETRTCKB.C
sample program from the Dynamic C SAMPLES\RTCLOCK folder. The RTC_TEST.C sample program in the Dynamic C SAMPLES\RTCLOCK folder provides additional exam- ples of how to read and set the real-time clock.
User’s Manual 15
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.
SRAM
Flash
32 kHz
osc
RABBIT
2000
11 MHz
osc
RS-232
RS-485
CPLD
Digital
Input
Digital
Output
A/D
Converter
Ethernet
Touch-
RabbitCore Module
Figure 5. OP7200 Subsystems
screen
Controller
Interface to
LCD/Keypad
The memory and microprocessor are located on the RabbitCore module. The RCM2200 module is used on the OP7200. If you have more than one OP7200 or other Rabbit products built around RabbitCore modules, take care not to swap the RabbitCore modules since they contain system ID block i nfo rmation and calibration constants that are unique to the board they were originally installed on. It is a good idea to save the calibration constants should you need to replace a RabbitCore module in the future. See Section 4.3.8, “Using System Information from the RabbitCore Module,” for more information.
User’s Manual 17

3.1 OP7200 Pinouts

The OP7200 pinouts are shown in Figure 6.
Digital Inputs
Analog
Inputs
Digital Inputs
IN16
IN17
IN18
AIN0
AIN1
AIN2
AIN3
AIN4
AIN5
AIN6
AIN7
AGND
IN10
IN11
J2
J3
Battery
IN0
IN1
IN2
IN3
IN4
IN5
IN6
IN7
IN8
IN9
J6
R9
BT1
J10
J1
R2
C4
Y1
R1
C17
C8
R13
R11
U1
R15
C12
R17
Q2
Q3
R21
C13
R20
R19
Q4
Q5
R39
C2
C3
D2
R7
U6
R8
R36
R22
Y2
C27
D1
R38
R41
R37
RT1
JP4
JP3
D3
J2
U2
C28
C25
R18
C14
R16
Y3
Flash
U3
EPROM
C1
U8
U7
C7
C30
JP2
C29
GND
JP5
JP1
GND
JP6
DS2
EGND
LNK
DS1
ACT
GND
OUT7
OUT6
OUT5
OUT4
OUT3
OUT2
OUT1
OUT0
+K
-PWR
+PWR
GND
+485
485
RXD/CTS
TXD/RTS
RXC
TXC
/RST
IN15
IN14
IN13
IN12
Digital
Outputs
K
Power
Supply
RS-485
RS-232
Reset
Digital
Inputs
Ethernet
RabbitNet
Figure 6. OP7200 Pinouts
NOTE: Screw-terminal header J2 and the associated analog and digital I/O are not avail-
able on the OP7210.

3.1.1 Headers and Screw Terminals

Standard OP7200 models are equipped with four 1 × 12 screw terminal strips (J2, J3, J6, and J10), and a 2 × 5 programming header and an RJ-45 Ethernet jack on the RCM2200 RabbitCore module.
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. Be c areful to connect your Ethernet cable to the jack labeled Ethernet.
18 eDisplay (OP7200)

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. Once the microprocessor comes out of reset and finishes all its internal checks and initializes the system, it should turn DS1 OFF.
The operation of DS1 may be redefined in any manner desired with the caveat that DS1 comes ON after reset. The USR label on the dust cover refers to the LED at DS1 and reflects its secondary purpose as a user-defined indicator.

3.2.2 Buzzer

An audible buzzer is turned on and off through the use of a programmed I/O bit defined in software.
User’s Manual 19

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.
JP3
0 W
27 kW
22 kW
GND
Figure 7. OP7200 Digital Inputs [Pulled Up—Factory Default]
Vcc
10 nF
Factory Default
Rabbit 2000
Microprocessor
®
OP7200 series boards can be made to order in volume with the banks of digital inputs pulled down to 0 V. Contact your authorized Rabbit distributor or your Rabbit sales representative for more information.
For IN0–IN7 the actual switching point between a zero and a one is 1.5 V max and 3.5 V min respectively . The range between 1.5 and 3.5 V is undefined. For IN8–IN15 the actual switching point between a zero and a one is 0.8 V max and 2.0 V min respectively. The range between 0.8 and 2.0 V is undefined. For IN16–IN17, which are available only on the OP7200 model, the actual switching point between a zero and a one is 0.8 V max and
3.5 V min respectively. The range between 0.8 V and 3.5 V is undefined. Therefore, the input voltage must be less than 0.8 V for all the digital inputs as a group to
ensure that a zero is being read, and the input voltage must be must be greater than 3.5 V for a one.
IN16–IN18 interface to the A/D converter chip serially with an access time of 100 µs, which is different from the access time of 5 µs for IN0–IN15, which interface in parallel with the Rabbit 2000 microprocessor.
20 eDisplay (OP7200)
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
+40 V
+36 V
+3.3 V
Spikes
Spikes
Digital Input Voltage
40 V
Spikes
Figure 8. OP7200 Digital Input Protected Range
User’s Manual 21

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
Figure 9. OP7200 Digital Outputs
Current
Flow
All the digital outputs are in the high-impedance tristate when the OP7200 is initially powered on or reset. The CPLD (U4) then enables either the sink control or the source control to operate the digital outputs as sinking or sourcing, and thereby serves as a hard­ware block to prevent both sinking and sourcing drivers from being activated at the same time in a given channel.
Although the components are not installed, there is provision on the circuit board for the dig­ital outputs to be pulled as a group to Vcc, +K, or to GND through 27 k resistors. In spe­cial circumstances, you may need to pull sinking outputs high to either Vcc or +K, or you may need to pull sourcing outputs to GND, for example, when driving low-level logic sig­nals. Pulling the digital outputs up to +K allows the current-sinking outputs to be used as voltage outputs where their upper level is controlled by the voltage of +K. OP7200 series
22 eDisplay (OP7200)
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 rep­resentative 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. Although a con­nection to a +K supply is not absolutely required with sinking outputs, it is highly rec om- mended to protect against current spikes when driving inductive loads.
Connect the positive +K supply to pin 3 of s crew-terminal header J3 and the negative s ide of the supply to pin 12 of screw-terminal header J3. Exercise care to connect this supply correctly because the +K inputs are not protected against reverse polarity, and serious damage to the OP7200 may result if you connect this supply backwards.
When you are using the same DC power supply as the main power supply for the OP7200 and as the +K power supply, Rabbit recommends that you tie the -PWR connection to ground. Since this step will bypass the reverse-polarity protection afforded by the full­wave bridge rectifier, ensure that the positive leads from the power supply are connected correctly to prevent damage to the OP7200.
Tie -PWR to GND
USR PWR
J3
J3
Connected to
Sourcing
Load
Load
-PWR
+PWR
+
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D23
D20
Output
Connected to
Sinking Output
12
GND
9
OUT5
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 IN9 IN10 IN11
1
CAUTION: Disconnect power
J2
J2
J6
before making or removing terminal connections.
1
1
J1
1
PROG
J10
if using same
power supply for
OP7200 and +K
External
+K Power
Supply
+
Connected to
Load
Sourcing
Output
AC
Adapter
6
J6
LNK ACT
E-Net
J15
1
R-Net
IN12 IN13 IN14 IN15 /RST TXC RXC TXD RXD 485 +485 GND
J10
OUT2
+K
3
Load
Connected to
Sinking
Output
Figure 10. +K, Power Supply, and Sample Load Connections
User’s Manual 23

3.4 Analog Features (OP7200 only)

The single A/D converter used in the OP7200 (the OP7210 does not have analog or touch­screen 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 fourth digital input serves as a board status bit, and is controlled by a 0 surface-mount resistor R159. The factory default is for R159 to not be installed, which leaves this fourth input pulled up to Vcc.

3.4.1 A/D Converter Inputs

Figure 11 shows a pair of A/D converter input circuits. Each A/D converter input consists of resistors and a capacitor. The resistors form a10:1 attenuator, and the capacitor protects the A/D converter input against electrostatic discharges.
+ V
180 kW
AIN0
AIN1
180 kW
1 nF
1 nF
20 kW
20 kW
ADC
ADC
0 W
AGND
Factory Default
Figure 11. A/D Converter Inputs
2.048 V
24 eDisplay (OP7200)
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)
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.0
0.0 +2.5 8 1.25
0.0 +2.0 10 1.0
0.0 +1.25 16 0.625
0.0 +1.0 20 0.500
Max. Voltage
(V)
Amplifier
Gain
mV per Tick
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 by moving the 0 Ω jumper (see Figure 11) on header JP4, JP5, JP6, or JP7 associated with the A/D converter input from analog ground to the 2.048 V 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. At the present time Rabbit does not offer the software drivers to work with sin­gle-ended negative voltages, but the differential mode described below may be used to measure negative voltages.
Differential measurements require two channels. As the name differential implies, the dif- ference in voltage between the two adjacent channels is measured rather than the differ­ence between the input and analog ground. Voltage measurements taken in differential mode have a resolution of 12 bits, with the 12th bit indicating whether the difference is positive or negative.
User’s Manual 25
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 ref­erenced to analog ground, and both inputs must be positive with respect to analog ground.
If a device such as a battery is con­nected across two channels for a differential measurement, and it is not referenced to analog ground, then the current from the device will flow through both sets of attenuator resistors as shown in Figure 12. This will generate a
Device
AIN0
+
-
AIN1
I
180 kW
1 nF
1 nF
180 kW
20 kW
+
20 kW
ADC
0
1
negative voltage at one of the inputs, AIN1, which will almost certainly lead to inaccurate A/D
Figure 12. Current Flow from Ungrounded
or Floating Source
conversions.
To make such differential measurements, move the 0 resistor jumper (see Figure 11) associated with the A/D converter inputs (JP4, JP5, JP6, or JP7) from analog ground to the
2.048 V reference voltage. This allows input voltages that are negative with respect to analog ground. Table 3 provides the differential voltage ranges for this setup.
Min. Differential
Voltage
(V)
0 ±20.0 ×1 10 0 ±10.0 ×2 5 0 ±5.0 ×4 2.5 0 ±4.0 ×5 2.0 0 ±2.5 ×8 1.25 0 ±2.0 ×10 1.00 0 ±1.25 ×16 0.625 0 ±1.0 ×20 0.500
Table 3. Differential Voltage Ranges
Max. Differential
Voltage
(V)
Amplifier
Gain
mV per Tick
26 eDisplay (OP7200)
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. T able 4 provides the bipolar voltage ranges for this setup.
Table 4. Bipolar Voltages
Min. Voltage
(V)
-20.0 +20.0 1 10
-10.0 +10.0 2 5
-5.0 +5.0 4 2.5
-4.0 +4.0 5 2.0
-2.5 +2.5 8 1.25
-2.0 +2.0 10 1.00
-1.25 +1.25 16 0.625
-1.0 +1.0 20 0.500
Max. Voltage
(V)
Amplifier
Gain

3.4.2 Analog Curr ent Measurements

The A/D converter inputs can also be used with 4–20 mA current sources by measuring the resulting analog volt­age drop across a 100 1% precision resistor placed between the analog input and analog ground as shown in Figure 13.
The single-ended scale of 0–2.56 V with a gain of 8 is used to get an A/D current conversion of 12.5 µA/tick.
mV per Tick
AIN0AIN7
100 W
1%
AGND
Figure 13. Resistor for 4–20 mA
Current Sources
User’s Manual 27

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 straight­line 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. However, the errors arising from manufacturing tolerances introduce a deviation between the applied input voltage and the voltage that is output by the A/D converter. The actual plot of voltage in vs. the voltage out from A/D converter is not actually a straight line. However, a straight line is a very good first-order approximation, and the calibration rou­tines provided for the OP7200 are based on a straight line with a slope of 1 and an offset from (0,0). The calibration routines use two known measurement points on the voltage-in vs. voltage-out line as the basis to calculate calibration constants that will be used to adjust for the slope of the line and the offset from (0,0). The calibration routines typically use input voltage points that are 10% less then the maximum and 10% more than the mini­mum readings possible for the A/D converter on any given range.
Quality calibration procedures are extremely important in obtaining good A/D converter results. No matter how high a resolution the A/D converter has, it cannot compensate for improper calibration. A/D converter results will never be more accurate than the meter used in the calibration process. Therefore, use the best digital volt and milli-amp meter available that meets or exceeds the accuracy of the A/D converter chip.
3.4.3.1 Modes
The OP7200 A/D converter operates in three different modes:
the single-ended mode,
the differential mode, and
the milli-amp mode
The calibration and read routines provided correspond to these three modes.
3.4.3.2 Calibration Constants
The A/D converter has eight individual input channels, and each channel has eight pro­grammable gains. Additionally, the A/D converter has the capability for adjacent inputs to be paired to make differential measurements with eight different gains, and provision is also made to convert 4–20 mA analog current measurements.
28 eDisplay (OP7200)
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 mA Differential
Gain
Code
Input
1 2 4 5 8 10 16 20 4 1 2 4 5 8 10 16 20
0 1 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. The milli-amp mode covers 4–20 mA (actually 0–25 mA) currents. Separate calibration and read-back routines are provided for this. Since only one range of current measurement is provided, these routines use only one gain (4). One set of calibration constants is provided for each of the eight input channels. The differential-mode routines use a pair of input channels to make measurements. In this case, calibration constants are stored for each pair of channels and for each of the eight gains, for a total of 32 sets of calibration constants.
When a calibration is performed, it fills in one of the squares in the table with a set of cal­ibration constants representing the corresponding mode, channel, and gain. These con­stants are stored in flash memory, and are thus maintained even when power is been removed from the OP7200. Note that calibration constants are stored for each of the modes. Since A/D converter read routines select the appropriate calibration constants based on the mode, it is possible for software calls to move from one mode to another without recalibration.
3.4.3.3 Calibration Recommendations
It is imperative that you calibrate each of the A/D converter inputs in the same manner as they are to be used in the application. For example, if you will be performing floating dif­ferential measurements or differential measurements using a common analog ground, then calibrate the A/D converter in the corresponding manner. The calibration must be done with the attenuator reference selection jumper in the desired position (see Figure 11). If a
User’s Manual 29
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. This fact can be used to simplify and speed up the calibration process.
Each calibration is normally done at 10% less than the maximum and 10% more than the minimum within a given voltage range defined by the mode, channel, and gain. However, if an application is known to use only portion of a particular range, it is possible to obtain improved accuracy by using calibration points that are 10% less than the expected maxi­mum and 10% greater than the expected minimum.
3.4.3.4 Factory Calibration
Because of the large number of possible calibrations, the factory performs only a rudimen­tary calibration on the unit. By default, all four of the attenuator reference selection jump­ers are in the analog ground position. The factory performs a single-ended calibration on each of the eight channels with a gain of 1 (0–20 V range). The remaining single-ended calibration constants for the other seven gains are approximated and are filled in based on the initial calibration. The milli-amp and differential portions of the table are filled in using typical expected values. All read routines will work properly with these factory-ini­tialized calibration constants, but only the single-ended mode should be expected to return accurate results over a range of 0–20 V until you recalibrate the OP7200 for your use.
Sample programs are provided to illustrate how to read and calibrate the various A/D inputs for the three operating modes.
Mode Read Calibrate
Single-Ended, one channel Single-Ended, all channels Milli-Amp Differential, analog ground Differential, 2 V reference
ADRD_SE_CH.C ADCAL_SE_CH.C
ADRD_SE_ALL.C ADCAL_SE_ALL.C
ADRD_MA_CH.C ADCAL_MA_CH.C
ADRD_DIFF_GND.C ADCAL_DIFF_GND.C
ADRD_DIFF_2V.C ADCAL_DIFF_2V.C
These sample programs are found in the ADC subdirectory in SAMPLES\OP7200. See Section 4.3, “Sample Programs,” for more information on these sample programs and how to use them.
30 eDisplay (OP7200)

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 LC D mod­ule. 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. Ferrite beads rather than resistors are used in series with the inputs to maintain the most accurate measurement of the touchscreen x,y position.
A reference voltage is applied across the touchscreen. When the touchscreen is touched, resistances that represent the x,y position are presented at the input circuit. The touchscreen controller chip U9 converts these resistances into digital form for use by the software.
NOTE: Should you to uch two or more di ffere nt point s on the touchs creen simul taneousl y,
the resistance presented to the input circuit will represent some difference between the resistances corresponding to the points. This can lead to a different or an unknown key’s value being processed. To prevent this from happening, exercise care to “touch” only one point or position on the touchscreen at a time.

3.4.5 Analog Supply Voltage

The analog section is isolated from digital noise generated by other components by way of a low-pass filter composed of L2, C31, and C32 as shown in the left side of Figure 14. The +V analog power supply powers the A/D converter chip.
+V
Vcc
L2
C31
100 nF
+V
C32
100 nF
ADC Chip
Internal
Reference
Voltage
JP8
3
2
1
To
A/D Converter
R148
100 W
R150
453 W
Figure 14. Analog Supply and Voltage Reference Circuits
U12
C91
100 nF
User’s Manual 31

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 volt­age 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.04 8 V g enerated by the A/D converter ch ip.
By connecting pins 2–3 on header JP8 instead, a ratiometric reference can be provided by the divider consisting of R148 and R150. A fixed reference can be configured by remov­ing R150 and installing a zener diode at U12. The zener diode will then set the reference voltage. C91 would be always installed, and provides filtering. None of these components (R148, R150, C91, or U12) is factory-installed.
32 eDisplay (OP7200)

3.5 Serial Communication

The OP7200 has two RS-232 serial ports, which can be configured as one RS-232 serial channel (with R TS/C TS) or as two RS-232 (3-wire) channels using the serMode software function call. Table 5 summarizes the options.
Table 5. Serial Communication Configurations
Software
Mode
0 RS-485 RS-232, 3-wire RS-232, 3-wire 1 RS-485 RS-232, 5-wire CTS/RTS
2 3
* Use modes 2 and 3 when Serial Port B is going to used by other libraries such as
PACKET.LIB.
not initialized not initialized
B C D
*
*
Serial Port
RS-232, 3-wire RS-232, 3-wire RS-232, 5-wire CTS/RTS
The OP7200 also has one RS-485 serial channel and a CMOS serial channel that serves as the programming port. 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.
All four serial ports operate in an asynchronous mode up to the baud rate of the system clock divided by 32. An asynchronous port can handle 7 or 8 data bits. A 9th bit address scheme, where an additional bit is sent to mark the first byte of a message, is also sup­ported. Serial Port A, the programming port, and Serial Port B can be operated alternately in the clocked serial mode. In this mode, a clock line synchronously clocks the data in or out. Either of the two communicating devices can supply the clock. When the Rabbit pro­vides the clock, the baud rate can be up to ¼ of the system clock frequency, or more than
5.525 Mbps for a 22.1 MHz clock speed. The OP7200 boards use all four serial ports. Serial Port A is used in the clocked serial
mode to provide cold-boot, download, and emulation functions. Serial Port B is used either for RS-485 or for RabbitNet communication, and Serial Ports C and D are used for RS-232 communication. The OP7200 uses an 11.0592 MHz crystal, which is doubled to
22.1184 MHz. At this frequency, the OP7200 supports standard asynchronous baud rates up to a maximum of 230,400 bps.
User’s Manual 33

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 RS-232 transceiver also provides the proper line loading for reliable commu­nication.
RS-232 can be used effectively at the OP7200’s maximum baud rate for distances of up to 15 m.
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. Section 4.5.4 provides some sample code to illustrates the sequence.

3.5.2 RS-485

The OP7200 has one RS-485 serial channel, which is connected to the Rabbit 2000 Serial Port B through an RS-485 transceiver. The half-duplex communication uses an output from the CPLD (U4) to control the transmit ena ble on the communic ation 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.
The OP7200 can be used in an RS-485 multidrop network spanning up to 1200 m (4000 ft), and there can be as many as 32 attached devices. Connect the 485+ to 485+ and 485– to 485– using single twisted-pair wires as shown in Figure 15. Note that a common ground is recommended.
RS485+
RS-485
GND
RS-485
Figure 15. OP7200 Multidrop Network
GND
RS485+
RS485+
RS-485
GND
34 eDisplay (OP7200)
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.
Vcc
Q5
Flash
U3
EPROM
1
R70 681 W
R68 220 W
J14
R69 681 W
Q13
C39
L9
C1
U8
R36
R169
C30
JP2
JP5
JP1
DS2
LNK
DS1
LS1
U7
JP9
JP6
ACT
485+
D13
D14 D15
D12
R1
R2
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
U6
J2
J6
IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 IN9 IN10 IN11
J13
JP1
C1
R18
R15
C4
6
7
R26
R42
R46
R45
JP2
J1
R11
U1
C12
R17
Q3
C2
JP4
R108
JP5
JP6
485
C32
L2
C31
C36
R2
C43
C44
JP3
R19
Q4
J12
C33
R61
C65
R159
C66
Q12
Battery
R75
R74
C4
Y1
R1
C17
R82
R83
R90
C13
R20
Q5
2
4
6
JP8
R147
R80
D10
R76
R77
C3
R8
J9
R84
R21
R22
R17
R16
R20
R19
R25 R28
R27
R30
R29 R31
R40
R41
R44
R43
JP7
C8
R9
R13
BT1
C48
R15
Q2
C5
bias
C61
J8
1
C60
Y1
termi-
C57
nation
J7
D2 R7
U6
R36
R85
bias
R81
D11
R79
R78
R39
C2
Y2
C27
R165
D1
R164
R38
R88
R87
R41
R162
R89
R37
RT1
R86
JP4
JP3
D3
J2
U2
C28
C25
R18
C51
C50
C14
R16
Y3
U2
JP10
C7
Q31
60
MSTR
132
SLAVE
J16
C40
C29
GND
GND
EGND
DS1
DS2
R91
Q2
R24
Q4
R23
Q3
R22
Q8
R38
Q7
R37
Q6
R39
4
Q11
R55
Q10
R56
C13
C49
D24
J15
J3
R14
D1
C7
D3
C8
D2
C6
D5
C18
D4
C17
D6 D8
C16 C30
D9
C29
R65
R62
R64
C86
D23
D20
C82
TVS1
J8
R152
R151
C85
C84
R149
R71
R72 R59 R60 R66
J10
Factory Default
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
J8
IN12 IN13 IN14 IN15 /RST TXC RXC TXD RXD 485 +485 GND
6
4
2
5
3
1
Figure 16. RS-485 Termination and Bias Resistors
For best performance, the termination resistors in a multidrop network should be enabled only on the end nodes of the network, but not on the intervening nodes. Jumpers on boards whose termination resistors are not enabled may be stored across pins 1–3 and 5–6 of header J8.
NOTE: Remove the back cover from the OP7200 to access the bias and termination
resistor jumpers on header J8.
User’s Manual 35

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.
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. Section 4.5.4 provides some sample code to illustrates the sequence.
In principle, the OP7200 can operate either as a master controller with RabbitNet expan­sion I/O, or it can operate as a slave operator interface in a RabbitNet network. Jumper settings on header JP10 are used to configure the OP7200 for master or slave operation as shown in Appendix A.3, “Jumper Configurations.” The factory default is for the OP7200 to be configured as a RabbitNet master.
At the present time, Dynamic C does not support the operation of the OP7200 as a slave, and so the OP7200 is restricted to being used as a master.
Appendix D provides additional information about the RabbitNet system.
36 eDisplay (OP7200)

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 conven­tion followed, the pin positions relative to the spring tab posi tion (located at t he bottom of the RJ-45 jack in Figure 17) are always absolute, and the RJ-45 connector will work prop­erly with off-the-shelf Ethernet cables.
ETHERNET
RJ-45 Plug
1
RJ-45 Jack
1. E_Tx+
2. E_Tx
3. E_Rx+
6. E_Rx
8
Figure 17. RJ-45 Ethernet Port Pinout
RJ-45 pinouts are sometimes numbered opposite to the way shown in Figure 17. Two LEDs are placed next to the RJ-45 Ethernet jack, one to indicate a live Ethernet link
(LNK) and one to indicate Ethernet activity (ACT). The transformer/connector assembly ground is connected to the OP7200’s RabbitCore
module printed circuit board digital ground via a 0 resistor “jumper,” R29, as shown in Figure 18.
RJ-45 Ethernet Plug
R29
Board
Ground
Chassis
Ground
Figure 18. Isolation Resistor R29
The factory default is for the 0 resistor “jumper” at R29 to be installed. In high-noise environments, remove R29 and ground the transformer/connector assembly directly through the chassis ground by using the EGND terminal on the RabbitCore module. This will be especially helpful to minimize ESD and/or EMI problems.
User’s Manual 37

3.5.5 Programming Port

The RabbitCore module on the OP7200 has a 10-pin programming header. The program­ming 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.
Fast copy designated portions of flash memory from one Rabbit-based board (the master) to another (the slave) using the Rabbit Cloning Board.
Alternate Uses of the Serial 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 input
The serial programming port may also be used as a serial port via the DIAG connector on the serial programming cable.
In addition to Serial Port A, the Rabbit 2000 startup-mode (SMODE0, SMODE1), status, and reset pins are available on the serial programming port.
The two startup mode pins determine what happens after a reset—the Rabbit 2000 is either cold-booted or the program begins executing at address 0x0000.
The status pin is used by Dynamic C to determine whether a Rabbit microprocessor is present. The status output has three different programmable functions:
1. It can be driven low on the first op code fetch cycle.
2. It can be driven low during an interrupt acknowledge cycle.
3. It can also serve as a general-purpose CMOS output.
The /RESET_IN pin is an external input that is used to reset the Rabbit 2000 and the onboard peripheral circuits on the RabbitCore module. The serial programming port can be used to force a hard reset on the RabbitCore module by asserting the /RESET_IN signal. The green Power Good LED goes off momentarily during a reset.
Refer to the Rabbit 2000 Microprocessor User’s Manual for more information.
38 eDisplay (OP7200)

3.6 Memory

3.6.1 SRAM

The OP7200’s RabbitCore module is designed to accept 128K to 512K of SRAM pack­aged in an SOIC case. The standard OP7200’s RabbitCore modules come with 128K of SRAM.

3.6.2 Flash M emory

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.
NOTE: Rabbit recommends that any c ustomer applications sh oul d not be co nst ra ine d by
the sector size of the flash memory since it may be necessary to change the sector size in the future.
A Flash Memory Bank Select jumper configuration option based on 0 surface-mounted resistors exists at header JP2 on the RabbitCore module. This option, used in conjunction with some configuration macros, allows Dynamic C to compile two different co-resident programs for the upper and lower halves of the 256K program flash in such a way that both programs start at logical address 0000. This is useful for applications that require a resident download manager and a separate downloaded program. See Technical Note 218, Implementing a Serial Download Manager for a 256K Flash, for details.
User’s Manual 39

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 u nidirectional. Data flow from the controller chip to the LCD module. A number of control lines are provided for this func­tion, but not all of them are used for a particular LCD module. The controller continually reads the SRAM (which is included on the LCD controller chip used after January,2006) for data placed there by the microprocessor and refreshes the display periodically.
Other functions support the LCD module to adjust its contrast and to turn the white LED backlight on and off. A variable resistor between two of the LCD module’s terminals sets the contrast. U5 is a digitally controlled potentiometer that is controlled by software. Once the value is set, the value will be maintained. A single programmed I/O bit is used to turn the LED backlight on or off. Since this bit does not have enough drive current to light the LED directly, it is buffered by the FET Q1.
The controller chip used in OP7200’s sold before 2006 supported either 32K or 64K of SRAM. These OP7200s were designed using a dual-footprint SRAM to accept either one 32K or one 128K SRAM. The 128K part was standard. The full 64K supported by the controller is available with the 128K SRAM, plus an additional 64K can be swapped in and out by using the programmed I/O bit VA16. Pins 1–2 on header JP9 are normally con­nected by a 0 surface-mounted resistor, but pins 2–3 should be connected instead for video SRAM paging with I/O bit VA16.
OP7200 units sold after January , 2006, have a new LCD controller chip because the previ­ously used LCD controller chip is no longer available. The new LCD controller chip has 32K of internal SRAM. Figure 19 shows the area of the OP7200 that changed to accommo­date the new LCD controller chip. The new LCD controller is not 100% code-compatible with the old chip—Section 4.1.2.1 explains how to handle programs developed using versions of Dynamic C before v. 9.40.
PRE-2006 OP7200
Q5
C5
C61
C60
Y1
C57
D11
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
IN0 IN1
D13
D14 D15
D12
R1
R2
J13
JP1
C1
R18
R15
C4
R17
R16
C2
C33
JP4
R20
R19
R61
R26
R108 R25 R28
R29 R31
R41
R44
J2
JP7
J6
JP8
C65
R159
R27
JP5
R30
C66
JP6
R147
R40
R42
R43
R46
R45
JP2
L2
Q12
Battery
C32
C31
J7
R81
R80
D10
Figure 19. How to Identify Pre-2006 OP7200 Boards
DS1
1
U2
60
J14
MSTR
132
JP10
SLAVE
LS1
Q13
C39
L9
DS2
R91
J3
R14
D1
C7
Q2
R24
D3
Q4
R23
C8
D2
C6
Q3
R22
D5
Q8
R38
C18
D4
Q7
C17
R37
D6 D8
Q6
R39
4
C16 C30
Q11 R55
D9
Q10
R56
C29
R65
R62
R64
C86
C13
C49
C82
J8
R152
R151
D24
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D23
D20
TVS1
C85
C84
+485 GND
CURRENT OP7200
D12
D15
D14
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
IN0 IN1
D13
1
J13
R2
R1
C1
GND
R15
C4
R18
C33
R16
C2
R17
JP1
R20
GND
R19
JP4
R61
R26
R25
R159
R108
R28
R27
GND GND
R29
R41
GND
J2
JP7
J6
JP8
JP5
C65
R30
C66
R31
JP6
R40
R42
R44
R43
R46
R45
JP2
Q12
C32
C31
L2
C36
R147
BT1
Battery
J7
R80 R81
D10
JP12
JP11
Q5
C99
U1
C97
C104
C96
C102
C60
C57
C101
C95
16
D11
1
J14
Q13
L9
DS1
DS2
J3
R14
R91
D1
C98
C61
C39
Q2
C100
R11
Y1
R10
C5
MSTR
132
JP10
SLAVE
LS1
C7
R24
D3
Q4
R23
GND
C8
D2
Q3
C6
R22
D5
Q8
GND
R38
C18
D4
Q7
C17
R37
Q6
D6D8
4
GND
R39
C16
Q11
C30
R55
GNDGND
D9
Q10
R56
C29
R64
C86
R62
R65
C13
C49
J8
C82
D24
R151
R152
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D23
D20
TVS1
C85
+485 GND
40 eDisplay (OP7200)

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 printed­circuit board with a flex cable. Only 7 of the 10 conductors in the cable are used at the present time. Th e extr a lin es ar e reser v ed f o r 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. Driving a partic ular scan line (/KB–S 0:3) low will read bac k a zero on the keypad data lines (/PB0:2–K0:2) associated with the three keys on the selected row. Diodes D16–D19 prevent feedback, allowing the software to read the keypad even when multiple keys are pressed simultaneously. Resistors R138–R141 and capacitors C79–C81 and C83 form a low-pass filter to prote ct against ESD da mage. These sa me circuits help to eliminate EMI from being radiated from the keypad or its flex cable. R149, R151–R152, and C82–C84 perform a similar function for the keypad data lines. The tri-state receiver chip U13 connects the key data to the microprocessor data bus at the appropriate time when directed by the control signals /IORD and /PE5-IO-CS1. Note that only the low­order three bits of the data bus are connected. The software must mask off the high 5 bits since they are undefined.
Figure 20 shows how the keypad is encoded with respect the scan and data lines. For example, if /KB–S2 is asserted low, then keys D, H, and E are read back on data lines K0, K1, and K2 respectively . A zero read on the data lines indicates that the key is pressed and a one indicates that it is not. Ones are always read back on data lines that are not assigned to any particular key. Once the values read from the keypad remain constant for a length of time, the read can be assumed to be valid.
ABC
D
E
/KBS0
FG
H
/KBS1 /KBS2
J
Figure 20. OP7200 Keypad Encoding
User’s Manual 41
/KBS3
/PB0K0
B C D A
/PB1K1
F G H
/PB2K2
J
E

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 write­only. Two chip select lines, /PE4 and /PE5, are used to enable the device. /PE4 and /PE5 are configured in software as I/O strobes, and set the base address used by the CPLD. /PE4 is used when selecting one of the sixteen I/O control bits associated with the eight driver circuits. /PE5 is used with the re mainder of the controls. The control bi ts within the C PLD normally can be set and reset independently of one another. The SINK and SOURCE out­puts are different in that both the SINK and SOURCE outputs for a particular driver can­not be asserted simultaneously. If either the SINK or SOURCE output is asserted, and the software tries to set the other, the operation is ignored and the bit will not be set. The pur­pose of this interlock is to prevent damage to the driver circuit by not allowing both cur­rent sourcing and sinking to be enabled simultaneously.
Table 6. CPLD Parameters
/PE5 /PE4 A3–0 D0 Signal Function
1 0 0000 1 SINK0 Enable Sink Output 0 1 0 0000 0 SINK0 Disable Sink Output 0 1 0 0001 1 SINK1 Enable Sink Output 1 1 0 0001 0 SINK1 Disable Sink Output1 1 0 0010 1 SINK2 Enable Sink Output 2 1 0 0010 0 SINK2 Disable Sink Output 2 1 0 0011 1 SINK3 Enable Sink Output 3 1 0 0011 0 SINK3 Disable Sink Output 3 1 0 0100 1 SINK4 Enable Sink Output 4 1 0 0100 0 SINK4 Disable Sink Output 4 1 0 0101 1 SINK5 Enable Sink Output 5 1 0 0101 0 SINK5 Disable Sink Output 5 1 0 0110 1 SINK6 Enable Sink Output 6 1 0 0110 0 SINK6 Disable Sink Output 6 1 0 0111 1 SINK7 Enable Sink Output 7 1 0 0111 0 SINK7 Disable Sink Output 7 1 0 1000 1 SOURCE0 Enable Source Output 0 1 0 1000 0 SOURCE0 Disable Source Output 0 1 0 1001 1 SOURCE1 Enable Source Output 1 1 0 1001 0 SOURCE1 Disable Source Output 1 1 0 1010 1 SOURCE2 Enable Source Output 2 1 0 1010 0 SOURCE2 Disable Source Output 2
42 eDisplay (OP7200)
Table 6. CPLD Parameters (continued)
/PE5 /PE4 A3–0 D0 Signal Function
1 0 1011 1 SOURCE3 Enable Source Output 3 1 0 1011 0 SOURCE3 Disable Source Output 3 1 0 1100 1 SOURCE4 Enable Source Output 4 1 0 1100 0 SOURCE4 Disable Source Output 4 1 0 1101 1 SOURCE5 Enable Source Output 5 1 0 1001 0 SOURCE5 Disable Source Output 5 1 0 1110 1 SOURCE6 Enable Source Output 6 1 0 1110 0 SOURCE6 Disable Source Output 6 1 0 1111 1 SOURCE7 Enable Source Output 7 1 0 1111 0 SOURCE7 Disable Source Output 7 0 1 0000 1 /KB-S0 Assert Keypad Scan Line S0 0 1 0000 0 /KB-S0 Deassert Keypad Scan Line S0 0 1 0001 1 /KB-S1 Assert Keypad Scan Line S1 0 1 0001 0 /KB-S1 Deassert Keypad Scan Line S1 0 1 0010 1 /KB-S2 Assert Keypad Scan Line S2 0 1 0010 0 /KB-S2 Deassert Keypad Scan Line S2 0 1 0011 1 /KB-S3 Assert Keypad Scan Line S3 0 1 0011 0 /KB-S3 Deassert Keypad Scan Line S3 0 1 0100 1 BKLT-ON Turn On the LCDM Backlight 0 1 0100 0 BKLT-ON Turn Off the LCDM Backlight 0 1 0101 1 RS485-EN Enable the 485 Transmitter 0 1 0101 0 RS485-EN Disable the 485 Transmitter 0 1 0110 1 ALARM Turn On the Buzzer 0 1 0110 0 ALARM Turn Off the Buzzer 0 1 0111 1 VA1 6 Assert the VA16 Address Line/RabbitNet CS 0 1 0111 0 VA1 6 Deassert the VA16 Address Line/RabbitNet CS 0 1 1000 1 /CS Assert X9015 Chip Select 0 1 1000 0 /CS Deassert X9015 Chip Select 0 1 1001 1 U_D Set X9015 to Count Up 0 1 1001 0 U_D Set X9015 to Count Down 0 1 1010 * INC Increment the X9015 Counter 0 1 1011 * NA Reserved 0 1 1100 * NA Reserved 0 1 1101 * NA Reserved 0 1 1110 * NA Reserved 0 1 1111 * NA Reserved
User’s Manual 43

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.
The DIAG connector of the programming cable may be used on the programming header of the RabbitCore module with the module operating in the Run Mode. This allows the pro­gramming port to be used as a regular serial port.

3.10.1 Changing Between Program Mode and Run Mode

The OP7200 is automatically in Program Mode when the PROG connector on the pro­gramming cable is attached to the RabbitCore module, and is automatically in Run Mode when no programming cable is attached. When the Rabbit 2000 is reset, the operating mode is determined by the status of the SMODE pins. When the programming cable’s
PROG connector is attached, the SMODE pins are pulled high, placing the Rabbit 2000 in
the Program Mode. When the programming cable’s PROG connector is not attached, the SMODE pins are pulled low, causing the Rabbit 2000 to operate in the Run Mode.
Colored edge
PC COM port
To
Programming
Cable
Program Mode
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
1
J2
J2
J6
IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 IN9 IN10 IN11
1
J1
PROG
1
PROG
DIAG
J6
USR PWR
J3
CAUTION: Disconnect power before making or removing terminal connections.
J3
1
+
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D23
D20
J10
1
LNK ACT
E-Net
RESET OP7200 when changing mode:
Cycle power off/on
after removing or attaching programming cable.
IN12 IN13 IN14 IN15 /RST TXC RXC TXD RXD 485 +485 GND
J10
J15
R-Net
IN16 IN17 IN18 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AGND
IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 IN9 IN10 IN11
J2
J6
J6
1
J2
1
J1
Run Mode
CAUTION: Disconnect power before making or removing terminal connections.
1
PROG
LNK ACT
E-Net
USR PWR
J3
1
+
J10
1
J15
R-Net
J3
D23
J10
+PWR PWR +K OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 GND
D20
IN12 IN13 IN14 IN15 /RST TXC RXC TXD RXD 485 +485 GND
Figure 21. OP7200 Program Mode and Run Mode Set-Up
A program can be run in either mode, but can only be downloaded and debugged when the OP7200 is in the Program Mode.
Refer to the Rabbit 2000 Microprocessor User’s Manual for more information on the pro- gramming port and the programming cable.
44 eDisplay (OP7200)

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. The means for doing so is through a simple global macro as shown below.
1. Select the “Defines” tab from the Dynamic C Options > Project Options menu.
2. Normal spreading is the default, and usually no entry is needed. If you need to specify normal spreading, add the line
ENABLE_SPREADER=1
For strong spreading, add the line
ENABLE_SPREADER=2
To disable the spectrum spreader, add the line
ENABLE_SPREADER=0
NOTE: The strong spectrum-spreading setting is not needed for the OP7200.
3. Click OK to save the macro. The spectrum spreader will now remain of f whenever you are in the project file where you defined the macro.
There is no spectrum spreader functionality for OP7200 operator control panels that do not carry the CE mark on their RabbitCore module or when using any OP7200 with a ver­sion of Dynamic C prior to 7.30.
User’s Manual 45
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 sing le-board computers and other devices based on the Rabbit microprocessor.
Chapter 4 provides the libraries, function calls, and sample pro­grams 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. The flash memory and SRAM options are selected with the Options > Compiler menu.
The advantage of working in RAM is to save wear on the flash memory, which is limited to about 100,000 write cycles. The disadvantage is that the code and data might not both fit in RAM.
NOTE: An application can be developed in RAM, but can not run sta nda lone from RAM
after the programming ca ble is disconn ected. S tandalone ap plications can on ly run from flash memory.
NOTE: Do not depend on the flash memory sector size or type. Due to the volatility of
the flash memory market, the OP7200 and Dynamic C were designed to accommodate flash devices with various sector sizes.
OP7200s that are special-ordered with 512K flash/512K SRAM memory options have two 256K flash memories. By default, Dynamic C will use onl y the first flash memory for pro­gram code in these OP7200s. Uncomment the USE_2NDFLASH_CODE macro within the
RABBITBIOS.C file in the Dynamic C BIOS folder to allow the second flash memory to
hold any program code that is in excess of the available memory in the first flash.
User’s Manual 47
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 W indows 98 or later. Pro­grams can be downloaded at baud rates of up to 460,800 bps after the program compiles.
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:
X Exceptionally fast support for floating-point arithmetic and transcendental functions. X RS-232 and RS-485 serial communication. X Analog and digital I/O drivers.
X I2C, SPI, GPS, file system. X LCD display and keypad drivers.
Powerful language extensions for cooperative or preemptive multitasking
Loader utility program to load binary images into Rabbit targets in the absence of
Dynamic C.
Provision for customers to create their own source code libraries and augment on-line help by creating “function description” block comments using a special format for library functions.
Standard debugging features:
X Breakpoints—Set breakpoints that can disable interrupts. X Single-stepping—Step into or over functions at a source or machine code level, µC/OS-II aware. X Code disassembly—The disassembly window displays addresses, opcodes, mnemonics, and
machine cycle times. Switch between debugging at machine-code level and source-code level by simply opening or closing the disassembly window.
X Watch expressions—Watch expressions are compiled when defined, so complex expressions
including function calls may be placed into watch expressions. Watch expressions can be updated with or without stopping program execution.
X Register window—Al l processor regi sters and fla gs are disp layed. The conten ts of general r egisters
may be modified in the window by the user.
X Stack window—shows the contents of the top of the stack. X Hex memory dump—displays the contents of memory at any address. X STDIO window—printf outputs to this window and keyboard input on the host PC can be
detected for debugging purposes.
printf output may also be sent to a serial port or file.
48 eDisplay (OP7200)

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. C heck 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) dif­ferent from that of the original Dynamic C installation. Rabbit recommends using a differ­ent directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation. If you have made any changes to the BIOS or to libraries, or if you have programs in the old directory (folder), make these same changes to the BIOS or libraries in the new directory containing the patch. Do not simply copy over an entire file since you may overwrite a bug fix; of course, you may copy over any programs you have written. Once you are sure the new patch works entirely to your satisfaction, you may retire the existing installation, but keep it available to handle legacy applications.
4.1.1.2 Upgrades
Dynamic C installations are designed for use with the board they are included with, and are included at no charge as part of our low-cost kits. Dynamic C is a complete software development system, but does not include all the Dynamic C features. Rabbit 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 addi­tion to the Web-based technical support included at no extra charge, a one-year telephone­based technical support module is also available for purchase.
NOTE: Dynamic C RabbitSys cannot be used with the OP7200.
User’s Manual 49

4.1.2 Accessing and Downloading Dynamic C Libraries

The libraries needed to run the OP7200 are available on the CD included with the Devel­opment 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.
When downloading the libraries from the Web site, click on the product-specific links until you reach the links for the OP7200 download you require. You will be able to either run the download directly from the Web site, or you may choose to save it to run later.
Once you run the download, InstallShield will install the additional or upgraded software. A readme file associated with the installation will then guide you to add to, replace, or edit Dynamic C libraries or sample programs.
You will be able to use the revamped Dynamic C installation with the OP7200 and you will continue to be able to use this upgraded installation with all the other Rabbit products you were able to use before.
4.1.2.1 New LCD Controller Chip
OP7200 units sold after January, 2006, have a new LCD controller chip because the pre­viously used LCD controller chip is no longer available. The new LCD controller is not 100% code-compatible with the old chip, and therefore changes were made to the LCD drivers. The updated drivers for the OP7200 are included in Dynamic C v. 9.40 and later, and are backward-compatible for use with the old LCD controller chip.
If you are using a program developed with an earlier version of Dynamic C, you will need to replace the existing Dynamic C SED1335F.LIB library in your Dynamic C installa­tion in the LIB\DISPLAYS\GRAPHIC\320x240 folder. Once you have the new
SED1335F.LIB library, you will have to recompile your program.
The new SED1335F.LIB library is available for download from our Web site at
www.rabbit.com/support/downloads/downloads_prod.shtml, and has been tested for
compatibility with Dynamic C versions 7.33 and later. The changes to the SED1335F.LIB library will improve the OP7200 screen update time
by a factor of four. Otherwise, the form, fit, and function of the OP7200 are not affected by the changes.
50 eDisplay (OP7200)

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 appli­cations 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.DIR, which is located in the Dynamic C directory if you #use LIBRARYFILE-
NAME.LIB
To start the Font and Bitmap Converter, use the Windows Start > Run menu or Windows Explorer to launch fbmcnvtr.exe from the root folder where Dynamic C is installed. Click on Help in the Font and Bitmap Converter utility to get complete use information about the utility.
.
User’s Manual 51

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 correspond-
ing 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. Fol­low the instructions at the beginning of the sample program.
To run a sample program, open it wit h the File menu (if it is not still open), then compile and run it by pressing F9 or by selectin g Run in the Run menu. The OP7200 must be in Program mode (see Section 3.10) and must be connected to a PC using the programming cable as described in Section 2.3.
More complete information on Dynamic C is provided in the Dynamic C User’s Manual.

4.3.1 General OP7200 Sample Programs

The following sample programs are found in the SAMPLES\OP7200 directory.
BOARD_ID.C—Detects the model of the board you are using and displays the informa­tion in the
STDIO window.
FUN.C—Demonstrates the features of the OP7200. A variable customer-supplied 0–10 V DC power supply is recommended to demonstrate the analog input section.

4.3.2 Digital I/O

The following sample programs are found in the IO subdirectory in SAMPLES\OP7200.
BUZZER.C—Demonstrates the use of the OP7200 buzzer.
DIGIN.C—Demonstrates the use of the digital inputs. Using the Demonstration Board,
you can see an input channel toggle from HIGH to LOW when pressing a pushbutton on the Demonstration Board.
DIGOUT.C—Demonstrates the use of the high-current outputs configured as either sinking or sourcing outputs. Using the Demonstration Board, you can see an LED toggle on/off via a high-current output.
LED.C—Toggles the LEDs on the OP7200.
PWM.C—Demonstrates the use of Timer B to generate a 42 Hz PWM signal on digital
output OUT0. The PWM duty cycle may be adjusted from 1 to 99%. Connect +K to +PWR (pins 1 and 3 on screw-terminal header J3) to run this sample program.
TRISTATE.C—Demonstrates the use of the high-current outputs configured as sink­ing, sourcing, or tristate outputs. Using the Demonstration Board, you can see a bank of channels toggle the corresponding LEDs on/off via the high-current outputs.
52 eDisplay (OP7200)

4.3.3 Serial Communication

The following sample programs are found in the RS232 subdirectory in SAMPLES\OP7200.
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.
J10
IN12
IN13
IN14
IN15
/RST
TXC
RXC
TXD/RTS
485
RXD/CTS
+485
GND
To set up the OP7200, you will need to tie TxC and RxD together on the screw-terminal header at J10, and you will also tie TxD and RxC together as shown in the diagram.
RELAYCHR.C—This program echoes charac­ters to or from a serial utility such as Hyper­Terminal or Tera Term.
J10
IN12
IN13
IN14
IN15
/RST
TXC
RXC
TXD/RTS
485
RXD/CTS
+485
GND
To set up the OP7200, you will need to tie TxC and RxD together on the screw-terminal header at J10.
Then connect your PC COM port to screw-terminal header J10 as follows.
GND
DTR
Tx (out)
Rx (in)
76
CTS
DCD
RTS
DSR
X PC Tx to RxC on J10 X PC Rx to TxD on J10 X PC GND to GND on J10
COM
54321
9
8
RING
Set up HyperTerminal or Tera Term as follows: 19200 bps, 8 data bits, no parity , 1 stop bit, and no flow control. Here are a few additional settings if you are using Tera Term.
X Disable Local Echo in th e Terminal setup X Enable the receive and line feed options (CR + LF) under New line in th e Terminal setup
Now when you type characters in the HyperTerminal or Tera Term window, they will appear in the window because they are being echoed back by the sample program.
Two sample programs, MASTER.C and SLAVE.C, are available in the RS485 subdirectory in SAMPLES\OP7200 to illustrate RS-485 master/slave communication. To run these sample programs, you will need a second Rabbit-based system with RS-485—another Rabbit single-board computer or OP7200 may be used as long as you use the master or slave sample program associated with that board.
The RS-485 connections between the slave and master devices are as follows.
• RS485+ to RS485+
RS485– to RS 485–
GND to GND
User’s Manual 53
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.C to pro­gram the master OP7200.

4.3.4 A/D Converter Inputs

The following sample programs are found in the ADC subdirectory in SAMPLES\OP7200.
ADCAL_DIFF_2V.C—Demonstrates how to recalibrate an A/D input channel being used for a differential input with the input attenuator tied to the 2 V reference voltage.
ADCAL_DIFF_GND.C—Demonstrates how to recalibrate an A/D input channel being used for a differential input with the input attenuator tied to analog ground.
ADCAL_MA_CH.C—Demonstrates how to recalibrate an A/D input channel being used to convert analog current measurements to generate the calibr ation constants for that channel.
ADCAL_SE_ALL.C—Demonstrates how to recalibrate all single-ended A/D input chan­nels for a given gain.
ADCAL_SE_CH.C—Demonstrates how to recalibrate one single-ended A/D input chan­nels to generate the calibration constants for that channel.
NOTE: The above sample programs will overwrite the calib ration constants set at the factory.
ADRD_DIFF_2V.C—Demonstrates how to read an A/D input channel being used for a differential input with the input attenuator tied to the 2 V reference voltage.
ADRD_DIFF_GND.C—Demonstrates how to read an A/D input channel being used for a differential input with the input attenuator tied to analog ground.
ADRD_MA_CH.C—Demonstrates how to read an A/D input channel being used to con­vert analog current measurements using previously defined calibration constants for that channel.
ADRD_SE_ALL.C—Demonstrates how to read all single-ended A/D input channels using previously defined calibration constants.
ADRD_SE_CH.C—Demonstrates how to read one single-ended A/D input channels using previously defined calibration constants.
54 eDisplay (OP7200)

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.C—Demonstrates the text features of the GRAPHIC.LIB library.

4.3.6 Keypad

The following sample programs are found in the LCD_KEYPAD subdirectory in
SAMPLES\OP7200.
KP_16KEY.C—Demonstrates using 9-key keypad instead of touchscreen to control vir-
tual keypad.
KP_ANALOG.C—Demonstrates using 9-key keypad instead of touchscreen to control virtual keypad.
KP_BASIC.C—Demonstrates the keypad functions.
KP_MENU.C—Demonstrates how to implement a menu system using the GLMENU.LIB
library.

4.3.7 Touchscreen (OP7200 only)

The following sample program is found in the LCD_TOUCHSCREEN subdirectory in
SAMPLES\OP7200.
BTN_16KEY.C—Demonstrates the use of a virtual keypad for data entry.
BTN_BASICS.C—Demonstrates the basic functionality of the touchscreen buttons.
BTN_KEYBOARD.C—Demonstrates the use of a virtual keypad for data entry.
CAL_TOUCHSCREEN.C—Demonstrates how to recalibrate the touchscreen coordinates.
RD_TOUCHSCREEN.C—Demonstrates how to read the touchscreen in debounced or
real-time modes.
TSCUST16KEY.LIB—Sample library demonstrating how to make custom keysets using GLTOUCHSCREEN.LIB.
TSCUSTKEYBOARD.LIB—Sample library demonstrating how to make custom keysets using GLTOUCHSCREEN.LIB functions.
User’s Manual 55

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. Note that
both sample programs prompt you to use a serial number for the OP7200. This serial num­ber can be any 5-digit number of your choice, and will be unique to a particular OP7200. Do not use the MAC address on the bar code label of the RabbitCore module attached to the OP7200 since you may at some later time use that particular RabbitCore module on another OP7200, and the previously saved calibration data would no longer apply.
SAVECALIB.C—This program demonstrates how to save your analog calibration coef­ficients using a serial port and a PC serial utility such as Tera Term.
NOTE: Use the sample program GETCALIB.C to retrieve the data and rewrite it to the
single-board computer.
GETCALIB.C—This program demonstrates how to retrieve your analog calibration data to rewrite it back to the simulated EEPROM in flash with using a serial ut ility such as Tera Term.
NOTE: Calibration data must be saved previously in a file by the sample program
SAVECALIB.C.
NOTE: In addition to loading the calibration constants on the replacement RabbitCore
module, you will also have to add the product information for the OP7200 to the ID block associated with the RabbitCore module. The sample program WRITE_ IDBLOCK.C, available on the our Web site at www.rabbit.com/support/feature_
downloads.shtml, provides specific instructions and an example.
T wo sample programs are available to show how to get information on ID and user blocks, and how to clear the contents in the user block. These sample programs are in the Dynamic C SAMPLES\USERBLOCK folder.
USERBLOCK_INFO.C—This program repor ts on the size and capabilities of the ID a nd user blocks. It will report the version of the ID block, the size of the ID and user blocks, the size of the user blocks reserved for calibration constants, whether the ID or user blocks are mirrored, and the total amount of flash memory used by the ID and user blocks.
USERBLOCK_CLEAR.C—This program clears the contents of the user block. Note that it does not clear the calibration constants or the system ID block.
When you run this sample program in the Program Mode, there is a 300 ms timer delay after each writeUserBlock() call to allow Dynamic C and the OP7200 to exchange a debug packet in order to inform the debug kernel that the OP7200 is still “alive.” The timer delay is not necessary in the Run Mode with nodebug or when single-stepping.
56 eDisplay (OP7200)

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 pro- vides function calls to display menus on the OP7200 LCD display.
KEYPADS—libraries associated with the keypad. The KEYPAD9.LIB library provides function calls to keypad menus for the OP7200 keypad.
TOUCHSCREENS—libraries associated with the touchscreen. The GLTOUCHSCREEN.LIB library allows you to link adjacent pixel locations on the LCD to create a button. The button can then be translated by the touchscreen when pressed. The TS_R4096.LIB library in the TouchScreens directory provides low-level touchscreen function calls.
RABBITNET—libraries associated with the RabbitNet network. The RN_CFG_
OP72.LIB
peripheral cards. The function calls in the bitNet network, and are described in Appendix D. Each RabbitNet I/O ca rd also has its own library in this folder, and these function calls are described in the user’ s manual for each I/O card.
library is used to configure the OP7200 for use as a master with RabbitNet
RNET.LIB library are used to set up the Rab-
Call the libraries you intend to use in the following order.
#use "OP72xx.LIB"
#use "GLMENU.LIB"
#use "KEYPAD9.LIB"
#use "RN_CFG_OP72.LIB"
#use "NET.LIB"
Finally, call the library or libraries associated with the RabbitNet I/O card(s) in your RabbitNet system, for example, #use "RNET_DIO.LIB" for the RabbitNet digital I/O card
Other generic functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
User’s Manual 57

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 pro­gram. 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.
58 eDisplay (OP7200)

4.5.2 Digital I/O

void digOutConfig(char outputMode);
This functions is used to config ure the hi g h-cu rrent ou tput s as either a si nk i ng or a sour cing t ype ou tput . Note that
PARAMETERS
outputMode is an 8-bit parameter where each bit corresponds to a high-current output:
To set the outputs, set the corresponding bit to one of the following states:
EXAMPLE
brdInit must be executed before calling this function.
Bit 7 = OUT7 Bit 6 = OUT6 Bit 5 = OUT5 Bit 4 = OUT4 Bit 3 = OUT3 Bit 2 = OUT2 Bit 1 = OUT1 Bit 0 = OUT0
0 = Sinking ty pe circuit 1 = Sourcing t ype circuit
digOutConfig(0x81); // OUT0 and OUT7 are sourcing, OUT1–OUNT6 are sinking
SEE ALSO
brdInit, digIn, digOut, triStateConfig, digOutTriState
void digOut(int channel, int state);
Sets the state of a digital output (OUT0–OUT7). The output channel is set to the state that is specified. If the output is configured as sinking, set to 0 for
the driver to be sinking, or set to 1 for the driver to be OFF (high-impedance state). If the output is con­figured as sourcing, set to 0 for the driver to be OFF (high-impedance state), or set to 1 for the driver to be sourcing .
Remember to call brdInit and digOutConfig before executing this function. A runtime error will occur for the following conditions:
1. channel or state out of rang e.
2. brdInit or digOutConfig was not executed before executing digOut.
3. Your tried to use a channel configured as a tri-state output.
PARAMETERS
channel is the output channel number (0–7). state is the output value (0 or 1).
SEE ALSO
brdInit, digOutConfig, triStateConfig, digOutTriState
User’s Manual 59
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
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.
PARAMETER
triState is an 8-bit parameter where each bit corresponds to a high-current output:
Bit 7 = OUT7 Bit 6 = OUT6 Bit 5 = OUT5 Bit 4 = OUT4 Bit 3 = OUT3 Bit 2 = OUT2 Bit 1 = OUT1 Bit 0 = OUT0
To set the outputs, set the corresponding bit to one of the following states:
0 = tristate operation disabled 1 = tristate operation enabled
digOutTriState can be used to control that channel.
EXAMPLE
digTriStateConfig(0x02); // OUT1 tristate is enabled, // Out0, OUT2–OUNT7 tristate are disabled
SEE ALSO
brdInit, digIn, digOutConfig, digOut, digOutTriState
60 eDisplay (OP7200)
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 rang e.
2. brdInit or digTriStateConfig was not executed before executing digOutTriState.
3. Your tried to use a channel that is not configured as a tristate output.
PARAMETERS
channel is the output channel number (0–7). state is set to one of the following output states.
0 = Active Low. 1 = Active High 2 = High-Impedance state.
SEE ALSO
brdInit, digIn, digOutConfig, digOut, triStateConfig
int digIn(int channel);
Reads the state of an input channel (IN0–IN18 for OP7200, IN0–IN15 for OP7210). A run-time error will occur for the following conditions:
1. channel out of range.
2. brdInit was not executed before executing digIn.
PARAMETER
channel is the input channel number (0–18 or 0–15)
RETURN VALUE
The logic state of the input (0 or 1).
SEE ALSO
brdInit, digOut
User’s Manual 61

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.
PARAMETERS
led is the LED to control
0 = LED DS1 (Microproce ssor Bad indicator)
value is used to control whether the LED is on or off
0 = OFF 1 = ON
SEE ALSO
brdInit
62 eDisplay (OP7200)

4.5.4 Serial Communication

Library files included with Dynamic C provide a full range of serial communication sup­port. The RS232.LIB library provides a set of circular-buffer-based serial functions. The
PACKET.LIB library provides packet-based serial functions where packets can be delim-
ited by the 9th bit, by transmission gaps, or with user-defined special characters. Both libraries provide blocking functions, which do not return until they are finished transmit­ting or receiving, and nonblocking functions, which must be called repeatedly until they are finished. For more information, see the Dynamic C Function Reference Manual and Technical Note 213, Rabbit 2000 Serial Port Software.
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 follow­ing sample code illustrates this sequence.
// Initialize Serial Port C, set baud rate to 19200 serCopen(19200); serCwrFlush(); serCrdFlush();
// Initialize Serial Port D, set baud rate to 19200 serDopen(19200); serDwrFlush(); serDrdFlush();
// Set serial mode...must be done after serXopen function(s) and before Rabbitnet initialization serMode(0);
// Initialize RabbitNet port rn_init(RN_PORTS, 1);
Use the following function calls with the OP7200. Note that Serial Port B is used for both RS-485 and the RabbitNet port, so that RS-485 is no longer available once you have con­figured Serial Port B as a RabbitNet port.
User’s Manual 63
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 po rts, this function must be executed after execut ing the last
serXOpen function AND before you start using any of the serial ports. This funct ion is non -reentrant.
If Mode 1 or Mode 3 is selected, CTS/RTS flow control is exercised using the serCflowcontrolOn
serCflowcontrolOff functions from the RS232.LIB library.
and
PARAMETER
mode is the defined serial port configuration.
Mode
B C D
Serial Port
0 RS-485 RS-232, 3-wire RS-232, 3-wire 1 RS-485 RS-232, 5-wire CTS/RTS
*
RS-232, 3-wire RS-232, 3-wire
*
RS-232, 5-wire CTS/RTS
* Use modes 2 and 3 when Serial Port B is going to used by ot her libr aries
RETURN VALUE
0 if valid mode, 1 if not.
SEE ALSO
ser485Tx, ser485Rx
2 3
such as PACKET.LIB.
not initialized not initialized
void ser485Tx(void);
Enables the RS-485 transmitter. Transmitted data get echo'ed back into the receive data buffer. These echo'ed data could be used to know when to disable the transmitter by using one of the following methods:
Byte mode—disable the transmitter after the same byte that is transmitted is detected in the receive
data buffer.
Block data mode—disable the transmitter after the same number of bytes transmitted is detected in the
receive data buffer.
serMode() must be executed before running this function.
SEE ALSO
serMode, ser485Rx
void ser485Rx(void);
Disables the RS-485 transmitter. This puts the OP7200 in listen mode, which allows it to receive data from the RS-485 interface.
SEE ALSO
serMode, ser485Tx
64 eDisplay (OP7200)
serMode() must be exec uted before running this function.

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.
PARAMETERS
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7:
channel
0 +AIN0 +AIN0 -AIN1 1 +AIN1 — 2 +AIN2 +AIN2 -AIN3 3 +AIN3 — 4 +AIN4 +AIN4 -AIN5 5 +AIN5 — 6 +AIN6 +AIN6 -AIN7 7 +AIN7
Single-Ended Input Differential Input
opmode is the mode of operation:
0 = SE_MODE—single-ended input line 1 = DIFF_MODE—differential input line 2 = mAMP_MODE—4–20 mA input line
gaincode is the gain code of 0 to 7 for both single-ended and differential measurements:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
×1 ×2 ×4 ×5
×8 ×10 ×16 ×20
RETURN VALUE
A value corresponding to the voltage on the analog input channel, which will be:
0–2047 for 11-bit A/D conversions (signed 12th bit)
SEE ALSO
anaInVolts, anaInCalib, brdInit, anaInmAmps, anaInDiff
User’s Manual 65
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 conversi on poi nts provided. Four values are calculated and placed into global table using the function
a linear constant, a voltage offs et, a calculation gain code used to calculate calibrations, and a user gain code to set voltage range (defaults to the calculation gain code).
PARAMETERS
anaInEEWr(). Each channel will have the following information:
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7:
_adcCalib to be stored later into
channel
0 +AIN0 +AIN0 -AIN1 1 +AIN1 — 2 +AIN2 +AIN2 -AIN3 3 +AIN3 — 4 +AIN4 +AIN4 -AIN5 5 +AIN5 — 6 +AIN6 +AIN6 -AIN7 7 +AIN7
Single-Ended Input Differential Input
opmode is the mode of operation:
0 = SE_MODE—single-ended input line 1 = DIFF_MODE—dif fe r e ntial inpu t li ne 2 = mAMP_MODE—4–20 mA input line
gaincode is the gain code of 0 to 7 for both single-ended and differential measurements:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
×1 ×2 ×4 ×5
×8 ×10 ×16 ×20
66 eDisplay (OP7200)
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.
SEE ALSO
anaIn, anaInVolts, brdInit, anaInmAmps, anaInDiff, anaInEERd, anaInEEWr
User’s Manual 67
float anaInVolts(int channel, int gaincode);
Reads the state of a single-ended analog in put channel and uses the previously set calibration constants to convert the reading to volts.
PARAMETERS
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7:
channel
Single-Ended Input
0 +AIN0 1 +AIN1 2 +AIN2 3 +AIN3 4 +AIN4 5 +AIN5 6 +AIN6 7 +AIN7
gaincode is the gain code of 0 to 7 for both single-ended and differential measurements:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
×1 0–20 V ×2 0–10 V ×4 0–5 V ×5 0–4 V
×8 0–2.5 V ×10 0–2 V ×16 0–1.25 V ×20 0–1 V
Voltage
Range
RETURN VALUE
A voltage value corresponding to the voltage on the analog input channel.
SEE ALSO
anaInCalib, anaIn, brdInit, anaInmAmps, anaInDiff
68 eDisplay (OP7200)
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.
PARAMETERS
channel is the channel number (0, 2, 4, 6):
Channel
gaincode is the gain code of 0 to 7:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
Differential
Input Lines
0 +AIN0 -AIN1 2 +AIN2 -AIN3 4 +AIN4 -AIN5 6 +AIN6 -AIN7
Voltage
Range
×1 -20 to 20 V ×2 -10 to 10 V ×4 -5 to 5 V ×5 -4 to 4 V
×8 -2.5 to 2.5 V ×10 -2 to 2 V ×16 -1.25 to 1.25 V ×20 -1 to 1V
RETURN VALUE
A voltage value corresponding to the voltage on the analog input channel.
SEE ALSO
brdInit, anaInCalib, anaIn, anaInVolts, anaInmAmps
User’s Manual 69
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
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.
SEE ALSO
brdInit, anaInCalib, anaIn, anaInVolts, anaInDiff
4–20 mA
Input Lines
70 eDisplay (OP7200)
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 block memory area. Use the sam ple prog ram the addresses reserved for the calibration data constants and the addresses available for use by you r program.
NOTE: This function cannot be run in RAM.
PARAMETERS
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7:
_adcCalib. The constants are stored in the top 1K of the reserved user
USERBLOCKINFOR.C in SAMPLES\OP7200 to get
channel
0 +AIN0 +AIN0 -AIN1 1 +AIN1 — 2 +AIN2 +AIN2 -AIN3 3 +AIN3 — 4 +AIN4 +AIN4 -AIN5 5 +AIN5 — 6 +AIN6 +AIN6 -AIN7 7 +AIN7
-1 ALL_CHANNELS ALL_CHANNELS
Single-Ended Input Differential Input
opmode is the mode of operation:
0 = SE_MODE—single-ended input line 1 = DIFF_MODE—differential input line 2 = mAMP_MODE—4–20 mA input line
gaincode is the gain code of 0 to 7 for both single-ended and differential measurements:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
×1 ×2 ×4 ×5
×8 ×10 ×16 ×20
User’s Manual 71
RETURN VALUE
0 if successful.
-1 if address is invalid or out of range.
SEE ALSO
anaInEEWr, anaInCalib, brdInit
72 eDisplay (OP7200)
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 fr om global tab le block memory area. Use the sam ple prog ram the addresses reserved for the calibration data constants and the addresses available for use by you r program.
NOTE: This function cannot be run in RAM.
channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7:
_adcCalib. The constants are stored in the top 1K of the reserved user
USERBLOCKINFOR.C in SAMPLES\OP7200 to get
channel
0 +AIN0 +AIN0 -AIN1 1 +AIN1 — 2 +AIN2 +AIN2 -AIN3 3 +AIN3 — 4 +AIN4 +AIN4 -AIN5 5 +AIN5 — 6 +AIN6 +AIN6 -AIN7 7 +AIN7
-1
Single-Ended Input Differential Input
ALL_CHANNELS ALL_CHANNELS
opmode is the mode of operation:
0 = SE_MODE—single-ended input line 1 = DIFF_MODE—differential input line 2 = mAMP_MODE—4–20 mA input line
gaincode is the gain code of 0 to 7 for both single-ended and differential measurements:
Gain Code Macro Gain
0 1 2 3 4 5 6 7
GAIN_X1
GAIN_X2
GAIN_X4
GAIN_X5
GAIN_X8
GAIN_X10
GAIN_X16
GAIN_X20
×1
×2
×4
×5
×8 ×10 ×16 ×20
User’s Manual 73
RETURN VALUE
0 if successful.
-1 if address is invalid or out of range.
SEE ALSO
anaInEERd, brdInit
74 eDisplay (OP7200)

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.
int glMenuInit(windowMenu *menu, fontInfo *pFont,
int border, int shadow, char **menu_options, char* title, maxOptDisplayed);
Initializes a menu structure with the required parameters to automatically build and display a text menu when the
PARAMETERS
menu is a pointer to the windowMenu descriptor pFont is a pointer to the fontInfo descriptor border describes the menu border options:
glMenu function is executed.
0 = NO_BORDER, no border drawn 1 = SINGLE_LINE, draw a single-line border around the text menu 2 = DOUBLE_LINE, draw a double-line border around the text menu
shadow describes the menu shadow options:
0 = NO_SHADOW, no shadowing provided 1 = SHADOWING, shadow ing is p rovided on the menu
menu_options is a pointer to the list of menu options—here is an example of a list of options for the
menu system:
// Menu options........set as needed for your application
const char *main_menu [] = { "1.Increase Menu size", "2.Decrease Menu size", "3.Backlight menu", "" };
It is possible to insert or delete menu options. The highlight bar is set up to start with the first menu option and stop at the last menu option in the menu.
When adding or deleting menu options you mus t match up the case st at ements to the menu opt ion number.
title is the menu title
ASCII string = title null string = no title
maxOptDisplayed indicates the maximum number of options to be displayed by the menu:
-1 = forces all options to be displayed >0 = menu box will only display the number of options indicated, which will require the user to use
the scroll keys to bring an option into the menu box view area for the selection
User’s Manual 75
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. The state parameters are as follows:
0 = MENU_INIT, initialize and display menu 1 = MENU_NO_CHANGE, return to selected option, no changes to menu or highlight bar. 2 = MENU_REFRESH, display the last image of the menu, including the location of the highlight
bar.
x is the x coordinate of where the text menu is to start y is the y coordinate of where the text menu is to start
RETURN VALUE
0 = no option is selected >0 = option the user has selected
-1 = menu has exceeded LCD screen width
-2 = menu has exceeded LCD screen height
SEE ALSO
glMenuInit, glMenuClear, glRefreshMenu
void glRefreshMenu(windowMenu *mPtr);
Refreshes the menu indicated by the WindowMenu pointer.
PARAMETER
mPtr is a windowMenu descri pt or pointer
RETURN VALUE
None.
SEE ALSO
glMenuInit, glMenu, glMenuClear
76 eDisplay (OP7200)
glMenuClear(windowMenu *mPtr);
Clears the menu indicated by the WindowMenu descriptor pointer.
PARAMETER
mPtr is a windowMenu descriptor pointer
RETURN VALUE
None.
SEE ALSO
glRefreshMenu, glMenu, glMenuInit
User’s Manual 77
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.
SEE ALSO
glDispOnOFF, glBacklight, glSetContrast, glPlotDot, glBlock, glPlotPolygon, glPlotCircle, glHScroll, glVScroll, glXFontInit, glPrintf, glPutChar, glSetBrushType, glBuffLock, glBuffUnlock, glPlotLine
void glBuffLock(void);
Increments LCD screen-locking counter. Graphics calls are recor ded in th e LCD memory buffer , an d ar e not transferred to the LCD if the counter is non-zero.
NOTE: Functions glBuffLock() and glBuffUnlock() can be nes ted 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 graphics calls significantly speeds up the rendering.
SEE ALSO
glBuffUnlock, glSwap
void glBuffUnlock(void);
Decrements LCD screen-locking counter. The contents of the LCD buffer are transferred to the LCD if the counter goes to zero.
SEE ALSO
glBuffLock, glSwap
void glSwap(void);
Checks the LCD screen-locking counter. The contents of the LCD buffer are transferred to the LCD if the counter is zero.
SEE ALSO
glBuffLock, glBuffUnlock
78 eDisplay (OP7200)
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.
PARAMETER
type is the value can be one of the following macros:
PIXBLACK draws black pixels
PIXWHITE draws white pixels PIXXOR draws old pixel XOR'ed with the new pixel
SEE ALSO
glGetBrushType
User’s Manual 79
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.
PARAMETERS
x is the x coordinate of the dot y is the y coordinate of the dot
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. Any portion of the line that is beyond the LCD display area will be clipped.
PARAMETERS
x0 is the x coordinate of one endpoint of the line y0 is the y coordinate of one endpoint of the line x1 is the x coordinate of the other endpoint of the line y1 is the y coordinate of the other endpoint of the line
SEE ALSO
glPlotDot, glPlotPolygon, glPlotCircle
80 eDisplay (OP7200)
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.
PARAMETER
x is the x coordinate of the upper left corner of the block y is the y coordinate of the left top corner of the block bmWidth is the width of the block bmHeight is the height of the block
SEE ALSO
glFillScreen, glBlankScreen, glPlotPolygon, glPlotCircle
void glPlotPolygon(int n, int x1, int y1, int x2,
int y2, ...);
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. The function will also
return, doing nothing, if there are less than 3 vertices.
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 y2 is the y coordinate of the second vertex ... coordinates of additional vertices
SEE ALSO
glPlotVPolygon, glFillPolygon, glFillVPolygon
User’s Manual 81
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.
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 y2 is the y coordinate of the second vertex ... coordinates of additional vertices
SEE ALSO
glFillVPolygon, glPlotPolygon, glPlotVPolygon
void glPlotVPolygon(int n, int *pFirstCoord);
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. The function will also
return, doing nothing, if there are less than 3 vertices.
PARAMETERS
n is the number of vertices pFirstCoord is a pointer to an array of vertex coordinates x1,y1, x2,y2, x3,y3, ...
SEE ALSO
glPlotPolygon, glFillPolygon, glFillVPolygon
void glFillVPolygon(int n, int *pFirstCoord);
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.
PARAMETERS
n is the number of vertices pFirstCoord is a pointer to an array of vertex coordinates x1,y1, x2,y2, x3,y3, ...
SEE ALSO
glFillPolygon, glPlotPolygon, glPlotVPolygon
82 eDisplay (OP7200)
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.
PARAMETERS
xc is the x coordinate of the center of the circle yc is the y coordinate of the center of the circle rad is the radius of the circle (in pixels)
SEE ALSO
glFillCircle, glPlotPolygon, glFillPolygon
void glFillCircle(int xc, int yc, int rad);
Draws a filled 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.
PARAMETERS
xc is the x coordinate of the center of the circle yc is the y coordinate of the center of the circle rad is the radius of the circle (in pixels)
SEE ALSO
glPlotCircle, glPlotPolygon, glFillPolygon
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 of each font item (in pixels) pixHeight is the height of each font item (in pixels) startChar is the value of the first printable character in the font character set endChar is the value of the last printable character in the font character set xmemBuffer is an xmem address of the pointer to a linear array of font bitmaps
SEE ALSO
glPrinf
User’s Manual 83
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, (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. 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 upper left corner of the text y is the y coordinate (row) of the left top corner of the text pInfo is a pointer to the window frame descriptor fmt is a formatted string ... is a formatted string of conversion paramet er(s)
EXAMPLE
glprintf(0,0, &fi12x16, "Test %d\n", count);
SEE ALSO
glXFontInit
'\b', '\t', '\n', and '\r'
void glSetPfStep(int stepX, int stepY);
Sets the glPrintf() printing step direction. The x and y step directions are independent signed val­ues. The actual step increments depend on the height and width of the font being displayed, which are multiplied by the step values.
Use glGetPfStep() to examine the current x and y printing step direction.
PARAMETERS
stepX is the glPrintf x step value stepY is the glPrintf y step value
SEE ALSO
glGetPfStep
void glGetPfStep(void);
Gets the current glPrintf() printing step direction. Each step direction is independent of the other, and is treated as an 8-bit signed value. The actual step increments depend s on th e height and width of the font being displayed, which are multiplied by the step values.
Use glSetPfStep() to control the x and y printing step direction.
RETURN VALUE
The x step is returned in the MSB, and the y step is returned in the LSB of the integer result.
SEE ALSO
glSetPfStep
84 eDisplay (OP7200)
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-maj or and byte-a l igned.
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. 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 upper left corner of the text y is the y coordinate (row) of the left top corner of the text pInfo is a pointer to the window frame descriptor code is the ASCII character to display
SEE ALSO
glFontCharAddr, glPrintf
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 format-
ted 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 ptr is not used, and is a place holder due to the STDIO string functions cnt is not used, and is a place holder due to the STDIO string functions pInfo is a pointer to the window frame descriptor
SEE ALSO
glPrintf, glPutFont
User’s Manual 85
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 col­umn and row is displayed.
NOTE: Be sure to execute the TextWindowFrame function before using any of the
text-only functions (TextGotoXY, TextPutChar, TextPrintf, TextCursorLocation).
PARAMETERS
window is a pointer to the window frame pFont is a pointer to the window frame descriptor x is the x coordinate of where the text window frame is to start y is the y coordinate where the text window frame is to start winWidth is the width of the text window frame winHeight is the height of the text window frame
RETURN VALUE
0 = window frame was successfully created
-1 = x coordinate + width has exceeded the display boundary
-2 = y coordinate + height has exceeded the display boundary
SEE ALSO
TextPutChar, TextPrintf, TextCursorLocation, TextGotoXY
void TextGotoXY(windowFrame *window, int col,
int row);
Sets the cursor location on the display of where to display the next character. The display location is based on the height and width of the character to be displayed.
NOTE: Be sure to execute the TextWindowFrame function before using any of the
text-only functions (TextGotoXY, TextPutChar, TextPrintf, TextCursorLocation).
PARAMETERS
window is a pointer to the window frame col is the character column location row is the character row location
SEE ALSO
TextPutChar, TextPrintf, TextWindowFrame, TextCursorLocation
86 eDisplay (OP7200)
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).
PARAMETERS
window is a pointer to the window frame col is a pointer to the cursor column variable row is a pointer to the cursor row variable
RETURN VALUE
lower word = cursor row location upper word = cursor column location
SEE ALSO
TextGotoXY, TextPrintf, TextWindowFrame, TextPutChar
void TextPutChar(struct windowFrame *window,
char ch);
Displays a character on the display where the cursor is currently pointing. If any portion of the bitmap character is outside the LCD display area, the character will not to be displayed.
NOTE: Be sure to execute the TextWindowFrame function before using any of the
text-only functions (TextGotoXY, TextPutChar, TextPrintf, TextCursorLocation).
PARAMETERS
window is a pointer to the window frame ch is the character to be displayed on the LCD
SEE ALSO
TextGotoXY, TextPrintf, TextWindowFrame, TextCursorLocation
User’s Manual 87
void TextPrintf(struct windowFrame *window,
char *fmt, ...);
This function prints a formatted string (much like printf) on the LCD screen. Only printable charac­ters in the font set are printed; escape sequences sequences will be skipped over. For example, nothing will be displayed for
The text window feature provides end-of-line wrapping and clipping after the character in the last col­umn and row is displayed.
NOTE: Be sure to execute the TextWindowFrame function before using any of the
text-only functions (TextGotoXY, TextPutChar, TextPrintf, TextCursorLocation).
PARAMETERS
window is a pointer to the window frame fmt is a formatted string ... formatted-string conversion parameter(s)
EXAMPLE
TextPrintf(&TextWindow, "Test %d\n", count);
SEE ALSO
TextGotoXY, TextPutChar, TextWindowFrame, TextCursorLocation
'\r' and '\n' are also recognized. All other escape
'\b' and 't'.
void glLeft1(int left, int top, int cols, int rows);
Scrolls byte-aligned window left one pixel, right column filled by current pixel type (color).
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
SEE ALSO
glHScroll, glRight1
void glRight1(int left, int top, int cols,
int rows);
Scrolls byte-aligned window right one pixel, left column filled by current pixel type (color).
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
SEE ALSO
glHScroll, glLeft1
88 eDisplay (OP7200)
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. Parameters will be checked to verify that the scrolling area is valid. The minimum scrolling area is a width of 8 pixels and a height of one row.
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
nPix is the number of pixels to scroll within the defined window (negative value to scroll left)
SEE ALSO
glVScroll
void glUp1(int left, int top, int cols, int rows);
Scrolls byte-aligned window up one pixel, bottom row filled by current pixel type (color).
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
SEE ALSO
glVScroll, glDown1
void glDown1(int left, int top, int cols, int rows);
Scrolls byte-aligned window down one pixel, top row filled by current pixel type (color).
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
SEE ALSO
glVScroll, glUp1
User’s Manual 89
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. Parameters will be checked to verify that the scrolling area is valid. The minimum scrolling area is a width of 8 pixels and a height of one row.
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap cols is the number of columns in the window, must be evenly divisible by 8 rows is the number of rows in the window
nPix is the number of pixels to scroll within the defined window (negative value to scroll up)
SEE ALSO
glHScroll
void glXPutBitmap(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 automat­ically calls ible by 8).
Any portion of a bitmap image or character that is outside the LCD display area will be clipped.
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap width is the width of the bitmap height is the height of the bitmap
bitmap is the address of the bitmap in xmem
SEE ALSO
glXPutFastmap if the bitmap is byte-aligned (left edge and width are each evenly divis-
glXPutFastmap, glPrintf
90 eDisplay (OP7200)
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.
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap width is the width of the bitmap height is the height of the bitmap
bitmap is the address of the bitmap in xmem
SEE ALSO
glXPutBitmap, glPrintf
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 bitmap is byte-aligned (left edge and width are each evenly divisible by 8).
PARAMETERS
x is the x coordinate of the left edge of the bitmap (in pixels) y is the y coordinate of the top edge of the bitmap (in pixels) bmWidth is the width of the bitmap (in pixels) bmHeight is the height of the bitmap (in pixels)
xBm is the address of the bitmap in xmem RAM
SEE ALSO
glXPutFastmap, glPrintf
User’s Manual 91
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.
PARAMETERS
left is the upper left corner of bitmap, must be evenly divisible by 8 top is the left top corner of the bitmap width is the width of the bitmap height is the height of the bitmap
xmemptr is the address of the bitmap in xmem
SEE ALSO
glXPutBitmap, glPrintf
void TextBorderInit(windowFrame *wPtr, int border,
char *title);
Initializes the window frame structure with the border and title information. The TextWindowFrame function must be executed before running this function.
PARAMETERS
WindowFrame is a pointer to the window frame descriptor border is the border style:
SINGLE_LINE—single-line border around the text window DOUBLE_LINE—double-line border around the text window
title is a pointer to the title:
1. If a NULL string is detected, then no title is written to the text menu
2. If a string is detected, then it will be written to the top of the text menu box as the centered title
SEE ALSO
TextBorder, TextGotoXY, TextPutChar, TextWindowFrame,TextCursorLocation
void TextBorder(windowFrame *wPtr);
Displays the border for a given window frame. The TextBorderInit function must be executed before running this function.
This function will automatically adjust the text window parameters to accommodate the space taken by the text border. This adjustment will only occur once after the
PARAMETER
wPtr is a pointer to the window frame descriptor
TextBorderInit function executes.
SEE ALSO
TextBorderInit, TextGotoXY, TextPutChar, TextWindowFrame, TextCursorLocation
92 eDisplay (OP7200)
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 Tex-
tWindowFrame
PARAMETER
wPtr is a pointer to the window frame descriptor
RETURN VALUE
The maximum number of characters that can be displayed within the text window.
SEE ALSO
TextGotoXY, TextPrintf, TextWindowFrame, TextCursorLocation
function must be executed before running this function.
User’s Manual 93
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 func-
tions 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. Raster lines may
appear in your display image when this mode is turned on.
PARAMETER
0 = animation mode disabled 1 = animation mode enabled
SEE ALSO
GRAPHIC.LIB
void glRealtime(int OnOff);
Enables/disables the real-time mode for the glPlotDot function. The glPlotDot real- time mode is defaulted OFF when the graphic driver is executed.
PARAMETER
0 = real-time mode disabled 1 = real-time mode enabled
SEE ALSO
glPlotDot, GRAPHIC.LIB
void glBackLight(int onOff);
Turns the backlight on or off. The backlight is off by default when the OP7200 powers up.
PARAMETER
0 = backlight off 1 = backlight on
SEE ALSO
glSetContrast
94 eDisplay (OP7200)
Loading...