background image

OP7100

Serial Graphic Display

User’s Manual

019–0065 • 0

7

08

3

1–

O

Summary of Contents for OP7100

Page 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 070831 O ...

Page 2: ... Rabbit Semiconductor Inc Rabbit Semiconductor Inc www rabbit com 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 Rabbit Semiconductor 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 rea...

Page 3: ...p the OP7100 18 Connecting the OP7100 to a Host PC 20 Running Dynamic C 22 Chapter 3 Hardware 23 OP7100 Subsystems Overview 24 Computing Module 24 Power Management 25 ADM691 Supervisor Chip 26 Handling Power Fluctuations 26 Watchdog Timer 27 Power Shutdown and Reset 28 PFI Early Warning 28 Memory Protection 29 Battery Backup 29 System Reset 29 Liquid Crystal Display LCD 30 ContrastAdjustment 30 Ba...

Page 4: ...RIE Receiver Interrupt Enable 46 FE Framing Error 46 PE Parity Error 46 OVRN Overrun Error 46 RDRF Receiver Data Register Full 46 ASCI Control Register A 47 MOD0 MOD2 Data Format Mode Bits 47 MPBR EFR Multiprocessor Bit Receive Error Flag Reset 47 RTS0 Request to Send Channel 0 47 CKA1D CKA1 Disable 47 TE Transmitter Enable 47 RE Receiver Enable 48 MPE Multiprocessor Enable 48 ASCI Control Registe...

Page 5: ... Polygon 77 Fill a Circle 77 Fill a Polygon 77 Draw a Bitmap 77 Font and Bitmap Conversion 78 Using the Font Bitmap In Your Program 79 Printing Text 80 Keypad Programming 81 Initialization 81 Scanning the Keypad 81 Reading KeypadActivities 81 Chapter 6 Installation 83 Grounding 84 Installation Guidelines 85 Mounting 86 Bezel Mount Installation 86 General Mounting Recommendations 87 Appendix A Trou...

Page 6: ...Timing 101 Memory Map 102 Input Output Select Map 102 Z180 Internal Input Output Registers Addresses 00 3F 102 Epson 72423 Timer Registers 0x4180 0x418F 104 Other Registers 105 Interrupt Vectors 106 Power Failure Interrupts 107 Interrupt Priorities 107 Appendix D Serial Interface Board 109 Introduction 110 External Dimensions 111 Appendix E Backup Battery 113 Battery Life and Storage Conditions 11...

Page 7: ...neer the target system that interfaces with the OP7100 Understanding the basics of operating a software program and editing files under Windows on a PC Knowledge of the basics of C programming For a full treatment of C refer to the following texts The C Programming Language by Kernighan and Ritchie and or C A Reference Manual by Harbison and Steel Knowledge of basic assembly language and architect...

Page 8: ...le Programmable Read Only Memory LCD Liquid Crystal Display LED Light Emitting Diode NMI Nonmaskable Interrupt PIO Parallel Input Output Circuit Individually Programmable Input Output PRT Programmable Reload Timer RAM Random Access Memory RTC Real Time Clock SIB Serial Interface Board SRAM Static Random Access Memory UART Universal Asynchronous Receiver Transmitter Table 2 Icons Icon Meaning Icon ...

Page 9: ...eyword or phrase IN 01 Program comments are written in Courier font plain face Italics Indicates that something should be typed instead of the italicized words e g in place of filename type a file s name Edit Sans serif font bold signifies a menu or menu selection An ellipsis indicates that 1 irrelevant program text is omitted for brevity or that 2 preceding program text may be repeated indefinite...

Page 10: ...OP7100 x About This Manual ...

Page 11: ...OP7100 Overview 11 CHAPTER 1 OVERVIEW Chapter 1 provides an overview and a brief description of the OP7100 features ...

Page 12: ...strates the standard OP7100 board layout C48 R31 0V GND JP4 C29 R53 J3 J4 DIGITAL I O C104 C106 C101 C95 C96 R62 R61 C102 JP5 BT1 C61 C60 C56 C2 C62 C55 C59 Battery J9 RS485 TERM J11 DCIN GND 485 485 GND C47 D3 D2 C44 J7 PRGM PORT U20 JP1 LCD Y1 C4 C7 U4 R2 C51 J1 LCD U1 R1 Y2 C12 R51R52 RN2 R14 C13 R15 C34 R13 C31 U17 C32 U18 RN3 C33 U19 U6 U2 RT1 R33 C49 J2 C1 T1 Q3 DANGER HIGH VOLTAGE L1 Q2 Q1 ...

Page 13: ... controller 256K flash EPROM for program 256K flash EPROM for screen bitmaps switching voltage regulator Appendix B provides detailed specifications for the OP7100 The OP7100 also includes battery backed RAM 128K and a battery backed real time clock a watchdog timer and power failure interrupt Options The OP7100 series of serial displays has two versions Table 1 1 lists their standard features Eit...

Page 14: ...lable to program the OP7100 when a second RS 232 serial port is needed by the application being developed For ordering information call your Rabbit Semiconductor Sales Representative Software The OP7100 is programmed using Rabbit Semiconductor s Dynamic C an integrated development environment that includes an editor a C compiler and a debugger Library functions provide an easy and robust interface...

Page 15: ...000 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 The OP7100 has been tested to meet the EN55022 Class A emissions standard with ferrite RFI suppressors on the I O cables Additional shielding or filtering may be needed to meet Class B emissions standards Since Rabbit Semiconductor products a...

Page 16: ...OP7100 16 Overview ...

