V10828 - RS Components International
Transcription
V10828 - RS Components International
Issued / Herausgegeben / Publication / Pubblicato V10828 06/1999 Graphic LCD module controller LCD-Grafikmodulcontroller Instruction Leaflet Bedienungsanleitung Feuille d’instructions Foglio d’instruzioni Contrôleur du module d’écran à cristaux liquides Controller del modulo LCD grafico Figures / Abbildung / Figura RS Stock No. 329-0391, 329-0408, 329-0414, 329-0436 1 Graphic LCD module controller J2 A K The liquid crystal display module controller is designed around a high performance AT89C2051 8-bit microcomputer. The controller can drive most LCD graphic panels that use the Toshiba T6963 controller. It also incorporates a DC-DC convertor to produce the negative LCD bias required by some modules. J1 Connections T2 T1 J5 J4 1 +5v 0v J3 1 J1 J2 J3 J4 J5 20 pin DIL LCD connector 2 pin SIL LED backlight connector 9 way D-type female data communication connector Power connector LCD connector patch panel A Adjustments LK1 T1 T2 Layout diagram A. Micro controller Schéma d’aménagement A. Micro-contrôleur LCD contrast adjustment LED back light current Electrical Characteristics Parameter Condition Logic Supply Current No module connected Vdd=5volts LED Supply Current depends on LED backlight and Geräteanordnung A. Mikrocontroller Schema A. Micro controller Min Max ~30mA ~30mA ~650mA adjustment setting (Vdd=5volts) Connection to PC or other The host computer should send serial data in the following format 8 data bits, 1 start bit, 1 stop bit, no parity. The LCD controller accepts data at a baud rate of 9600 or 19200. The first character sent by the host computer after applying power to the LCD controller must be an ASCII space character. ie 32 decimal. The LCD controller uses this character to adjust and set the correct speed. Connection to LCD module LCD modules can be connected to the controller using either the single or dual in line connector. The trimmer T1 should be adjusted to optimise the contrast of the LCD display. V10828 Command Protocol Table Command Parameters Function hex ASCII 03H ^C x where 0<x<2 Clear Screen The command parameter should be sent as one ASCII digit, where: x = 0 Clear the character LCD screen & reset cursor to home. x = 1 Clear the graphic LCD screen. x = 2 Clear the character, graphic LCD screen & reset cursor to home. ie. To clear the graphics screen only, “^C1” (03h,31h) should be sent. 12H ^R none Reset the LCD module This command must be sent after a module type is set. The module type “set” will not be active until a reset is performed. 0EH ^N mm nn z1 ..znnnn where 0<m<255 0<n<255 0<z<255 Graphics Fill This command allows the graphics screen to be filled with data. mm defines the start address in binary (0000h being the top left corner of the display. nn defines the number of bytes in binary to be sent and displayed. z binary data. ie. To display a horizontal line 20 pixels wide beginning in the top left hand corner the following should be sent. (0Eh, 00h, 00h, 00h, 03h, FFh, FFh, F0h) 2 0CH ^L x where 0<x<7 Set Module Type The command parameter defining the module type should be sent as one ASCII digit, where: x = 0 Type 0 - 128 by 64 pixels or 16 by 8 chars (8 * 8 matrix) x = 1 Type 1 - 128 by 64 pixels or 21 by 8 chars (6 * 8 matrix) x = 2 Type 2 - 128 by 128 pixels or 16 by 16 chars (8 * 8 matrix) x = 3 Type 3 - 128 by 128 pixels or 21 by 16 chars (6 * 8 matrix) x = 4 Type 4 - 240 by 64 pixels or 30 by 8 chars (8 * 8 matrix) x = 5 Type 5 - 240 by 64 pixels or 40 by 8 chars (6 * 8 matrix) x = 6 Type 6 - 240 by 128 pixels or 30 by 16 chars (8 * 8 matrix) x = 7 Type 7 - 240 by 128 pixels or 40 by 16 chars (6 * 8 matrix) ie. To set the module to type 1 “^L0” (0Ch, 30h) should be sent. 13H ^S none CR/LF No additional parameters required. The command makes character cursor perform a carriage return / linefeed. The cursor wraps back round to the top when the bottom of the screen is reached. 10H ^P yyxx where 1<yy<nn 1<xx<nn Set Cursor Set cursor to point to a line number and character position. The command parameters defining the cursor position should be sent as four ASCII digits, where: yy = character row position in ASCII. xx = character column position in ASCII. ie. To position the cursor at the start of line 3 on a 8*30 module, “^P0301” (10h, 30h, 33h, 30h, 31h) should be sent. V10828 01H ^A x where x=0 or 1 Switch LCD module cursor on/off. The command parameter defining the cursor status should be sent as one ASCII digit, where: x = 0 cursor off. x = 1 cursor on. ie. To turn the cursor on “^A1” (01h,31h) should be sent. 02H ^B x where x=0 or 1 Switch LED back light on/off. The command parameter defining the back light status should be sent as one ASCII digit, where: x = 0 backlight off. x = 1 backlight on. ie.To turn the module light on “^B1” (02h, 31h) should be sent. 04H ^D xxxx... where 32<x<255 Display Text sent as ASCII Following this command all ASCII data sent will be sequentially stored in the LCD controller memory at the specified cursor position and displayed. ASCII data with a value of less than 32 decimal will either be interpreted as a command if appropriate or ignored. ASCII codes 080h to 0FFh will display the user definable characters. ie. To display hello “^Dhello” (04h, 68h, 65h, 6Ch, 6Ch, 6Fh) should be sent. 06H ^F mz1....z8 where 128<m<255 0<z<255 User Defined Characters. (8 * 8 pixel format) Following this command all nine parameters must be sent. The character id parameter “m” should be a binary number between 128 to 255. This will dictate where the character is stored in the user definable table. The character pixel data “z 1..z8” should be sent as binary numbers between 0 to 255. The data bits 0 to 7 in each “z” value represent the pixel make up of 1 line of the character. The order being line 1 to line 8 ie. To create a new “ “ character in position 129: (06h, 11h, FFh, 81H, 81H, 81H, 81H, 81H, 81H, FFh) should be sent. 18H ^X none Status The command causes the software release and board indent to be returned as an ASCII string. Notes on command protocol 1. 2. 3. 4. The examples in the above table show the binary data that must be sent to the controller. If appropriate the ASCII sequences are also shown. The “^” in the above table indicates that a control character has to be sent. If a 6 by 8 font is selected in hardware, then the two most significant bits in the data words used to define characters and write graphics are ignored. The default module type on power is, type 0. Example, assuming that a 240 * 64 module using a 8 by 8 pixel font is connected In order to write the words “Hello World” on line 3 from a fresh power up the following sequence is required. Note: the delimiters “ ” must not be sent 1. 2. 3. 4. 5. 6. 7. Make all necessary connections and apply power to the unit. Send 1 space character “20h” to set controller baud rate. Set the module type. Reset to implement module type set. Clear character and graphic screen. Set cursor to the start of line 3. Display “Hello World” ““ “^L0” “^R” “^C2” “^P0301” “^DHello World” In binary the following bytes should be sent: 20h 0Ch 30h 12h 03H 32h 10h 30H 33h 30h 31h 04h 48h 68h 65h 6Ch 6Ch 6Fh 20h 57h 6Fh 72h 6Ch 64h 3 V10828 Connections 4. J4 - Power connector pin assignments - solder 5. pads 6. Pin 1 2 Assignment Vdd Vss Function logic +5 volts logic 0 volts Do not remove any attached LCD module while power is applied to the unit Anti static precautions must be taken, the controller and LCD modules contain CMOS LSI. You may not reverse engineer, de-compile, or disassemble the embedded software. Connection to a module The table below details suitable display inter-connection cables for Powertip graphics modules. J3 - Serial data connector pin assignments female 9 way D connector Pin 1 2 3 4 5 6 7 8 9 Assignment n/u Dout Rxin n/u Gnd n/u n/u n/u Power Function not used Serial data out of controller Serial data into controller not used Data reference ground not used not used not used optional power input (requires link LK1) Powertip Display Format 128 * 64 128 * 128 240 * 64 240 * 128 RS Stock No. 329-0408 329-0414 329-0414 329-0436 Additional wiring will be required to drive the LED backlight. RS Components shall not be liable for any liability or loss of any nature (howsoever caused and whether or not due to RS Components’negligence) which may result from the use of any information provided in RS technical literature. RS Best-Nr. J1 - LCD module connector pin assignments - 20 pin Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Assignment Fgnd Vss Vdd Vlcd /WR /RD /CE C/D MBn /RESET DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 FS LED Function Frame gnd (tied to logic 0 volts) Logic 0 volts Logic 5 volts & LED backlight +ve (A) connection LCD contrast adjustment voltage Data write strobe Data read strobe Chip enable Command(H) / Data(L) select line Column select T6963 LCD Controller reset Data Bus I/O bit 0 Data Bus I/O bit 1 Data Bus I/O bit 2 Data Bus I/O bit 3 Data Bus I/O bit 4 Data Bus I/O bit 5 Data Bus I/O bit 6 Data Bus I/O bit 7 Front select LED backlight - ve (K) connection J2 - LED backlight connector pin assignments solder pads Pin A K Assignment Function Vdd logic +5 volts Vss Switched negative supply General notes 1. 2. 3. 4 If the LED backlight driver is being used the trimmer (T2) should be turned fully anticlockwise to reduce the current to zero before applying power. The trimmer should then be adjusted to supply the appropriate current to the backlight. The onboard LCD negative bias trimmer (T1) should be used to optimise the display contrast of any attached LCD module. Reverse polarity connection will cause irreparable damage to the controller and attached LCD module. 329-0391, 329-0408, 329-0414, 329-0436 LCD-Grafikmodulcontroller Dieser Controller für Flüssigkristallanzeigemodule ist für einen leistungsfähigen 8-Bit-Mikrocomputer AT89C2051 ausgelegt. Der Controller kann die meisten LCD-Grafikanzeigen steuern, die einen Toshiba T6963-Controller verwenden. Er enthält außerdem einen Gleichstromwandler, der die von einigen Modellen geforderte negative LCD-Spannung erzeugt. Anschlüsse J1 J2 J3 J4 J5 20 Pin DIL-LCD-Steckverbinder 2 Pin SIL stecker für Hintergrundbeleuchtung 9-polige Buchse Typ D für Datenkommunikation Netzsteckverbindung LCD-Steckerfeld Einstellungen T1 LCD-Kontrasteinstellung T2 LED-Hintergrundbeleuchtungsstrom Elektrische Daten Parameter Stromzufuhr Logik Zustand Kein Modul angeschlossen Vdd=5V mind. max. ~30mA LED-Zufuhr Strom hängt von LED-Hintergrundbeleuchtung undEinstellung ab (Vdd=5V) ~30mA ~650mA Anschluß an PC oder andere Geräte Der Hostcomputer muß serielle Daten in folgendem Format senden: 8 Datenbits, 1 Startbit, 1 Stopbit, keine Parität. Der LCD-Controller akzeptiert Daten in einer Baudrate von 9.600 oder 19.200. Das erste Zeichen, das vom Hostcomputer nach dem Einschalten des LCDControllers gesendet wird, muß ein ASCII-Leerzeichen sein, d.h. Dezimal 32. Der LCD-Controller verwendet dieses Zeichen zur Einstellung der korrekten Geschwindigkeit. Anschluß an das LCD-Modul Die LCD-Module können entweder über Einfach- oder über DoppelÜbergangsstecker an den Controller angeschlossen werden. Der Trimmer T1 muß so eingestellt werden, daß der Kontrast des LCD optimal wird. V10828 Befenhlsprotokolltabelle Befehl Parameter Hexadezimal ASCII 03H ^C X wobei 0<x<2 12H ^R keine Anzeige 0EH ^N mm nn z1..znnnn wobei 0<m<255 0<n<255 0<z<255 Funktion Bildschirm löschen Dieser Befehlsparameter muß als ein ASCII-Zeichen gesendet werden, wobei: x = 0 Zeichen-LCD-Schirm löschen und Cursor auf Ausgangsposition (Home) zurückset zen. x = 1 Grafik-LCD-Schirm löschen. x = 2 Zeichen- und Grafik-LCD-Schirm löschen und Cursor auf Ausgangsposition (Home) zurücksetzen. d.h. Wenn nur der Grafikbildschirm gelöscht werden soll, muß “^C1” (03h,31h) gesendet werden. LCD-Modul zurücksetzen Dieser Befehl muß gesandt werden, nachdem ein Modultyp eingestellt wurde. Der eingestellte Modultyp ist erst aktiv, wenn ein Reset durchgeführt wird. Grafik füllen Mit diesem Befehl kann der Grafikbildschirm mit Daten gefüllt werden. mm definiert die Startadresse im Binärcode (0000h ist die obere linke Ecke des Displays) nn definiert die Anzahl der Bytes im Binärcode, die gesendet und angezeigt werden. z Binäre Daten. d.h. Zur Anzeige einer horizontalen Linie mit 20 Pixeln Breite müssen bei Beginn in der oberen linken Ecke folgende Daten gesandt werden: (0Eh, 00h, 00h, 00h, 03h, FFh, FFh, F0h) 0CH ^L x wobei 0<x<7 13H ^S keine Anzeige 10H ^P yyxx wobei 1<yy<nn 1<xx<nn Modultyp einstellen Der Befehlsparameter zur Definition des Modultyps muß als ein ASCII-Zeichen gesendet werde, wobei: x = 0 Typ 0 - 128 x 64 Pixel oder 16 x 8 Zeichen (Matrix 8 * 8) x = 1 Typ 1 - 128 x 64 Pixel oder 21 x 8 Zeichen (Matrix 6 * 8) x = 2 Typ 2 - 128 x 128 Pixel oder 16 x 16 Zeichen (Matrix 8 * 8) x = 3 Typ 3 - 128 x 128 Pixel oder 21 x 16 Zeichen (Matrix 6 * 8) x = 4 Typ 4 - 240 x 64 Pixel oder 30 x 8 Zeichen (Matrix 8 * 8) x = 5 Typ 5 - 240 x 64 Pixel oder 40 x 8 Zeichen (Matrix 6 * 8) x = 6 Typ 6 - 240 x 128 Pixel oder 30 x 16 Zeichen (Matrix 8 * 8) x = 7 Typ 7 - 240 x 128 Pixel oder 40 x 16 Zeichen (Matrix 6 * 8) d.h. Zum Einstellen eines Moduls nach Typ 1 muß “^L0” (0Ch, 30h) gesendet werden. CR/LF Weitere Parameter sind nicht erforderlich. Der Befehl löst einen Zeilenrücksprung/Zeilenvorschub des Zeichencursors aus. Der Cursor geht wieder an die erste Position im Bildschirm zurück, wenn die letzte Zeile auf dem Bildschirm erreicht wurde. Cursor einstellen Einstellen des Cursors auf eine bestimmte Zeilen- und Spaltenposition. Die Befehlsparameter zur Definition der Cursorposition müssen als ASCII-Zeichen gesendet werden, wobei: yy = Zeichenzeile in ASCII. xx = Zeichenspalte in ASCII. d.h. Zur Positionierung des Cursors auf den Anfang von Zeile 3 in einem Modul mit 8*30 muß “^P0301” (10h, 30h, 33h, 30h, 31h) gesendet werden. 5 V10828 01H ^A x wobei x=0 oder 1 LCD-Modulcursor ein/ausschalten. Der Befehlsparameter zur Definition des Cursorzustandes muß als ein ASCII-Zeichen gesendet werden, wobei: x = 0 Cursor aus. x = 1 Cursor ein. d.h. Zum Einschalten des Cursors muß “^A1” (01h,31h) gesendet werden. 02H ^B x wobei x=0 oder 1 LED-Hintergrundbeleuchtung ein- bzw. ausschalten. Der Befehlsparameter zur Definition des Zustands der Hintergrundbeleuchtung muß als ein ASCII-Zeichen gesendet werden, wobei: x = 0 Hintergrundbeleuchtung aus. x = 1 Hintergrundbeleuchtung ein. d.h. Zum Einschalten der Hintergrundbeleuchtung des Moduls muß “^B1” (02h, 31h) gesendet werden. 04H ^D xxxx... wobei 32<x<255 In ASCII gesendeten Text anzeigen Nach diesem Befehl werden alle im ASCII-Code gesendeten Daten nacheinander im Speicher des LCD-Controllers an einer angegebenen Cursorposition gespeichert und angezeigt. ASCII-Daten mit einem Wert von weniger als 32 (Dezimal) werden entweder als Befehl interpretiert, soweit eine Entsprechung vorhanden ist, oder ignoriert. Die ASCII-Codes 080h bis 0FFh zeigen vom Benutzer definier bare Zeichen. d.h. Zur Anzeige von hello muß “^Dhello” (04h, 68h, 65h, 6Ch, 6Ch, 6Fh) gesendet werden. 06H ^F mz1....z8 wobei 128<m<255 0<z<255 Benutzerdefinierbare Zeichen. (Format 8 * 8 Pixel) Nach diesem Befehl müssen alle neun Parameter gesendet werden. Der Zeichenidentifikationsparameter “m” muß eine binäre Zahl zwischen 128 und 255 sein. Damit wird angegeben, wo das Zeichen in der vom Benutzer definierbaren Tabelle gespeichert werden soll. Die Zeichenpixeldaten “z1..z8” müssen als binäre Zahlen zwischen 0 und 255 gesendet werden. Die Datenbits 0 bis 7 in jedem “z”-Wert geben die Anzahl der Pixel an, die eine Zeile des Zeichens ergeben. Die Reihenfolge ist von Zeile 1 bis Zeile 8. d.h. Wenn ein neues Zeichen “ ^ “ in Position 129 erzeugt werden soll, muß (06h, 11h, FFh, 81H, 81H, 81H, 81H, 81H, 81H, FFh) gesendet werden. 18H ^X keine Anzeige Status Der Befehl zeigt die Softwareversion und Kartenidentifikation als ASCII-Zeichenfolge an. Hinweise für das Befehlsprotokoll 1. 2. 3. 4. Die Beispiele in der oben angegebenen Tabelle zeigen binäre Daten, die an den Controller gesendet werden müssen. Bei Bedarf sind auch die entsprechenden ASCII-Zeichenfolgen angegeben. Das Zeichen “^” in der oben stehenden Tabelle gibt an, daß ein Befehlszeichen gesendet werden muß. Wenn in der Hardware ein Font mit 6 x 8 ausgewählt wurde, dann müssen die beiden größten Bits in den Datenwörtern verwendet werden, um die Zeichen zu definieren, und die Schreibgrafiken werden ignoriert. Als Modultyp beim Einschalten ist Typ 0 voreingestellt. Beispiel: Unter der Annahme, daß ein Modul 240 * 64 mit einem Font von 8 x 8 Pixel angeschlossen ist: Zum Schreiben der Worte “Hello World” in Zeile 3 nach dem Einschalten des Gerätes ist folgende Befehlssequenz erforderlich: Hinweis: Die Begrenzer “ “ müssen nicht gesendet werden. 1. 2. 3. 4. 5. 6. 7. Alle erforderlichen Verbindungen herstellen und Gerät einschalten. Ein Leerzeichen “20h” senden, um die Baudrate des Controllers festzulegen. Modultyp einstellen. Reset ausführen, um eingestellten Modultyp zu aktivieren. Zeichen- und Grafikbildschirm löschen. Cursor zum Start auf Zeile 3 setzen. “Hello World” anzeigen lassen. Im Binärcode müssen folgende Bytes gesendet werden: 20h 0Ch 30h 12h 03H 32h 10h 30H 33h 30h 31h 04h 48h 68h 65h 6Ch 6Ch 6Fh 20h 57h 6Fh 72h 6Ch 64h 6 ““ “^L0” “^R” “^C2” “^P0301” “^DHello World” V10828 Anschlüsse Anschluß an ein Modul J4 - Pinzuweisungen für Netzsteckverbindung Lötaugen In der unten stehenden Tabelle sind die passenden Verbindungskabel zum Display für Powertip-Grafikmodule angegeben. Pin 1 2 Zuweisung Vdd Vss Funktion Logik +5 Volt Logik 0 Volt J3 - Zuweisungen für Steckerpin serielle Daten Buchse 9-polig D-Stecker Pin 1 2 3 4 5 6 7 8 9 Zuweisung n/u Dout Rxin n/u Gnd n/u n/u n/u Leistung Funktion nicht verwendet Serielle Daten aus dem Controller Serielle Daten in den Controller nicht verwendet Datenreferenz Erde nicht verwendet nicht verwendet nicht verwendet Pin 1 2 3 Zuweisung Fgnd Vss Vdd 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Vlcd /WR /RD /CE C/D MBn /RESET DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 FS LED Funktion Gehäuse Erde (an Logik 0 Volt geknüpft) Logik 0 Volt Logik 5 Volt und LED-Hintergrundbeleuchtung +ve (A) Verbindung Spannung für LCD-Kontrasteinstellung Abtasten Daten schreiben Abtasten Daten lesen Chip aktivieren Befehl(H) / Daten(L) Zeilenauswahl Spaltenauswahl T6963 LCD-Controller Reset Datenbus I/0 Bit 0 Datenbus I/0 Bit 1 Datenbus I/0 Bit 2 Datenbus I/0 Bit 3 Datenbus I/0 Bit 4 Datenbus I/0 Bit 5 Datenbus I/0 Bit 6 Datenbus I/0 Bit 7 Frontauswahl LED-Hintergrundbeleuchtung - ve (K) Verbindung. J2 - LED Hintergrundbeleuchtung Pinzuweisungen - Lötaugen Pin Zuweisung Funktion A Vdd Logik +5 Volt B Vss Umschalten auf negative Spannungsversorgung Allgemeine Hinweise 1. 2. 3. 4. 5. 6. Zum Betrieb der LED-Hintergrundbeleuchtung ist eine weitere Verdrahtung erforderlich. RS Components haftet nicht für Verbindlichkeiten oder Schäden jedweder Art (ob auf Fahrlässigkeit von RS Components zurückzuführen oder nicht), die sich aus der Nutzung irgendwelcher der in den technischen Veröffentlichungen von RS enthaltenen Informationen ergeben. Code commande RS. 329-0391, 329-0408, 329-0414, 329-0436 Optionale Leistungsaufnahme (erfordert Verbindung LK1) J1 - Zuweisung Pin LCD-Modulverbindung - 20 Pins Wenn der Treiber für die LED-Hintergrundbeleuchtung verwendet wird, muß der Trimmer (T2) bis zum Anschlag entgegen dem Uhrzeigersinn gedreht werden, um den Strom vor dem Anlegen der Spannung auf 0 zu stellen. Der Trimmer muß danach auf die richtige Stromgröße für die Hintergrundbeleuchtung eingestellt werden. Der LCD-Negativ-Trimmer (b) auf der Platine muß verwendet werden, um den Displaykontrast des angeschlossenen LCDModuls zu optimieren. Die Umkehr der Polarität führt zu irreparablen Schäden am Controller und angeschlossenen LCD-Modul. Angeschlossene LCD-Module nie entfernen, solange das Gerät eingeschaltet ist. Es müssen Vorkehrungen gegen statische Entladungen getroffen werden, da Controller und LCD-Module CMOS LSI enthalten. Die in das Gerät eingebettete Software darf nicht zurückentwickelt, dekompiliert oder entschlüsselt werden. RS Best.-Nr. 329-0408 329-0414 329-0414 329-0436 Powertip Displayformat 128 * 64 128 * 128 240 * 64 240 * 128 Contrôleur du module d’écran à cristaux liquides Le contrôleur du module de l’écran à cristaux liquides est conçu autour d’un micro-contrôleur AT89C2051 à 8 bits. Le contrôleur peut actionner la plupart des panneaux graphiques de l’écran à cristaux liquides qui utilisent un contrôleur Toshiba T6963. Il comprend également un convertisseur c.c. - c.c. pour fournire la tension de polarisation nécessaire pour certains modules. Raccordements J1 Connecteur enfichable d’écran à cristaux liquides à 20 contacts J2 Connecteur du rétroéclairage par LED à 2 contacts J3 Connecteur femelle de communication de données de type SUB D 9 pts J4 Connecteur électrique J5 Panneau de connexions du connecteur de l’écran à cristaux liquides Réglages T1 Réglage du contraste de l’écran à cristaux liquides T2 Courant d’éclairage pour le rétro-éclairage Caractéristiques électriques Paramètre Courant d’alimentation logique Alimentation de la diode électroluminescente Condition Aucun module raccordé - Vdd = 5 volts Le courant dépend du rétroéclairage et des réglages (Vdd = 5 Volts) Minimum Maximum ~30 mA ~30 mA ~650 mA Connexion à un microcontrôleur ou autre Le microcontrôleur doit envoyer des données série dans le format suivant : 8 bits de données, 1 bit de démarrage, 1 bit d’arrêt, aucune parité. Le contrôleur à diode électroluminescente accepte des données à une cadence de 9 600 à 19 200 bauds. Le premier caractère envoyé par le microcontrôleur après avoir mis le contrôleur à diode électroluminescente sous tension, doit être un caractère d’espace ASCII, c’est-à-dire 32 décimales. Le contrôleur de l’écran à cristaux liquide utilise ce caractère pour régler la bonne vitesse. Connexion au module de l’écran à cristaux liquides On peut raccorder les modules d’écran à cristaux liquides au contrôleur à l’aide d’un connecteur en simple ligne ou double. Il faut régler le condensateur ajustable T1 pour optimiser le contraste de l’affichage de l’écran à cristaux liquides. 7 V10828 Tableau du protocole de commande Commande Paramètres Fonction hex ASCII 03H ^C x étant donné que 0<x<2 Effacer l’écran Il faut envoyer le paramètre de commande comme un chiffre ASCII, Étant donné que : x = 0 Efface l’écran de caractères à cristaux liquides et ramène le curseur au début de l’écran. x = 1 Efface l’écran graphique à cristaux liquides. x = 2 Efface l’écran graphique et à caractères à cristaux liquide et ramène le curseur au début de l’écran. C’est-à-dire Pour effacer l’écran graphique seulement, il faut transmettre “^C1” (03h,31h). 12H ^R aucun Réinitialiser le module de l’écran à cristaux liquides Il faut transmettre cette commande après avoir établi un type de module. Le symbole d’établissement de type de module ne sera activé que lorsqu’une réinitialisation aura été effectuée. 0EH ^N mm nn z1..znnnn étant donné que 0<m<255 0<n<255 0<z<255 Remplissage graphique Cette commande permet de remplir l’écran graphique avec des données. mm définit l’adresse de départ en binaire (0000h étant le coin supérieur gauche de l’écran.) nn définit le nombre d’octets en binaire à transmettre et affichés. z données binaires. C’est-à-dire Pour afficher une ligne horizontale de 20 pixels de largeur, en commençant par le coin supérieur gauche, il faut transmettre ce qui suit. (0Eh, 00h, 00h, 00h, 03h, FFh, FFh, F0h) 0CH ^L x étant donné que 0<x<7 13H ^S aucun 10H ^P yyxx étant donné que 1<yy<nn 1<xx<nn 8 Établir le type de module Le paramètre de commande définissant le type de module doit être établi comme un chiffre ASCII : x = 0 Type 0 - 128 sur 64 pixels, ou 16 sur 8 caractères (matrice de 8 * 8) x = 1 Type 1 - 128 sur 64 pixels, ou 21 sur 8 caractères (matrice de 6 * 8) x = 2 Type 2 - 128 sur 128 pixels, ou 16 sur 16 caractères (matrice de 8 * 8) x = 3 Type 3 - 128 sur 128 pixels, ou 21 sur 16 caractères (matrice de 6 * 8) x = 4 Type 4 - 240 sur 64 pixels, ou 30 sur 8 caractères (matrice de 8 * 8) x = 5 Type 5 - 240 sur 64 pixels, ou 40 sur 8 caractères (matrice de 6 * 8) x = 6 Type 6 - 240 sur 128 pixels, ou 30 sur 16 caractères (matrice de 8 * 8) x = 7 Type 7 - 240 sur 128 pixels, ou 40 sur 16 caractères (matrice de 6 * 8) C’est-à-dire Pour établir le module au type 1, il faut transmettre “^L0” (0Ch, 30h). CR/LF Aucun paramètre supplémentaire nécessaire. La commande fait effectuer un retour de chariot / retour à la ligne au curseur. Le curseur se place en haut quand le bas de l’écran est atteint. Placer le curseur Placer le curseur à un point sur un numéro de ligne et une position de caractère. Les paramètres de commande qui définissent la position du curseur doivent être transmis comme quatre chiffres ASCII : yy = position de rangée de caractères en ASCII. xx = position de colonne de caractères en ASCII. C’est-à-dire Pour positionner le curseur au début de la ligne 3 dans un module de 8*30, Il faut transmettre “^P0301” (10h, 30h, 33h, 30h, 31h). V10828 01H ^A x étant donné que x = 0 ou 1 Allumer/éteindre le curseur du module de l’écran à cristaux liquides. Le paramètre de commande définissant l’état du curseur doit être transmis comme un chiffre ASCII : x = 0 curseur éteint. x = 1 curseur allumé. C’est-à-dire Pour allumer le curseur, il faut transmettre “^A1” (01h,31h). 02H ^B x étant donné que x = 0 ou 1 Allumer/éteindre l’éclairage à contre-jour de l’écran à cristaux liquides. Le paramètre de commande définissant l’état de l’éclairage à contre-jour doit être transmis comme un chiffre ASCII : x = 0 éclairage à contre-jour éteint. x = 1 éclairage à contre-jour allumé. C’est-à-dire Il faut transmettre “^B1” (02h, 31h) pour allumer l’éclairage du module. 04H ^D xxxx... étant donné que 32<x<255 Afficher le texte de l’affichage transmis en ASCII À la suite de cette commande, toutes les données en ASCII transmises seront séquentiellement entrées dans la mémoire du contrôleur de l’écran à cristaux liquides à la position de curseur spécifiée et affichées. Les données en ASCII avec une valeur inférieure à 32 décimales seront interprétées comme une commande si elles sont appropriées, ou ignorées. Les codes ASCII 080h à 0FFh afficheront les caractères définissables par l’utilisateur. C’est-à-dire Pour afficher hello, il faut transmettre “^Dhello” (04h, 68h, 65h, 6Ch, 6Ch, 6Fh). 06H ^F mz1....z8 étant donné que 128<m<255 0<z<255 Caractères définis par l’utilisateur. (format 8 * 8 pixels) À la suite de cette commande, il faut transmettre les neuf paramètres. Le paramètre “m” d’identification de caractère doit être un nombre binaire entre 128 et 255. Ceci décidera où le caractère doit être entré dans la table définie par l’utilisateur. Il faut transmettre les données de pixels de nombre “z1..z8” comme nombres binaires, entre 0 et 255. Les bits de données de 0 à 7 dans chaque valeur “z” représentent la constitution en pixels d’une ligne de caractères. L’ordre étant de la ligne 1 à la ligne 8 C’est-à-dire Pour créer un nouveau caractère “^ ” en position 129 : il faut transmettre (06h, 11h, FFh, 81H, 81H, 81H, 81H, 81H, 81H, FFh). 18H ^X aucun État La commande fait revenir la version du logiciel et la carte de décalage en chaîne ASCII. Notes sur le protocole de commande 1. 2. 3. 4. Les exemples dans le tableau ci-dessus indique les données binaires qu’il faut transmettre au contrôleur. Les séquences ASCII sont également indiquées lorsqu’elles sont pertinentes. Le “^” dans la table ci-dessus indique qu’il faut transmettre un caractère de contrôle. Si on a sélectionné une police 6 sur 8 dans le matériel, les deux bits les plus significatifs dans les mots de données utilisés pour définir les caractères et écrire les graphiques sont alors ignorés. Le type de module par défaut en puissance est, type 0. Exemple, en supposant qu’un module de 230 * 64 utilisant une police de 8 sur 8 pixels est raccordé Afin d’écrire les mots “Hello World” sur la ligne 3 après une mise en marche récente, il faut suivre l’ordre ci-dessous. Remarque : Il ne faut pas transmettre les délimiteurs “ ” 1. 2. 3. 4. 5. 6. 7. Faire toutes les connexions nécessaires, et mettre l’appareil sous tension. Transmettre 1 caractère d’espace “20h” pour établir la cadence du contrôleur en bauds. Établir le type de module Réinitialiser pour mettre en place le type de module établi. Effacer l’écran de caractères et graphique. Placer le curseur au début de la ligne 3. Afficher “Hello World” ““ “^L0” “^R” “^C2” “^P0301” “^DHello World” En mode binaire, il faut transmettre les octets suivants : 20h 0Ch 30h 12h 03H 32h 10h 30H 33h 30h 31h 04h 48h 68h 65h 6Ch 6Ch 6Fh 20h 57h 6Fh 72h 6Ch 64h 9 V10828 Raccordements 4. J4 - Affectations des contacts du connecteur de puissance Fiches 1 2 Affectation Vdd Vss Fonction logique +5 volts logique 0 volt J3 - Affectation des contacts du connecteur de donnée (Sub D 9 pts) Fiches 1 2 3 4 5 6 7 8 9 Affectation n/u Dout Rxin n/u Gnd n/u n/u n/u Power Fonction inutilisé Données séries sortie du contrôleur Données série entrée du contrôleur inutilisé Masse inutilisé inutilisé inutilisé alimentation électrique en option (nécessite la liaison LK1) 5. 6. Ne pas enlever un module d’écran à cristaux liquides relié quelconque tant que l’appareil est sous tension. Il faut prendre des précautions contre les décharges ESD Vous ne pouvez pas inverser la conception, décompiler ou désassembler le logiciel intégré. Connexion à un module Le tableau ci-dessous détaille les câbles d’interconnexion d’affichage appropriés pour les modules graphiques Powertip. Powertip Format d’affichage 128 * 64 128 * 128 240 * 64 240 * 128 Un câblage supplémentaire sera nécessaire pour activer l’éclairage à contre-jour de la diode électroluminescente. La société RS Components n’est pas responsable des dettes ou pertes de quelle que nature que ce soit (quelle qu’en soit la cause ou qu’elle soit due ou non à la négligence de la société RS Components) pouvant résulter de l’utilisation des informations données dans la documentation technique de RS. J1 - Affectations de fiche du connecteur du module de l’écran à cristaux liquides - 20 fiches Fiches Affectation 1 Fgnd 2 Vss 3 Vdd 4 Vlcd 5 6 7 8 /WR /RD /CE C/D 9 10 MBn /RESET 11 12 13 14 15 16 17 18 19 20 DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 FS LED Fonction Masse de la trome (reliée à 0 volts) Logique 0 volt Tension 5 Volts et rétroéclairage + connection ve (A) Tension de réglage du contraste de la diode électroluminescente Écriture de données Lecture de données Validation Commande (H) / données (L) Sélection de colonne Réinitialisation du contrôleur à écran à cristaux liquides T6963 Bit 0 de bus de données E/S Bit 1 de bus de données E/S Bit 2 de bus de données E/S Bit 3 de bus de données E/S Bit 4 de bus de données E/S Bit 5 de bus de données E/S Bit 6 de bus de données E/S Bit 7 de bus de données E/S Sélection avant Rétroéclairage -connexion ve (K) J2 - Affectations de fiche de connecteur d’éclairage à contre-jour de diode électroluminescente - plaquettes soudées Fiches A K Affectation Vdd Vss Fonction logique +5 volts Alimentation négative Notes générales 1. Si on utilise le pilote de l’éclairage à contre-jour de la diode électroluminescente, il faut tourner l’ajusteur (T2) à fond dans le sens antihoraire pour réduire le courant à zéro avant la mise sous tension. Il faut alors régler l’ajusteur pour fournir le courant approprié à l’éclairage à contre-jour. 2. Il faut utiliser l’ajusteur de polarisation négatif de l’écran à cristaux liquides intégré (T1) pour optimiser le contraste de l’affichage de tout module d’écran à cristaux liquides attaché. 3. Une connexion à polarité inversée causera des dommages irréparables au contrôleur et au module d’écran à cristaux liquides attaché. 10 Numéro de pièce RS 329-0408 329-0414 329-0414 329-0436 RS Codici. 329-0391, 329-0408, 329-0414, 329-0436 Controller del modulo LCD grafico Il controller del modulo LCD (liquid cristal display, display a cristalli liquidi) è abbinato a un microcomputer a 8 bit AT89C2051 ad alte prestazioni. Il controller può essere utilizzato con la maggior parte dei pannelli grafici LCD dotati di controller Toshiba T6963. Inoltre, incorpora un convertitore CC-CC per produrre l’impulso LCD negativo richiesto da taluni moduli. Connessioni J1 J2 J3 J4 J5 Connettore DIL LCD a 20 pin Connettore SIL retroilluminazione LED a 2 pin Connettore di comunicazione dati femmina di tipo D a 9 vie Connettore di alimentazione Quadro connettore LCD Regolazioni T1 T2 Regolazione contrasto LCD Corrente retroilluminazione LED Caratteristiche elettriche Parametro Corrente alimentazione logica Alimentazione LED Condizione Nessun modulo collegato Vdd=5volts Dipende dalla retroilluminazione Min Max ~30mA ~30mA ~650mA LED e dalle impostazioni ( Vdd=5volts) Collegamento a PC o altro Il computer host deve inviare dati seriali nel seguente formato: 8 bit di dati, 1 bit di avvio, 1 bit di arresto, nessuna parità. Il controller LCD accetta dati a una velocità di trasmissione di 9600 o 19200. Il primo carattere inviato dal computer host dopo avere avviato il controller LCD deve essere un carattere spazio ASCII, ossia 32 decimale. Il controller LCD utilizza questo carattere per regolare e impostare la velocità appropriata. Collegamento al modulo LCD I moduli LCD possono essere collegati al controller utilizzando un connettore in linea singolo o doppio. Il compensatore T1 deve essere regolato in modo da ottimizzare il contrasto del display LCD. V10828 Tabella dei protocolli di comando Comando esadecimale Parametri Funzione ASCII 03H ^C x dove 0<x<2 Schermo vuoto Il parametro di comando deve essere inviato come carattere ASCII singolo, dove: x = 0 Elimina i caratteri sullo schermo LCD & reimposta il cursore nella posizione home. x = 1 Elimina le immagini grafiche sullo schermo LCD. x = 2 Elimina i caratteri e le immagini grafiche sullo schermo LCD & reimposta il cursore nella posizione home. Per eliminare solo le immagini grafiche, è necessario inviare “^C1” (03h,31h). 12H ^R nessuno Reimposta il modulo LCD Questo comando deve essere inviato dopo avere impostato un tipo di modulo. Il tipo di modulo viene attivato solo dopo avere eseguito una reimpostazione. 0EH ^N mm nn z1..znnnn dove 0<m<255 0<n<255 0<z<255 Riempimento grafico Questo comando consente di riempire di dati lo schermo grafico. mm definisce l’indirizzo di avvio in formato binario (0000h è l’angolo superiore sinistro del display. nn definisce il numero di byte in formato binario da inviare e visualizzare. z dati binari. Per visualizzare una linea orizzontale composta da 20 pixel a partire dall’an golo superiore sinistro, è necessario inviare quanto segue:(0Eh, 00h, 00h, 00h, 03h, FFh, FFh, F0h) 0CH ^L x dove 0<x<7 13H ^S nessuno CR/LF Non è necessario alcun parametro addizionale. Il comando esegue un ritorno a capo / avanzamento di riga. Una volta raggiunto il limite inferiore, il cursore riappare sulla parte superiore dello schermo. 10H ^P yyxx dove 1<yy<nn 1<xx<nn Imposta il cursore Posizione il cursore in base a un determinato numero di riga e carattere. I parametri del comando che definiscono la posizione del cursore devono essere inviati come caratteri ASCII di quattro cifre, dove: yy = posizione del carattere nella riga in formato ASCII. xx = posizione del carattere nella colonna in formato ASCII. Per posizione il cursore all’inizio della riga 3 su un modulo 8*30, è necessario inviare “^P0301” (10h, 30h, 33h, 30h, 31h). 01H ^A x dove x=0 o 1 Attiva/disattiva il cursore del modulo LCD. Il parametro di comando che definisce lo stato del cursore deve essere inviato come carattere ASCII singolo, dove: x = 0 cursore disattivato. x = 1 cursore attivato. Per attivare il cursore, è necessario inviare “^A1” (01h,31h). 02H ^B x dove x=0 o 1 Attiva/disattiva la retroilluminazione LED. Il parametro di comando che definisce lo stato della retroilluminazione, deve essere inviato come carattere ASCII singolo, dove: x = 0 retroilluminazione disattivata. x = 1 retroilluminazione attivata. Per attivare l’illuminazione, è necessario inviare “^B1” (02h, 31h). 04H ^D xxxx... dove 32<x<255 06H ^F mz1....z8 dove 128<m<255 0<z<255 18H ^X nessuno Imposta il tipo di modulo Il parametro di comando che definisce il tipo di modulo deve essere inviato come cifra ASCII singola, dove: x = 0 Tipo 0 - 128 x 64 pixel o 16 x 8 caratteri (matrice 8 * 8) x = 1 Tipo 1 - 128 x 64 pixel o 21 x 8 caratteri (matrice 6 * 8) x = 2 Tipo 2 - 128 x 128 pixel o 16 x 16 caratteri (matrice 8 * 8) x = 3 Tipo 3 - 128 x 128 pixel o 21 x 16 caratteri (matrice 6 * 8) x = 4 Tipo 4 - 240 x 64 pixel o 30 x 8 caratteri (matrice 8 * 8) x = 5 Tipo 5 - 240 x 64 pixel o 40 x 8 caratteri (matrice 6 * 8) x = 6 Tipo 6 - 240 x 128 pixel o 30 x 16 caratteri (matrice 8 * 8) x = 7 Tipo 7 - 240 x 128 pixel o 40 x 16 caratteri (matrice 6 * 8) Per impostare il tipo di modulo 1, è necessario inviare “^L0” (0Ch, 30h). Visualizza il testo inviato in formato ASCII Una volta immesso questo comando, tutti i dati ASCII inviati verranno memorizzati in sequenza nella memoria del controller LCD in base alla posizione specificata del cursore. I dati ASCII con un valore inferiore a 32 decimali vengono interpretati come comandi, se appropriato, oppure ignorati. I codici ASCII da 080h a 0FFh visualizzano i caratteri che possono essere definiti dall’utente. Per visualizzare hello, è necessario inviare “^Dhello” (04h, 68h, 65h, 6Ch, 6Ch, 6Fh) Caratteri definiti dall’utente. (formato 8 * 8 pixel) Una volta immesso questo comando, è necessario inviare tutti e nove i parametri. Il parametro di identificazione del carattere “m” deve essere un numero binario incluso tra 128 e 255. Il numero specificato determina la posizione nella quale il carattere viene memorizzato all’interno della tabella definita dall’utente. Il dato pixel del carattere “z1..z8” deve essere un numero binario Incluso tra 0 e 255. I bit di dati da 0 a 7 in ciascun valore “z” rappresentano i pixel che compongono una singola linea del carattere. L’ordine va dalla linea 1 alla linea 8 Per creare un nuovo carattere “ ^ “ nella posizione 129, è necessario inviare (06h, 11h, FFh, 81H, 81H, 81H, 81H, 81H, 81H, FFh). Stato La licenza e l’ordinativo del software vengono restituiti come stringa in formato ASCII. 11 V10828 Note sul protocollo di comando 1. 2. 3. 4. Gli esempi nella tabella precedente mostrano i dati binari che è necessario inviare al controller. Se necessario, vengono illustrate anche le sequenze di caratteri ASCII. Il simbolo “^” nella tabella precedente indica che è necessario inviare un carattere di controllo. Se si seleziona un font 6 x 8 nell’hardware, i due bit più significativi presenti nelle parole dati utilizzate per definire i caratteri e tracciare le immagini grafiche vengono ignorati. Il tipo di modulo predefinito all’avvio è 0. Esempio (è collegato un modulo 240 * 64 con un font composto da 8 x 8 pixel) Per scrivere le parole “Hello World” sulla riga 3, è necessario utilizzare la sequenza seguente. Nota: i delimitatori “ ” non devono essere inviati 1. 2. 3. 4. 5. 6. 7. Effettuare tutti i collegamenti necessari e alimentare l’unità. Inviare 1 carattere spazio “20h” per impostare la velocità di trasmissione del controller. Impostare il tipo di modulo. Resettare per attivare il tipo di modulo impostato. Azzerare lo schermo caratteri e immagini grafiche. Spostare il cursore all’inizio della riga 3. Visualizzare “Hello World” ““ “^L0” “^R” “^C2” “^P0301” “^DHello World” In formato binario, è necessario inviare i seguenti byte: 20h 0Ch 30h 12h 03H 32h 10h 30H 33h 30h 31h 04h 48h 68h 65h 6Ch 6Ch 6Fh 20h 57h 6Fh 72h 6Ch 64h Connessioni J4 – Assegnazioni dei pin del connettore di alimentazione saldatura Pin 1 2 Assegnazione Vdd Vss a Funzione logica +5 volts logica 0 volts J3 – Assegnazioni dei pin del connettore dati seriale – connettore D a 9 vie femmina Pin 1 2 3 4 5 6 7 8 9 Assegnazione n/u Dout Rxin n/u Gnd n/u n/u n/u Power Funzione non utilizzato Dati seriali all’esterno del controller Dati seriali nel controller non utilizzato Riferimento dati a massa non utilizzato non utilizzato non utilizzato ingresso di alimentazione opzionale (richiede collegamento LK1) J2 – Assegnazione dei pin del connettore di retroilluminazione LED – a saldatura Pin A K Assegnazione Fgnd Vss Vdd 4 Vlcd 5 6 7 8 /WR /RD /CE C/D 9 10 11 12 13 14 15 16 17 18 19 20 MBn /RESET DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 FS LED Funzione Frame gnd (collegato a 0 volts logica) Logica 0 volts Logica 5 volts & retroilluminazione LED +connessione ve (A) Voltaggio di regolazione del contrasto LCD Impulso di scrittura dati Impulso di lettura dati Attivazione chip Linea di selezione Comando(H) / Dati(L) Selezione colonna Reset controller T6963 LCD Data Bus di I/O da 0 bit Data Bus di I/O da 1 bit Data Bus di I/O da 2 bit Data Bus di I/O da 3 bit Data Bus di I/O da 4 bit Data Bus di I/O da 5 bit Data Bus di I/O da 6 bit Data Bus di I/O da 7 bit Selezione anteriore Connessione - ve (K) retroilluminazione LED Funzione logica +5 volts Alimentazione negativa commutata Note generali 1. 2. 3. 4. 5. J1 – Assegnazione dei pin del connettore modulo LCD - 20 pin Pin 1 2 3 Assegnazione Vdd Vss 6. Se il driver di retroilluminazione LED è utilizzato dal compensatore (T2), è necessario ruotarlo completamente in senso antiorario per ridurre a zero la corrente prima di applicare tensione. Il compensatore dovrà essere quindi regolato in modo da fornire la quantità di corrente adeguata necessaria per la retroilluminazione. Il compensatore a impulso negativo LCD incorporato (T1) deve essere utilizzato per ottimizzare il contrasto del display di ogni modulo LCD collegato. I collegamenti con inversione di polarità possono causare danni irreparabili al controller e al modulo LCD collegato. Non rimuovere alcun modulo LCD mentre l’unità e in tensione. Adottare tutte le precauzioni atte a prevenire l’insorgere di scariche elettrostatiche. Il controller e i moduli LCD contengono CMOS LSI. Non modificare, decompilare o disassemblare il software incorporato. Connessione a un modulo Nella tabella sottostante sono indicati i cavi di interconnessione adatti all’uso con moduli Powertip. Formato display Powertip Formato display 128 * 64 128 * 128 240 * 64 240 * 128 Codice RS 3290408 3290414 3290414 3290436 La retroilluminazione LED richiede l’uso di ulteriori cavi. La RS Components non si assume alcuna responsabilità in merito a perdite di qualsiasi natura (di qualunque causa e indipendentemente dal fatto che siano dovute alla negligenza della RS Components), che possono risultare dall’uso delle informazioni fornite nella documentazione tecnica.