EA IC1520 17.4.98 HIGH-LEVEL GRAPHICSCONTROLLER FOR DISPLAYS WITH SED 1520 PLCC44J FEATURES * FOR LC-GRAPHICS DISPLAYS WITH SED 1520 i.E. 122x32, 120x32, 98x32 * NO TIMING PROBLEMS WITH FAST BUS SYSTEMS * PROGRAMMING BY MEANS OF COMMANDS SIMILAR TO HIGH-LEVEL LANGUAGE: * STRAIGHT LINE, POINT, AREA, AND/OR/EXOR, BAR GRAPH... * 3 DIFFERENT FONTS BUILT IN * ZOOM FUNCTION FOR ALL FONTS (2X, 3X AND 4X) * 8 FREELY DEFINABLE CHARACTERS * MIXING TEXT AND GRAPHICS * INPUT ON RS-232 / CMOS-LEVEL * DIRECT CONNECTION TO MAX232 OR EQUIVALENT * BAUDRATES 1200, 2400, 9600 OR 19200 BAUD * DOES NOT SLOW DOWN CPU PERFORMANCE * NEEDS ONLY MAX. 4 EXTERNAL COMPONENTS * 8 DIGITAL I/O-PORTS FREELY AVAILABLE FOR CUSTOM DESIGNS ORDERING INFORMATION LOW-COST HIGH-LEVEL GRAPHCONTR. FOR SED1520 HIGH-LEVEL GRAPHICS CONTROLLER FOR SED1520 MATCHING GRAPHICS DISPLAY WITH 120x32 DOTS CERAMIC RESONATOR SMD 7,37 MHZ, 3 PIN INCL. CS COMPLETE GRAPHICS UNIT 120x32 WITH IC1520-1PGH EA IC1520-1PGH EA IC1520-2PGH EA P120-5NLED EA KERS7M37-C EA GE120-5NV24 LOCHHAMER SCHLAG 17* D- 82 166 GRAFELFING PHONE +49-89-8 54 19 91 * FAX +49-89-8 54 17 21 EA IC1520 GENERAL The EA IC1520 High-Level Graphics Controller bonds your system processor to your graphic display. Inputs accept a serial asynchronous RS-232 interface. The graphic controller includes complete graph routines to display and various character sizes. Programming is made by high level programming language graph commands; time consuming programming of character sets and graph routines is not necessary anymore. Expenditure for developing of your product is reduced significant and several features are gained on top of it: - no timing problems with fast processor bus - enough memory space (operating memory and characterset memory especially for C) - no time consuming graphic calculations which would slow down processor speed Connecting to hardware is very simple. Display and main processor are connected directly. Drivers, decoders or port modules are not required. A simple display input need 1 wire (RxD) only. 2 up to maximum 4 external components will complete the circuit: a quartz with 2 capacitors and a resetcapacitor. No external components are needed when you operate with 8051-compatible systems. Clock and reset signal can be taken from main processor. We have two different versions available. Graphics Controller EA IC1520-1 represents the base model. Version EA IC1520-2 features an additional big sized font (page 7) and additional commands like Bargraph 'B', Hardcopy 'H' and more (see page 8). HARDWARE Supply voltage of system is +5 Volts. Data transfer is asynchronous serial in RS-232 format at CMOS level. Data format is 8 data bits, 1 stop bit and no parity. Baud rate can be selected on 3 pins from 150 Baud on up to 115200 Baud. Handshake lines RTS and CTS on board too. Data format: Additional 8 I/O-ports are available for freely usage. This may be wired as inputs or outputs *) on individual desire. Possible applications are switching of backpanel illumination or reading in several keys. SOFTWARE Programming of this High-Level Graphics Controller is performed by commands like i.e. "plot a rectangular box from (0,0) to (64,15) which origins in top left hand corner of display". Therefore the serial interface has to transmit this sequence of bytes: $52 $00 $00 $40 $0F. Character strings can be placed exactly to the pixel. Mixing of graphic images with text elements is possible anytime. Three different character sets are available where each of them can be zoomed 2x, 3x and 4x. The biggest character set 8x16 allows when using 2x zoom (=16x32) a totally filled display with letters and numbers. TESTMODE *) As long as pin 9 (RTS) is after Power-On or after Reset connected with GND, the graphics controller is in test mode. Display shows now a marked flashing box. When connection Pin 9 (RTS) to GND is removed, the graphics controller returns to normal operation mode. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 2 EA IC1520 Symbol Parameter Valid for Condition Min Max Units 4 6 V VDD Power Supply VDD 11,059 MHz ICC Power Supply Current VDD, Controller is busy 11,059 MHz 25 mA ICC Power Supply Current VDD, Controller is ready 11,059 MHz 6.5 mA ICPS Power Supply Current Power-Save-Mode VDD VDD=6V VDD=3V 100 40 A A -0.5 0.2*VDD-0.1 V 0.2*VDD+ VDD+0.5 V 0.7*VDD VDD+0.5 V IOL=3.2mA 0.45V V VIN=0.45V -50 A VIN=2V -650 A 0.45HIGH; n1=2: Power save graphics controller RTS->HIGH; display sleep mode Send commands Hardcopy H x1 Read I/O port X n1 Query display type ? 8 y1 x2 y2 An area is requested as a picture. The width and height are sent in pixels first of all, followed by the actual picture data, via RS232. n1=0..7: load I/O port (1=H level=5V, 0=L level=0V) n1=8: load all 8 I/O ports I/O0..I/O7 as 8-bit binary value This command is used to query the display type. 3 bytes are sent back: X resolution, Y resol., 'H' (e.g. 240, 64 (pixels), horizontal picture) EA IC1520 PARAMETERS Various built in commands can be used to program this High-Level Graphics Controller. Each command starts with a command letter which is followed by a number of parameters. All commands with parameters, coordinates and other hand over datas are expected in form of Bytes. No space characters are allowed, i.e. no space bars, no commas. End of command does not need a closing byte such as a Carrige Return. A...Z, L/R/O/U ................................. All commands are transmitted as ASCII code. Example: G = 71 (dec.) = $47 initiates the straight line drawing command. x1, x2, y1, y2 ................................... Coordinates are transmitted with one byte. True values are from 0..122 for x- resp. 0..31 for y- coordinates. Example: x1= 10 (dec.) = $0A n1,n2,nr,aw,ew,value,ptn,data ....... Parameters with numbers are transmitted with one byte. Example: n1= 15 (dec.) = $0F EXAMPLE OF PROGRAMMING Below table shows the character string "Test" which is displayed at coordinates 7,3. Example Codes Z $5A 90 ASCII Hex Decimal Turbo-Pascal C Q-Basic BEL ETX $07 7 $03 3 T $54 84 e $65 101 s $73 115 t $74 116 NUL $00 0 write(aux, 'Z', chr(7), chr(3), 'Test', chr(0)); fprintf(stdaux, "%c%c%c%s%c", 'Z', 7, 3, "Test", 0); OPEN "COM1:1200,N,8,2,BIN" FOR RANDOM AS #1 PRINT #1,"Z"+CHR$(7)+CHR$(3)+"Test"+CHR$(0) PATTERN Several commands allow setting of pattern type parameters (ptn = 0..7). They will link and display rectangular areas, bargraphs and even text lines with various pattern. This pattern are available: ptn=0 white ptn=1 black ptn=2 25% black ptn=3 50% black ptn=4 75% black ptn=5 45 right ptn=6 45 left ptn=7 45cross hatch 9 EA IC1520 DESCRIPTION OF INDIVIDUAL GRAPHICS FUNCTIONS Coming pages show detailed descriptions in alphabetical order for each individual function. Examples are shown as hardcopy in an enlarged window of 50 x 32 pixel once the command has been executed. Examples show transfered Bytes all in Hex codes. A x1 y1 n1 Set ASCII-Character A character n1 will be displayed on coordinates x1,y1 with preset font 'F' and text mode 'T' (set / delete / invert / replace / invers replace / pattern). Origin is (0,0) at top left hand corner of display. Datas for coordinates apply also to top left hand corner of a given character. Note: Font No.1 shows capital letters only. Example: $41 $13 $02 $45 Character 'E' will be displayed at coordinates 19,2 Preset font: 6x8, with double width and double height Text mode: Replace and black pattern B L/R/O/U nr x1 y1 x2 y2 Define Bargraph*) aw ew ptn Up to 8 bargraphs (nr=1..8) can be defined, which may oscillate to L=left, R=right, O=top or U=bottom direction. Bargraph full level range coordinates are described from x1,y1 to x2,y2. Scaling of bargraph is performed by starting zero position aw (=0..254) and max. ending position (full size) ew (=0..254). Bargraph always is displayed in inverse-mode using the ptn-pattern type: the background remains preserved in any case. (Note: executing this command only the bargraph range is defined but nothing is visible on display). Example: $42 $4F $01 $04 $02 $09 $1E $04 $14 $01 Defines bargraph no. 1 which oscillates vertical up to top. At full level its coordinates ranges from 4,2 to 9,30. Displayed start- and end- values represent a current value of 4..20 mA. (Hardcopy shows bargraph at its full level operating at $42 $01 $14) B nr value Draw Bargraph *) Bargraph number n1 (1..8) will be adjusted to a new value (aw <= value <= ew). If wert > ew, than final value will be displayed. Bargraph must be defined before, see above example. Example: $42 $01 $0A Above defined bargraph no. 1 is set now to value 10. C Display Control*) n1 Switches display On (n1=1) or Off (n1=0); all display datas remains preserved and commands can be executed furthermore. Example: $43 $00 Content of display becomes invisible, but remains preserved. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 10 EA IC1520 D L/I/S Display Command Total content of display will be: L=deleted (white), I=inverted or S=filled (black) Example: $44 $49 inverts total content of display. E n1 daten Define Characters Up to 8 characters can be defined by yourself. This characters have ASCII codes from 1 to 8 and remain stored until the supply voltage is switched off. Attention! For a given ASCII-Code-No. only one font size can be defined. Example 1: BYTE NR. 1 2 3 4 5 6 Command $45 $03 $04 $02 $7F $02 $04 $00 defines a top pointing arrow with ASCII-No. 3 and with a preset 6x8 character set. Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Example 2: Command $45 $02 $00 $00 $00 $FF $00 $00 $00 $00 $04 $08 $10 $3F $10 $08 $04 $00 BYTE NR. 1 2 3 4 5 6 7 8 Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 defines a down pointing arrow with ASCII-No. 2 and with a preset 8x16 character set. F 9 10 11 12 13 14 15 16 BYTE NR. n1 n2 n3 Set Font Font No. n1 (1=4x6 capital letters only; 2=6x8; 3=8x16*)) is choosed. Different zoom factors (1..4x) for width n2 and for height n3 are selected. Example: $46 $02 $03 $04 6x8- font is now set to 3-x width and to 4-x height. Beside hardcopy shows letter 'E' from font 6x8 in different sizes. G x1 y1 x2 y2 Draw straight line Straight line is drawn from coordinates x1,y1 to x2,y2 taking into account the preset graph mode 'V' (set / clear / invert). Example: $47 $03 $14 $28 $06 Draws a straight line from 3,20 to 50,6. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 11 EA IC1520 H Get Hardcopy from Display *) x1 y1 x2 y2 Range from top left hand corner x1,y1 to right hand bottom corner x2,y2 is requested. Graphic chip transmits first width and height of requested display-section and afterwards the datas of display-content. See command Image Upload 'U' for building up display datas. Example: $48 $00 $00 $1F $0F top left hand section of display-content (size 32 x 16 pixel) will be sent via RS-232 immediately. I x1 y1 x2 y2 Invert Range The area from top left hand corner x1,y1 to right hand bottom corner x2,y2 will be inverted (black pixel turns to white and vice versa). Example: $49 $00 $00 $17 $1B inverts display-content of example "Set Font" in range from 0,0 to 23,27. J x1 y1 x2 y2 Draw a rounded corner box*) ptn A rectangular box with rounded corners is drawn from top left hand corner x1,y1 to right hand bottom corner x2,y2 and filled with pattern ptn and delete background. See also 'N' draw rectangular with rounded corner. Example: $4A $07 $03 $23 $16 $03 draws a rounded corner box from 7,3 to 35,22 filled with pattern 3=50% black. K n1 Adjust contrast of display A charging pump can be built up by using the clock signal CLK (Pin 14). Varying the pulse ratio n1 (0..20) will change the negative contrast voltage within certain limits. Example: $4B $14 Sets contrast to maximum value = 20 (clock signal on CLK pin is set to 50% ratio). L x1 y1 x2 y2 Clear a specific display area Area from top left hand corner x1,y1 up to bottom right hand corner x2,y2 will be cleared. Example: $44 $4C $53 $06 $04 $28 $19 Display is filled first with 'D', 'S' followed by clearing the area from 6,4 to 40,25. M x1 y1 x2 y2 ptn Fill an area with pattern A rectangular area starting from top left hand corner x1,y1 up to bottom right hand corner x2,y2 is filled with pattern ptn according to preset graphic mode 'V' (set / clear / inverse / replace / inverse replace). Example: $4D $05 $01 $2D $1A $07 draws a cross hatch pattern 7=45 from 5,1 to 45,26. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 12 EA IC1520 N Draw rectangular with rounded corners*) x1 y1 x2 y2 Draw a rectangular with rounded corners from top left hand corner x1,y1 up to bottom right hand corner x2,y2 honoring preset graphic mode 'V' (set / clear / inverse). Content of box remains unchanged. See also drawing box with rounded corners 'J' . Example: $4E $06 $02 $26 $13 draws a box with rounded corners from coordinates 6,2 up to coordinates 38,19. O x1 y1 x2 y2 ptn Draw Box A rectangular box is drawn from top left hand corner x1,y1 up to bottom right hand corner x2,y2 filled with pattern ptn. Background of box will be cleared. Consult also 'R' = draw rectangular. Example: $4F $02 $05 $12 $1E $02 draws a box from coordinates 2,5 up to coordinates 18,30 with pattern 2= 25% black. P x1 y1 Place a Dot A single dot will be placed at coordinates x1, y1 honoring preset graphic mode 'V' (set / clear / inverse). Example: $50 $0D $11 places a single Pixel at coordinates 17,13. Q Power Save Mode*) n1 Example: $51 $01 switches our High-Level Graphic Controller into Power-Save-Mode. Handshake line RTS shows H- level which means that no more commands will be accepted. Supply voltage may be reduced now down to 2 Volts. Applying a wide pulse of >10 msec onto reset pin will awake the controller. Contents of registers remains unchanged, see table on page 3. R x1 y1 x2 y2 Draw Rectangular A rectangular is drawn from top left hand corner x1,y1 up to right hand bottom corner x2,y2 honoring the preset graphic mode 'V' (set / clear / inverse). Contents of rectangular box remains unchanged. See also 'O' = draw box. Example: $52 $15 $08 $30 $25 draws a rectangular from coordinates 21,8 up to coordinates 48,37. S x1 y1 x2 y2 Fill an area An area from top left hand corner x1,y1 up to right hand bottom corner x2,y2 will be filled with black pixels. Example: $53 $09 $05 $16 $16 fills an area from coordinates 9,5 to coordinates 22,22 with black pixels. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 13 EA IC1520 T L/R/O/U n1 ptn Set Text-Mode Sets the overlay combination mode n1 and pattern ptn for the commands 'A' and character string 'Z'. For display a character chain (command 'Z') the typing-direction *) must be set by: L=to left, R=to right, O=to top and U=to bottom. Example: $54 $52 $03 $03 Initiates the overlay combination mode for text functions with grey characters (pattern 3 = 50% black), inverts the background and writes character chains from left to right. Overlay combination mode n1: 1 = set: black Pixel without regarding previous parameter (OR) 2 = delete: white Pixel without regarding previous parameter 3 = invert: black Pixel turns to white Pixel and vice versa (EXOR) 4 = replace: clear background and set black colored Pixel 5 = invers replace: fill background and place white colored Pixel U x1 y1 data Image Upload An image will be loaded at coordinates x1,y1 data: - 1 Byte for width of image in Pixel - 1 Byte for height of image in Pixel - Image datas: Qty = ((height+7) / 8) * width Bytes. 1 Byte equals 8 vertical Pixel on screen; 0=white, 1=black; LSB: top, MSB: bottom; Image builts up from left hand to right hand. Programme BMP2BLV.EXE generates out of monochrome Windows-BitmapGraphics the datas for our Image inclusively width- and height informations. Example: $55 $09 $04 $0C $0C $F0 $FC $FE $FE $F7 $BF $BF $F7 $FE $FE $FC $F0 $00 $03 $07 $06 $0D $0D $0D $0D $06 $07 $03 $00 BYTE NR. 1 2 3 4 5 6 7 8 9 10 11 12 Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 13 14 15 16 17 18 19 20 21 22 23 24 BYTE NR. loads beside shown image at coordinates 9,4. V n1 Set Graphics-Mode Set overlay combination mode n1 i.e. for following graph-functions: set dot 'P', draw straight line 'G', continue drawing straight line 'W', draw rectangular 'R', draw rectangular with rounded corners 'N', fill area with pattern 'M'. Example: $56 $03 sets overlay combination mode to inverse. Beside example illustrates drawing of a rectangular in overlay combination modes set, clear and inverse on existing background. Link-mode n1: 1 = set: black Pixel without considering previous parameter (OR) 2 = delete: white Pixel without regarding previous parameter 3 = invert: black Pixel turns to white Pixel and vice versa (EXOR) 4 = replace: clear background and set Pixels inside area of filling pattern 'M' 5 = invers replace: fill background, delete Pixels from area with filling pattern 'M'. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 14 EA IC1520 W x1 Continue a straight line y1 Draws a straight line from last drawn line end resp. (see page 3: Last xy) to x1,y1 under considering the Graphic Mode 'V' (set / clear / inverse). Example: $47 $57 $57 $00 $16 $30 $00 $1B $0F $10 $04 Draws first a straight line from 0,0 to 16,4; then continuing from 22,27 to 48,15. X Read I/O Port *) n1 Reads in Port (n1: 0..7 = I/O: 0..7). When n1 = 8, all I/O 0..7 are read in binary; I/O 0: LSB, I/O 7: MSB. See application on page 6. Example: $58 $02 reads in signal at I/O 2 and transmits L-level a $00 resp. H-level a $01 via RS-232 Y n1 n2 Set I/O Port Changes port value (n1: 0..7 = I/O: 0..7) into value n2 (0=L-level; 1=H-level; 2=invert port level). When n1=8, all I/O 0..7 will be transfered as binary value n2; I/O 0: LSB, I/O 7: MSB. See application on page 6. Example: $59 $02 $01 sets port I/O 2 to H-level Z x1 y1 ASCII... NUL Write a character string Writes a character string ASCII.... beginning from coordinate x1,y1 honoring preset mode 'T' (set / clear / inverse / replace / inverse replace / fill/ direction). Character strings must be terminated with NUL ($00). Origin (0,0) starts in top left hand corner of display. Datas of coordinates refer to top left hand corner of character. Note: Font Nr. 1 has capital letters only. Example: $5A $06 $0B $54 $65 $73 $74 $00 writes character string "Test" starting at coordinate 6,11, Font: 8x16 with normal height and width. Text mode: Writing direction is from right hand, Overlay combination mode is replace with pattern black. ! n1 n2 Set Display This command allows setting of display- width which is not programmable by DTYP0/1 (see page 5). Width of left half of display is set with n2. Height of display is fixed programmed with 32 pixel. Example: $21 $64 $32 sets display 100 pixel wide divided into two logical halfs with a resolution of 50 pixel each. Show Type of Display*) ? Resolution of display and type of image structure is sent via RS-232. Example: $3F This command transmits first the x- and y-resolution and then follows the type of image structure ('V' for vertical organization) via RS-232 interface. *) This function is available only with High-Level-Graphics Controller EA IC1520-2. 15 EA IC1520 DIMENSIONS OF EA IC1520-xxx Housing: PLCC44J; sizes in Inches (mm) ATTENTION handling precautions! EA GE120-5NV24 GRAPHICS UNIT 120x32, 2 FONTS, RS-232 Graphics unit EA GE120-5NV24 is based on High-Level-Graphics-Controller EA IC1520-1PGH. This graphics unit operates either on true RS-232C level (10V) or on CMOS-level. Dimensions Display Supply Voltage Terminals Operating Temperature Storage Temperature * * * * * 68 x 39 x 11 mm 120x32, Supertwist, LED- Backlight +5V / 100 mA 10 Pins, Grid 2,54 mm 0 ... +70C -20 ... +70C 120x32 dots SUPERTWIST-LCD WITH GREENLED- ILLUMINATION 2 FONTS from 3,2mm (5x30 characters) to 4,6mm (4x20) up to 18,2 mm (1x5) DRAW STRAIGHT LINES, INVERT OR CLEAR AREAS SUPPLY VOLTAGE: +5V / typ. 100mA BAUDRATES 1200, 2400, 4800, 9600,19200BD Ordering Information Graphics unit 120x32 with LED-backlight EA GE120-5NV24 Cable with 9-pin D-SUB plug (female) EA KV24-9B LOCHHAMER SCHLAG 17 * D- 82166 GRAFELFING PHONE +49-89-8 54 19 91 * FAX +49-89-8 54 17 21