Page 17: ...OP7100 Getting Started 17 CHAPTER 2 GETTING STARTED Chapter 2 provides instructions for connecting the OP7100 to a host PC and running a sample program ...

Page 18: ...ader at the back of the OP7100 Watch the polarity of the connection so that the banded wire from the power supply goes to DCIN as shown in Figure 2 1 Figure 2 1 OP7100 Power Supply Connections Be careful to connect the power supply wires to the correct screw terminals on header J8 The OP7100 may be destroyed if the power supply is connected to the wrong screw terminal A protective diode prevents d...

Page 19: ... EXIT SUPRT DEMO Clock EXIT Bklit Ctrst Beep Exit Display Bitmaps Yr Exit Day Mon Hr Sec Min Hr Min Sec Yr Mon Day Set 1999 Dec 31 23 59 59 Exit Press Keys Before Tiimeout EXIT SUPPORT Z WORLD TECHNICAL SUPPORT 1 530 757 3737 www zworld com Figure 2 2 OP7100 Demo Screens ...

Page 20: ...180 microprocessor There are two options for the serial communication link Option 1 via optional SIB Connect an RJ 12 cable between the PC and the SIB An RJ 12 to DB9 adapter is included for DB9 PC COM ports Remove any jumpers that may be installed on the OP7100 s header J4 and plug the SIB s 8 pin connector onto header J4 as shown in Figure 2 4 Make sure that pin 1 on the ribbon cable connector o...

Page 21: ...ng Connection Figure 2 5 Direct Programming Connection Option 2 uses an RS 232 serial port to program the OP7100 If this serial port is needed in your application use the SIB as described in Option 1 See Chapter 3 Hardware for more information on the serial ports J4 SIB2 To PC J4 1 2 3 4 5 6 7 8 ...

Page 22: ... the one selected in the Dynamic C OPTIONS menu Select the 1 stop bit protocol See Appendix A Troubleshooting if an error message such as Target Not Responding or Communication Error appears Once the necessary changes have been made to establish communication between the host PC and the OP7100 use the Dynamic C shortcut Ctrl Y to reset the controller and initiate communication At this point the LC...

Page 23: ...TER 3 HARDWARE Chapter 3 describes how to use the OP7100 Sections are included to describe the following features Subsystems Overview Power Management Liquid Crystal Display Keyboard Interface Digital I O Serial Communication ...

Page 24: ...at 9 216 MHz The watchdog timer microprocessor chip provides a watchdog timer function power failure detection RAM protection and battery backup The real time clock provides time and date information to applications running on the OP7100 The EEPROM is simulated in flash EPROM for consistency with Rabbit Semiconductor controllers whose software libraries rely on exchanging information with the EEPR...

Page 25: ...h on the gate of Q3 enables Q1 and Q2 to oscillate and a low turns off Q3 stopping the oscillation of Q1 and Q2 Figure 3 2 shows these internal power supplies in a block diagram Figure 3 2 Block Diagram of OP7100 Internal Power Regulators The DC input source can also be brought out on pin 9 of header J10 the DE 9 connector by installing a 0 Ω resistor at R32 This option allows power to be supplied...

Page 26: ...ould cause a single power failure interrupt Then the interrupt service routine would restore data from the previous state when the voltage recovers However fluctuations in the DC input line could cause the ADM691 to see multiple crossings of the 1 3 V input power reset threshold These multiple negative edge transitions would in turn cause the Z180 to see multiple power failure interrupts The ADM69...

Page 27: ... resetting the Z180 endasm Of course if the DC input voltage continues to decrease then the OP7100 will just power down Call the Dynamic C function hitwd during the power failure service routine to make sure that the watchdog timer does not time out and thereby reset the processor The controller can continue to run at low voltages and so it might not be able to detect the low voltage condition aft...

Page 28: ...formance of the power failure interrupt circuit we have added some hysteresis to the power failure comparator by adding a resistor R34 between the comparator input and output pins R34 can be found on the 175 0196 and the 175 0211 versions of the OP7100 The hysteresis prevents the comparator from switching rapidly and therefore generating multiple interrupts when the input voltage is falling slowly...

Page 29: ...o the RAM and RTC can also protect other devices attached to the system against power failures The ADM691 super visor switches VRAM to VBAT or VCC whichever is greater To prevent hunting the switchover actually occurs when Vcc is 50 mV higher than VBAT The circuit draws no current from the battery once regular power is applied System Reset The ADM691 chip drives the RESET line The RESET line is no...

Page 30: ...hefactorydefaultfor the OP7110 The OP7100 is configured withsoftwarecontrastcontrolasthefac torydefault Withsoftwarecontrastcon trol the contrast level may be set via a software function call Since it is hard to guess the correct level in software buttons defined on the OP7100 touch screen and in software can be used to adjustthecontrast Auser suppliedkey pad can facilitate this type of software c...

Page 31: ...ackground The jumpers on header JP1 may be rear ranged as shown in Figure 3 7 to display white characters on a blue negative background Figure 3 7 LCD Background Jumper Settings JP2 JP2 Software Contrast Adjustment Manual Contrast Adjustment FD FD OP7110 3 2 1 3 2 1 OP7100 FD Positive Background white with blue graphics Negative Background blue with white graphics 10 12 JP1 1 2 3 4 5 6 7 8 9 11 10...

Page 32: ... data bits one address line and three control lines RD WR and 1335 CS The interface from the LCD controller to the LCD module is unidirectional Data flow from the controller chip to the LCD module Anumber of control lines are provided for this function but not all of them are used for a particu lar LCD module The controller continually reads the SRAM for data placed there by the microprocessor and...

Page 33: ...er setting on header JP2 Once a contrast value is set it will be maintained A single programmed I O bit is used to turn the backlight on or off The controller chip used in OP7100 s sold before 2006 supported either 32K or 64K of SRAM These OP7100s were designed using a dual footprint SRAM to accept either one 32K or two 32K SRAM One 32K part was standard OP7100 units sold after June 2006 have a ne...

Page 34: ...nd J6 Figure 3 10 OP7100 Headers J5 and J6 Keypad Interface Figure 3 11 shows a simplified diagram of the keypad interface Figure 3 11 Block Diagram of OP7100 Keypad Interface Table 3 1 OP7100 Keypad Header Pinout Signal Header J5 J6 Pin Signal Header J5 J6 Pin ROW0 1 COL0 9 ROW1 2 COL1 10 ROW2 3 COL2 11 ROW3 4 COL3 12 ROW4 5 COL4 13 ROW5 6 COL5 14 ROW6 7 COL6 15 ROW7 8 COL7 16 J6 J5 U10 VCC Q 0 7...

Page 35: ...tal I O are located on header J7 and are available through a con nector on the outside of the OP7100 back cover Figure 3 13 shows the pinout and the location of header J7 Figure 3 13 OP7100 Header J7 10 kΩ 5 V 5 V To Z180 Data Bus CMOS Input DIN 0 7 10 12 J7 1 2 3 4 5 6 7 8 9 11 13 15 17 19 14 16 18 20 OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 DIN0 DIN1 DIN2 DIN3 DIN4 DIN5 DIN6 DIN7 VCC GND GND GND ...

Page 36: ...485 port An RS 485 channel can provide half duplex asynchronous communication over twisted pair wires for distances up to 3 km Two other configurations shown in Figure 3 14 are one 3 wire RS 232 one RS 485 and two 3 wire RS 232 The configurations are set with jumpers on header JP3 Figure 3 15 Serial Communication Jumper Configurations T1OUT T2OUT R1IN R2IN T1IN T2IN R1OUT R2OUT TX1 RTS TXA0 232A 4...

Page 37: ...ins 2 and 3 instead of the factory default RS 485 and RS 485 signals Figure 3 16 shows the header JP4 jumper configurations and the location of headers JP3 and JP4 Figure 3 16 Serial Communication Options for External Plug Connector Header J11 FD JP4 1 2 3 4 5 6 7 8 RS 485 on header J11 JP4 1 2 3 4 5 6 7 8 RS 232 on header J11 JP4 JP5 JP3 ...

Page 38: ...a DC power supply to be made available to the device being connected to the OP7100 Rabbit Semiconductor has RS 232 support libraries for Z180 Ports 0 and 1 The following functional support for serial communication is included Initializing the serial ports Monitoring and reading a circular receive buffer Monitoring and writing to a circular transmit buffer CTS clear to send and RTS request to send ...

Page 39: ...low by the RS 232 device to which it is talking The OP7100 does not support CTS for the Z180 s Port 1 Modem Communication Modems and telephone lines facilitate RS 232 communication across great distances The Dynamic C RS 232 library supports communication with a Hayes Smart Modem or compatible The CTS RTS and DTR lines of the modem are not used If the modem used is not truly Hayes Smart Modem comp...

Page 40: ...ngle twisted pair wires to connect RS 485 to RS 485 and RS 485 to RS 485 as shown in Figure 3 20 Figure 3 20 RS 485 Network 485 GND 485 GND 4 3 2 1 DCIN 12 30V DC 5 Figure 3 19 RS 485 Signals GND PIN01 PIN02 PIN03 PIN04 PIN05 PIN06 PIN07 PIN08 5V PIN09 PIN10 PIN11 PIN12 PIN13 PIN14 PIN15 PIN16 GND DC K GND HV01 HV02 HV03 HV04 HV05 HV06 HV07 HV08 HV09 HV10 HV11 HV12 HV13 HV14 485 485 PROGRAM RUN 5 ...

Page 41: ... 3 21 Enabling Disabling Termination Resistors Only a single solid conductor should be placed in a screw clamp terminal Bare copper particularly if exposed to the air for a long period before installation can become oxidized The oxide can cause a high resistance 20 Ω connection especially if the clamping pressure is not sufficient To avoid oxidation use tinned wires or clean shiny copper wire If y...

Page 42: ...rial Channel 1 08 RDR0 Receive Data Register Serial Channel 0 09 RDR1 Receive Data Register Serial Channel 1 Use of the Serial Ports If you plan to use the serial ports extensively or if you intend to use syn chronous communications Rabbit Semiconductor recommends that you obtain copies of the following Zilog technical manuals available from Zilog Inc in Campbell California Z180 MPU User s Manual ...

Page 43: ...to ignore all received characters except those with the extra multiprocessing bits enabled This provides a 1 byte attention message that can be used to wake up a processor without the processor having to intelligently monitor all traffic on a shared communications link The block diagram in Figure 3 22 shows Serial Channel 0 Serial Chan nel 1 is similar but control lines for RTS and DCD do not exis...

Page 44: ... is not available to synchronize loading the data register TDR properly An interrupt driven port works as follows The program enables the receiver interrupt as long as it wants to receive characters The transmitter interrupt is enabled only while characters are waiting in the output buffer When an interrupt occurs the interrupt routine must determine the cause receiver data register full transmitt...

Page 45: ...fter STAT0 has been read The receiver is held to reset as long as the input pin is held high This function is not generally useful because an interrupt is requested as long as DCD0 is a 1 This forces the program mer to disable the receiver interrupts to avoid endless interrupts A better design would cause an interrupt only when the state of the pin changes This pin is tied to ground in the CM7000 ...

Page 46: ...er RDR clears the RDRF flag The EFR bit in CNTLA is used to clear the other error flags FE Framing Error A stop bit was missing indicating scrambled data This bit is cleared by the EFR bit in CNTLA PE Parity Error Parity is tested only if MOD1 in CNTLA is set This bit is cleared by the EFR bit in CNTLA OVRN Overrun Error Overrun occurs when bytes arrive faster than they can be read from the receiv...

Page 47: ... bits MPBR EFR Multiprocessor Bit Receive Error Flag Reset Reads and writes on this bit are unrelated Storing a byte when this bit is 0 clears all the error flags OVRN FE PE Reading this bit obtains the value of the MPB bit for the last read operation when the multiprocessor mode is enabled RTS0 Request to Send Channel 0 Store a 1 in this bit to set the RTS0 line from the Z180 high This bit is ess...

Page 48: ...e detected Others are ignored If this bit is 0 all bytes received are processed Ignored bytes do not affect the error flags or RDRF ASCI Control Register B Control Register B configures the multiprocessor mode parity and baud rate for each channel SS Source Speed Select Coupled with the prescaler PS and the divide ratio DR the SS bits select the source internal or external clock and the baud rate ...

Page 49: ...y enabled CTS PS Clear to Send Prescaler When read this bit gives the state of external pin CTS 0 low 1 high When CTS is high RDRF is inhibited so that incoming receive characters are ignored When written this bit has an entirely different function If a 0 is written the baud rate prescaler is set to divide by 10 If a 1 is written it is set to divide by 30 MP Multiprocessor Mode When this bit is se...

Page 50: ...t 18 432 MHz bps 00 57 600 115 200 20 19 200 38 400 01 28 800 57 600 21 9600 19 200 02 or 08 14 400 28 800 22 or 28 4800 9600 03 or 09 7200 14 400 23 or 29 2400 4800 04 or 0A 3600 7200 24 or 2A 1200 2400 05 or 0B 1800 3600 25 or 2B 600 1200 06 or 0C 900 1800 26 or 2C 300 600 0D 450 900 2D 150 300 0E 225 450 2E 75 150 Table 3 5 relates the Z180 s ASCI Control Register B to the baud rate ...

Page 51: ...OP7100 Software 51 CHAPTER 4 SOFTWARE Chapter 4 describes the Dynamic C functions used with the OP7100 ...

Page 52: ... version of Dynamic C and according to whether you will use your OP7100 in a landscape or a portrait orientation See the Dynamic C Technical Reference manual for more information on use and other directives as well as for information on other libraries Table 4 1 OP7100 Software Libraries Library Application AASCZ0 LIB Serial communication applications Z180 Serial Port 0 AASCZ1 LIB Serial communica...

Page 53: ...ecking the status of a particular input For example the statement if inport 0x4140 0x04 can be used to check whether DIN2 whose bit mask is 0x04 is on Likewise if inport 0x4140 0x80 can be used to check the status of input DIN7 The Dynamic C function IBIT can be used to determine the state of one input bit For example to check DIN2 which is bit 2 of the inputs use the statement if IBIT 0x4140 2 in...

Page 54: ...owing RTC functions The Dynamic C Function Reference manual describes these functions and the associated data structure tm tm_rd Reads time and date values from the RTC tm_wr Writes time and date values into the RTC The following points apply when using the RTC 1 The AM PM bit is 0 for AM 1 for PM The RTC also has a 24 hour mode 2 Set the year to 96 for 1996 97 for 1997 and so on Constantly readin...

Page 55: ...red conert logical memory to physical memory with phy_adr array For initialized xdata you can pass the array name directly PARAMETERS physical_adr is the absolute data location in the flash EPROM buf is a pointer to the bytes to write count is the number of bytes to write RETURN VALUES 0 if WriteFlash is okay 1 if the program flash EPROM is not in used 2 if physical_addr is inside the BIOS area 3 ...

Page 56: ...rns on the LCD backlight void op71BackLight int isOn Turns the OP7100 backlight on or off PARAMETER isOn turns the OP7100 backlight on or off 1 to turn backlight on 0 to turn backlight off void op71Power int isOn Turns the OP7100 power on or off PARAMETER isOn turns the OP7100 power on or off 1 to turn power on 0 to turn power off void op71SetContrast unsigned level Sets the OP7100 contrast level ...

Page 57: ... these procedures but a set of op71BuffLock and op71BuffUnlock bracketing a set of related graphics calls speeds up the rendering significantly void op71BuffUnlock void Decrements the OP7100 LCD screen locking counter The contents of the LCD buffer are transferred to the LCD if the counter goes to zero void op71SetBrushType int type Sets the drawing method or color of pixels drawn by subsequent gr...

Page 58: ...ust be evenly divisible by 8 top is the top edge of the window cols is the number of columns in the window must be evenly divisible by 8 rows is the number of rows in the window void op71Up1 int left int top int cols int rows Scrolls byte aligned window up one pixel bottom column is filled by current pixel type color PARAMETERS left is the left edge of the window must be evenly divisible by 8 top ...

Page 59: ...RAMETERS left is the left edge of the window must be evenly divisible by 8 top is the top edge of the window 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 negative to scroll left void op71VScroll int left int top int cols int rows int nPix Scrolls byte aligned window up or down right column ...

Page 60: ...nction is like op71XPutBitmap except that it is faster The restriction is that the bitmap must be byte aligned PARAMETERS left is the left edge of the bitmap top is the top edge 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 void op71XGetBitmap int x int y int bmWidth int bmHeight unsigned long xBm Gets a bitmap from th...

Page 61: ... bitmap in pixels xBm is the xmem RAM storage address void op71PlotDot int x int y Draws a single pixel in the LCD buffer and on the LCD if the buffer is unlocked PARAMETERS x y are the coordinates of the dot void op71PlotLine int x0 int y0 int x1 int y1 Draws a line in the LCD buffer and on the LCD if the buffer is unlocked PARAMETERS x0 y0 are the x y coordinates of one endpoint x1 y1 are the x ...

Page 62: ...ots the outline of a polygon in the LCD page buffer and on the LCD if the buffer is unlocked PARAMETERS n is the number of vertices pFirstCoord is a pointer to the array for the vertex with coordinates x1 y1 x2 y2 x3 y3 void op71FillVPolygon int n int pFirstCoord Fills a polygon in the LCD page buffer and on the LCD screen if the buffer is unlocked PARAMETERS n is the number of vertices pFirstCoor...

Page 63: ...aracter s bitmap is column major and is 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 the first printable character in the font does not have to be 0 endChar is the the last printable character in the font xmemBuffer is a pointer to a linear a...

Page 64: ...an 8 bit signed value The actual step increments depend on the height and width of the font being displayed which are multiplied by the step values Use op71SetPfStep to control the x and y printing step direction RETURN The x step is returned in the MSB and the y step is returned in the LSB of the integer result void op71SetPfStep int stepX int stepY Sets the op71Printf printing step direction The...

Page 65: ...rint if they exist in the font but have no effect as control characters Use op71SetPfStep to control or use op71GetPfStep to examine the current x and y printing step direction PARAMETERS x is the x coordinate of the text left edge y is the y coordinate of the text top edge pInfo is a pointer to the font descriptor fmt is a pointer to the format string Keypad Programming The same library used in D...

Page 66: ...glFontInit struct _fontInfo pInfo char pixWidth char pixHeight unsigned startChar unsigned endChar char bitmapBuffer Initializes a font descriptor with the bitmap defined in the root memory For fonts with bitmaps defined in xmem use glXFontInit PARAMETERS pInfo is a pointer to the font descriptor to be initialized pixWidth is the width of each font item pixWidth must be uniform for all items pixHe...

Page 67: ...he font bitmap The bitmap is a column with the major byte aligned void glSetBrushType int type Sets the type of brush type and controls how pixels are drawn on the screen until the next call to glSetBrushType PARAMETER type is the type of the brush The four macros described below have been defined for valid values to pass to the function All four brush types can be used to display text or bitmaps ...

Page 68: ...rst endpoint x2 is the x coordinate of the second endpoint y2 is the y coordinate of the second endpoint void glPrintf int x int y struct _fontInfo pInfo char fmt Prints a formatted string much like printf on the LCD screen PARAMETERS x is the x coordinate of the text left edge y is the y coordinate of the text top edge pInfo is the pointer to the font descriptor used for printing on the LCD scree...

Page 69: ...FirstCoord is an array of vertex coordinates x1 y1 x2 y2 void glFillPolygon int n int x1 int y1 int x2 int y2 Fllls in a polygon 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 void glPutBitmap int x int y int bmWidth int bmHeight char...

Page 70: ...ion PARAMETER changeFn is a pointer to a function that will be called when the driver detects a change when kpScanState is called Two arguments are passed to the callback function The first argument is a pointer to an array that indicates the current state of the keypad The second is a pointer to an array that indicates what keypad positions are changed and detected by kpScanState The byte offset ...

Page 71: ...essed Otherwise kpScanState returns the normalized key number The normalized key number is 8 row col edge 256 edge is 1 if the key is released and 0 if the key is pressed int kpDefGetKey This is the default get key function It returns the key previously pressed i e from the one keypress buffer The key pressed is actually interpreted by kpDefStChgFn which is called back by kpScanState kpDefInit sho...

Page 72: ...se a negative number is returned void sysRoot2FXmem struct _flashInfo pInfo void src unsigned long int dest unsigned integer len Copies memory content from the root memory space to the second flash EPROM mapped to memory space PARAMETERS pInfo is a pointer to struct _flashInfo initialized by sysChk2ndFlash src points to the beginning of the block in root memory to be copied to the second flash EPR...

Page 73: ... libraries in your Dynamic C installation you only have to replace one of these two sets of libraries depending on which set you used when you created your original application You may of course replace all five libraries which will allow you to access the other updated set at a later date Unzip the contents of the compressed file you opened or downloaded into a non Dynamic C folder to see the upd...

Page 74: ...OP7100 74 Software ...

Page 75: ...OP7100 Graphics Programming 75 CHAPTER 5 GRAPHICS PROGRAMMING Chapter 5 provides helpful guidelines for drawing graphics on the OP7100 ...

Page 76: ...ast unsigned level to change contrast The range of level is from 0 to 63 A level of 30 usually yields reasonable contrast at room temperature Drawing Primitives You can draw various objects on the LCD Before doing any drawing specify the type of the brush by calling op71SetBrushType int type Four brush macros are supported GL_SET sets the pixels as specified by the plot commands but leaves other p...

Page 77: ...ircle but paints the circle solid Fill a Polygon void op71FillPolygon int n int x1 int y1 Similar to op71PlotPolygon but paints the polygon solid Note that this function works for polygons with concave angles Draw a Bitmap void op71XPutBitmap 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 Automatically calls...

Page 78: ...e 2 Start fntstrip or fntcvtr 3 Specify the file to convert select the file from the menu List files of type and choose either fnt or bmp Entering fnt or bmp in the File name window will not work The file must be selected after clicking on Font files or Bitmap files in the List files of type window 4 Click the OK button or double click on the file to convert At this point the software asks the des...

Page 79: ...re made you can copy and paste the font as an initialized character array or as an initialized xdata item into your program or library Remember to use either the OP71L LIB landscape image or the OP71P LIB portrait image library in your program Using the Font Bitmap In Your Program The array does not store the dimensions of the font or the bitmap This information is contained in the comments The fo...

Page 80: ...t of each character startChar is the ASCII code of the first character in the font endChar is the ASCII code of the last character in the font and xmemBuffer is a physical address pointing to the font table stored in xmem Rabbit Semiconductor supplies five font sizes for the OP7100 The smallest font engFont6x8 compiles to xmem and each character is 6 pixels wide by 8 pixels high The largest font e...

Page 81: ...ad Activities The function kpDefGetKey returns the interpretation of the state change detected by kpScanState into key activities The means that the kpDefGetKey function must be called no less frequently than kpScanState to ensure no key activity is lost The function kpDefGetKey returns an integer If the integer is 1 no key activity was detected Otherwise bit 0 to bit 3 indicates the index of the ...

Page 82: ...OP7100 82 Graphics Programming ...

Page 83: ...OP7100 Installation 83 CHAPTER 6 INSTALLATION Chapter 6 provides installation and protective grounding guidelines for the OP7100 ...

Page 84: ...through the bezel The recommended way to connect an OP7100 to a building ground is to mount the unit in a metal panel that is already grounded Ensure that the areas around the securing nuts are clean and free from corrosion or other contaminants so that a good electrical connection can be realized Alternatively use a wire with a size of at least 20AWG 0 5 mm2 prefer ably stranded to establish a co...

Page 85: ...resistors 3 Leave at least 8 20 cm distance from electric power lines and even more from high voltage devices 4 When installing the OP7100 near devices with strong electrical or magnetic fields such as solenoids allow a least 3 8 cm more if necessary The OP7100 has strong environmental resistance and high reliability but you can maximize system reliability by avoiding or eliminating the following ...

Page 86: ...d be adjusted to provide theoptimum display quality at the angle from which the display will normally be viewed Bezel Mount Installation This section describes and illustrates how to bezel mount the OP7100 Follow these steps for bezel mount installation 1 Cut mounting holes in the mounting panel in accordance with the recommended dimensions in Figure 6 2 then use the bezel faceplate to mount the O...

Page 87: ...ort the panel allowing water ingress In this case Rabbit Semicon ductor recommends using strengthening brackets between the rear of the panel and the mounting nuts as shown in Figure 6 3 Figure 6 3 Strengthening Bracket General Mounting Recommendations If the OP7100 is mounted inside a panel the enclosure must not be airtight to ensure that the touchscreen will not distorted by differences in air ...

Page 88: ...OP7100 88 Installation ...

Page 89: ...OOTING Appendix A provides procedures for troubleshooting system hardware and software The sections include the following topics Out of the Box Dynamic C Will Not Start Dynamic C Loses Serial Link OP7100 Repeatedly Resets Common Programming Errors ...

Page 90: ...nterrupts on a PC User shells and mouse drivers in particular often interfere with proper COM port operation For example a mouse running on COM1 can preclude running Dynamic C on COM3 Use the supplied Rabbit Semiconductor power supply If another power supply must be used verify that it has enough capacity and filtering to support the OP7100 Use the supplied Rabbit Semiconductor cables The most com...

Page 91: ...rd for programming mode as described in Chapter 2 Getting Started If all else fails connect the serial cable to the OP7100 after power up If the PC s RS 232 port supplies a large current most commonly on portable and industrial PCs some RS 232 level converter ICs go into a nonde structive latch up Connect the RS 232 cable after power up to eliminate this problem Dynamic C Loses Serial Link If the ...

Page 92: ...are ordinal series often begin or terminate with zero not one Confusing a function s definition with an instance of its use in a listing Not ending statements with semicolons Not inserting commas as required in functions parameter lists Leaving out ASCII space character between characters forming a different legal but unwanted operator Confusing similar looking operators such as with with and with...

Page 93: ...OP7100 Specifications 93 APPENDIX B SPECIFICATIONS Appendix B provides comprehensive physical electronic and environ mental specifications for the OP7100 ...

Page 94: ...0 x 240 is 115 17 x 86 37 mm 8 00 203 4 40 8 screws 8x 4 40 4 screws 4x 1 619 typ 41 7 36 187 2 120 typ 54 1 244 31 6 4 763 121 3 76 96 5 984 152 0 125R typ 3 18 0 39 10 2 400 61 3 583 91 3 976 101 4 900 124 5 400 137 0 125R typ 3 18 0 320 typ 8 1 6 299 160 0 433 11 0 6 579 167 4 291 109 0 157 typ 4 0 335 8 5 320 x 240 pixel matrix 115 17 mm x 86 37 mm 4 534 x3 400 0 256 6 5 0 433 max 11 3 976 101...

Page 95: ...ompensation Touchscreen 8 8 matrix 225 touch switches with software in terpolation to 15 15 rated 106 contacts Operating Temperature 0 C to 50 C may be stored at 20 C to 70 C Humidity 5 to 95 noncondensing Power 12 V to 30 V DC 4 5 W with backlight on 1 5 W with backlight off Digital I O Eight CMOS TTL level inputs 2 0 V to 7 0 V Eight CMOS TTL level outputs up to 6 mA per channel Processor Z180 a...

Page 96: ...rs Header Description J1 LCD hard wired J2 Backlight J3 LCD ribbon cable J4 Programming port J5 Touchscreen interface OP7100 only J6 Keypad interface OP7110 only J7 Digital I O J8 RS 232 port header J10 RS 232 port DE9 J11 DC power supply RS 485 port RS485 TERM U1 DANGER HIGH VOLTAGE RS232 J2 J1 LCD JP1 J3 J4 PRGM PORT J7 LCD DIGITAL I O J11 J8 J10 JP4 JP5 J9 JP2 J6 J5 KEYPAD JP3 Figure B 3 OP7100...

Page 97: ...nd 1 2 Software contrast adjustment OP7100 JP2 2 3 Manual contrast adjustment OP7110 1 2 5 6 9 10 11 12 One 5 wire RS 232 one RS 485 1 2 5 6 One 3 wire RS 232 one RS 485 JP3 3 4 7 8 Two 3 wire RS 232 3 4 5 6 RS 485 on J11 2 3 JP4 1 2 7 8 RS 232 on J11 2 3 JP5 1 2 Connect to connect frame ground to power supply ground Connected J4 1 2 Connect to enable program mode disconnect for run mode Not conne...

Page 98: ...OP7100 98 Specifications ...

Page 99: ...OP7100 Memory I O Map and Interrupt Vectors 99 APPENDIX C MEMORY I O MAP AND INTERRUPT VECTORS Appendix C provides detailed information on memory and an I O map The interrupt vectors are also listed ...

Page 100: ...in the input output I O space can be accessed in Dynamic C by the symbolic names listed below These names are treated as unsigned integer constants The Dynamic C library functions inport and outport access the I O registers directly data_value inport CNTLA0 outport CNTLA0 data_value UNITIALIZED DATA USER CODE LIBRARY RAM ROM RAM ROM UNUSED RAM Based ROM Based 0 STACK XMEM 64K UNITIALIZED DATA USER...

Page 101: ...g divide l m 415 Floating square root sqrt q 849 Floating exponent exp q 2503 Floating cosine cos q 3049 Execution Timing The times reported in Table C 1 were measured using Dynamic C and they reflect the use of Dynamic C libraries The time required to fetch the arguments from memory but not to store the result is included in the timings The times are for a 9 216 MHz clock with 0 wait states The e...

Page 102: ...r 0x0C TMDR0L Timer Data Register Channel 0 least 0x0D TMDR0H Timer Data Register Channel 0 most 0x0E RLDR0L Timer Reload Register Channel 0 least 0x0F RLDR0H Timer Reload Register Channel 0 most 0x10 TCR Timer Control Register 0x11 0x13 Reserved 0x14 TMDR1L Timer Data Register Channel 1 least 0x15 TMDR1H Timer Data Register Channel 1 most 0x16 RLDR1L Timer Reload Register Channel 1 least 0x17 RLD...

Page 103: ...Memory Address Register Channel 1 least 0x29 MAR1H DMA Memory Address Register Channel 1 most 0x2A MAR1B DMA Memory Address Register Channel 1 extra bits 0x2B IAR1L DMA I O Address Register Channel 1 least 0x2C IAR1H DMA I O Address Register Channel 1 most 0x2D Reserved 0x2E BCR1L DMA Byte Count Register Channel 1 least 0x2F BCR1H DMA Byte Count Register Channel 1 most 0x30 DSTAT DMA Status Regist...

Page 104: ... 10 minutes 0x4184 HOUR1 D7 D0 hours 0x4185 HOUR10 D7 D0 10 hours 0x4186 DAY1 D7 D0 days 0x4187 DAY10 D7 D0 10 days 0x4188 MONTH1 D7 D0 months 0x4189 MONTH10 D7 D0 10 months 0x418A YEAR1 D7 D0 years 0x418B YEAR10 D7 D0 10 years 0x418C WEEK D7 D0 day of week 0x418D TREGD D7 D0 Register D 0x418E TREGE D7 D0 Register E 0x418F TREGF D7 D0 Register F Epson 72423 Timer Registers 0x4180 0x418F Table C 3 ...

Page 105: ...ess Name Data Bits Description 4000 403F CS1 Chip Select 1 4040 407F CS2 Chip Select 2 4080 40BF CS3 Chip Select 3 40C0 40FF CS4 Chip Select 4 4100 413F COLUMN Chip Select 5 4140 417F I O Chip Select 6 41C0 41FF WDOG D0 Watchdog 8000 FSHWE Flash EPROM write enable A000 INT1 D0 Bit 0 is the power failure state C000 WDO Watchdog output ...

Page 106: ...Port Channel 1 Interrupt Vectors Table C 5 presents a suggested interrupt vector map Most of these interrupt vectors can be altered under program control The addresses are given here in hex relative to the start of the interrupt vector page as determined by the contents of the I register These are the default interrupt vectors set by the boot code in the Dynamic C EPROM To vector an interrupt to a...

Page 107: ...ail_isr interrupt power_fail_isr IRES ITC 1 clear bit 1 of ITC and disable INT1 body of interrupt routine You also need to add the following line to main ISET ITC 1 enables INT1 Interrupt Priorities Table C 6 lists the interrupt priorities Table C 6 Interrupt Priorities Interrupt Priorities Highest Priority Trap illegal instruction NMI nonmaskable interrupt INT 0 maskable interrupts Level 0 three ...

Page 108: ...OP7100 108 Memory I O Map and Interrupt Vectors ...

Page 109: ...OP7100 Serial Interface Board 2 109 APPENDIX D SERIAL INTERFACE BOARD Appendix D provides technical details and baud rate configuration data for Rabbit Semiconductor s Serial Interface Board SIB ...

Page 110: ...s communication baud rate only on the first communication after reset To change baud rates change the COM baud rate reset the target OP7100 which also resets the SIB then select Reset Target from Dynamic C Chapter 2 provides detailed information on connecting the SIB to the OP7100 The SIB receives power and resets from the target OP7100 via the 8 pin connector J1 Therefore do not unplug the SIB fr...

Page 111: ...l Interface Board 2 111 Top View Side View 2 25 57 2 12 0 305 3 60 91 4 0 8 20 1 525 38 7 1 625 41 3 Figure D 1 SIB External Dimensions External Dimensions Figure D 1 illustrates the external dimensions for the SIB ...

Page 112: ...112 Serial Interface Board 2 OP7100 ...

Page 113: ...OP7100 Backup Battery 113 APPENDIX E BACKUP BATTERY ...

Page 114: ...t room temperature in the factory packaging until field installation Take care that the OP7100 is not exposed to extreme temperature humidity and or contaminants such as dust and chemicals To ensure maximum battery shelf life follow proper storage procedures Replacement batteries should be kept sealed in the factory packaging at room temperature until installation Protection against environmental ...

Page 115: ...e batterie du même type ou d un type équivalent recommandé par le fabricant Mettez au rebut les batteries usagées conformément aux instructions du fabricant Cuidado Spanish Peligro de explosión si la pila es instalada incorrectamente Reemplace solamente con una similar o de tipo equivalente a la que el fabricante recomienda Deshagase de las pilas usadas de acuerdo con las instrucciones del fabrica...

Page 116: ...OP7100 116 Backup Battery ...

Page 117: ...ve blue with white characters 31 positive white with blue characters 31 backlight 13 backup battery 26 29 cautions 114 replacing 114 battery backed RAM 13 baud rates 36 49 50 bezel dimensions 94 bitmap conversion 78 block diagram internal power regulators 25 keypad interface 34 LCD 30 OP7100 subsystems 24 serial channels 36 Z180 Serial Channel 0 43 board layout 12 buffer receive 38 39 transmit 38 ...

Page 118: ... 22 E EEPROM 24 constants 106 reserved addresses 24 simulated in flash EPROM 24 EFR 46 EFR bit 46 electrostatic precautions 84 Epson 72423 real time clock 54 execution times 101 F FE 46 47 features 13 fill a circle 77 fill a polygon 77 float use 92 fntcvtr exe 78 fntstrip exe 78 font and bitmap conversion 78 sample program 78 using in program 79 framing error 46 frequency LCD controller 24 system ...

Page 119: ...4 46 106 interrupt vectors 44 106 default 106 power failure 26 107 priorities 107 serial communication 38 J jumper settings 97 contrast control 31 97 frame ground 85 97 J4 21 97 J9 41 97 JP1 31 97 JP2 31 97 JP3 36 97 JP4 37 97 JP5 85 97 LCD background 31 97 program run mode 21 97 programming via Serial Port 0 21 RS 485terminationresistors 40 97 serial communication 36 37 97 K keypad interface 34 k...

Page 120: ...iprocessor mode 47 49 N network RS 485 40 NO_CARRIER message 39 null modem 39 O OP7100 demonstration 19 models 13 setup 18 output RS 232 38 overrun 46 overrun error 46 OVRN 46 47 P parity 49 parity error 46 parity even odd 49 PE 46 47 PEO 49 PFI 26 28 107 pinout digital I O 35 plot a circle 77 plot a line 77 plot a pixel 76 plot a polygon 77 ports serial 38 42 44 asynchronous 43 multiprocessor com...

Page 121: ...rial Channel 0 block diagram 43 Serial Channel 1 43 serial communication 13 36 40 42 45 47 48 50 102 Serial Interface Board See SIB serial link wiring 39 serial ports 38 42 44 asynchronous 43 multiprocessor communications feature 43 SIB 21 110 baud rate 110 dimensions 111 PC connections 110 power 110 program mode 110 run mode 110 software 14 52 backlight on off 56 66 buzzer on off 57 66 contrast c...

Page 122: ...p71FontChar 63 op71GetBrushType 57 op71GetPfStep 64 op71HScroll 59 op71Init 56 op71Left1 58 op71PlotCircle 62 77 op71PlotDot 61 76 op71PlotLine 61 77 op71PlotPolygon 62 77 op71PlotVPolygon 62 op71Power 56 op71Printf 65 80 op71PutFont 64 op71Right1 58 op71SetBrushType 57 76 op71SetBrushType macros 76 op71SetContrast 56 op71SetPfStep 64 op71VScroll 59 op71XFontInit 63 80 op71XGetBitmap 60 op71XGetFa...

Page 123: ... buffer 38 39 transmitter data register 45 empty 45 transmitter enable 47 transmitter interrupt 44 transmitter interrupt enable 45 troubleshooting cables 90 COM port 90 91 communication mode 91 grounds 90 operating mode 91 power supply 90 repeated resets 91 TX line 39 V VBAT 29 VEE 25 VMIN 28 VRAM 29 W watchdog timer 13 26 28 wderror 28 Z Z180 internal I O registers 102 Serial Port 1 106 ...

Page 124: ...OP7100 124 Index ...

Page 125: ...OP7100 Schematics SCHEMATICS 090 0071 OP7100 Schematic www rabbit com documentation schemat 090 0071 pdf You may use the URL information provided above to access the latest schematic directly ...

Page 126: ...XX0000 Schematics ...

Reviews: