ETC2 EAKIT320-8 5,7 lcd control panel with touch panel Datasheet

EA KIT320-8
Aug. 2004
5,7" LCD CONTROL PANEL
WITH TOUCH PANEL
r
o r fo
t
c
e
nn
w. co atrix LCD
dotm
EA KIT320-8CTP
Dim. 153x120mm
TECHNICAL DATA
* 5.7" LCD GRAPHICS DISPLAY WITH DIVERSE GRAPHICS FUNCTIONS AND FONTS
* 320x240 PIXELSWITH CFL ILLUMINATION, BLUE NEGATIVE (RECOMMENDED)
* 320x240 PIXELSWITH LED ILLUMINATION,WHITE, BLACK CHAR. FSTN
* FONT ZOOM FROM approx. 2mm TO approx. 80mm,ROTATABLEin 90° STEPS
* SUPPLY +5V±2%@500mA(CFL)/400mA(LED) OR OPTIONALLY +9..35V
* RS-232 OR OPTIONALLY RS-422WITH BAUD RATES OF 2,400TO 115,200
* POSITIONINGACCURATE TOTHE PIXEL WITH ALL FUNCTIONS
* STRAIGHT LINE, POINT, AREA, AND/OR/EXOR, BAR GRAPH...
* CLIPBOARD FUNCTIONS, PULL-DOWN MENUS
* UPTO 256 IMAGES STORABLE INTERNALLY
* UP TO 1024 MACROS PROGRAMMABLE (FLASH WITH 480 KB)
* ILLUMINATION SWITCHABLE BY MEANS OF SOFTWARE
* COMBINATIONS OFTEXT AND GRAPHICS, FLASHING ATTRIBUTES, INVERTED
* ANALOGTOUCH PANEL:VARIABLE GRIDWITH10x8 FIELDS, FOR EXAMPLE
* FREELY DEFINABLE KEYS AND SWITCHES
* MENUS AND BAR GRAPH CAN BE SET BYTOUCH
* DOT-MATRIX DISPLAY CAN BE CONNECTED DIRECTLY AS SECONDARY DISPLAY
ORDER DESIGNATION
320x240 DOTS 5.7"WITH CFL ILLUMINATION, BLUE NEGATIVE
AS ABOVE, BUTWITHOUTTOUCH PANEL
320x240 DOTS, WHITE LED ILLUMINATION, POSITIVE MODE, FSTN
AS ABOVE FSTN, BUTWITHOUTTOUCH PANEL
EA KIT320-8CTP
EA KIT320-8C
EA KIT320-8LWTP
EA KIT320-8LW
OPTIONS / ACCESSORIES
SUPPLY +9..35V= INSTEAD OF +5V=
RS-422 INTERFACE INSTEAD OF RS-232
OPTOCOUPLER ONBOARD FOR 8 INPUTS AND OUTPUTS
ALUMINUM MOUNTING BEZEL, ANODIZED MATT BLACK
ALUMINUM MOUNTING BEZEL, ANODIZED BLUE
CABLE (1.5m) FOR CONNECTING TO 9-PIN SUB-D (RS-232 FEMALE)
FLOPPY DISK FOR MACRO PROGRAMMING (PC WIN95/98/2K)
EA OPT-9/35V
EA OPT-RS4224
EA OPT-OPTO16
EA 0FP320-8SW
EA 0FP320-8BL
EA KV24-9B
EA DISK320
ZEPPELINSTRASSE
19 · D- 82 205 GILCHING
PHONE +49-8105-778090· FAX +49-8105-778099· http://www.lcd-module.de
EA KIT320-8
GENERAL
The EA KIT320 is a fully assembled control and operating unit with a variety of integrated functions.
The display has very compact dimensions and offers excellent super-twist contrast, which means the
unit can be put into operation immediately. It is controlled via the standard RS-232 or RS-422
interface. In addition to complete graphics routines for display output, the operating unit also contains
a wide variety of fonts.
Graphics commands similar to high-level language are used for programming. There is no longer any
need for the time-consuming programming of character sets and graphics routines. The ease of use
offered by macros and input via touch panel make it a real power display.
HARDWARE
The operating unit is designed to work with an operating voltage of +5V. A supply voltage of 9..35V
is also possible. Serial asynchronous data transfer is carried out in RS-232 or RS-422 format. The
transmission format is set permanently to 8 data bits, 1 stop bit, and no parity. Rates between
2,400 baud and 115,200 baud can be selected by means of DIP switches. RTS and CTS handshake
lines are available.
Data format:
TOUCH PANEL
The EA KIT320-8CTP and -8LWTP versions are equipped with an integrated touch panel. You can
make entries and menu or bar graph settings by touching the display. The labeling of the „keys“ is
flexible and can also be changed during runtime (different languages, icons). The drawing of the
individual „keys“ and the labeling is handled by the integrated software.
SOFTWARE
The operating unit is programmed by means of commands, such as Draw a rectangle from (0,0) to
(64,15). No additional software or drivers are required. Strings can be placed with pixel accuracy.
Flashing attributes can be assigned as often as you like – for graphics as well. Text and graphics can
be combined at any time. Up to 16 different character sets can be used. Each one can be zoomed
from 2 to 8 times. With the largest character set, the words and numbers displayed will fill the screen.
ACCESSORIES
Floppy disk for macro creation
A floppy disk (EA DISK320) is required for macro programming *). This converts the commands
entered in a text file into a code that can be read by the operating unit, and programs them into the
FLASH PROM.
Cable for PC
To enable simple connection to PCs (specifically for macro programming), we provide an optional
1.5m cable and a 9-pin SUB-D female connector (EA KV24-9B). Simply insert it into COM 1 or COM 2
and get started. Note: The cable is not suitable for the RS-422 version EA OPT-RS4224.
*)
2
also available at http://www.lcd-module.de/deu/disk/disk320.zip
EA KIT320-8
SUPPLY VOLTAGE
In the standard model, the supply
voltage of +5V is fed in via the
screw-type terminal J1. In the case
of the version for 9V to 35V
(EA OPT-9/35V), the power is
supplied via J2.
Important: It is imperative that the
polarity is correct. Even very brief
polarity reversal can damage the
entire operating unit immediately
and irreparably.
View from rear side
BAUD RATES
Baudrates
The baud rate can be set by means of the three DIP switches on the left. When
the equipment is delivered, the setting is 9,600 baud (DIP 3 ON). Please note
that the internal data buffer is only 128 bytes. The RTS handshake line must
therefore be queried (+10V level: data can be accepted; -10V level: display is
busy). The data format is set permanently to 8 data bits, 1 stop bit, no parity.
DIP Switch
1
2
3
ON
OFF
ON
ON
ON
OFF
ON
OFF OFF
ON ON
OFF
ON
OFF
ON
OFF
OFF OFF
RS-232 Connector J3
Pin Symbo In/Out
Function
1
VDD
+ 5V Supply
2
DCD
Connected to DTR
3
DSR
Connected to DTR
4
TxD
Out Transmit Data
5
CTS
In
Clear To Send
6
RxD
In
Receive Data
7
RTS
Out Request To Send
8
DTR
see Pin 2, Pin 3
9
NC
10 GND
0V Ground
RS-232/RS-422
OFF OFF OFF
data format
8,N,1
2,400
4,800
9,600
19,200
38,400
57,600
115,200
The operating unit is shipped with an RSRS-422 Connector J3
232 interface as standard. The pin Pin Symbol
Function
assignment of connector J3 is then as 1
VDD
+ 5V Supply
shown in the table on the left. J3 has a grid 2 Data In- Receive Data
of 2.54mm. If the operating unit is ordered 3 Data In+ Receive Data
4 Data Out- Transmit Data
together with the EA OPT-RS4224 option, 5 Data Out+ Transmit Data
special RS-422 drivers are fitted. The pin 6
HS InHandshake
7
HS
In+
Handshake
assignment in the table on the right then
8
HS Out- Handshake
applies.
9
HS Out+ Handshake
Incidentally, the same serial 10 GND 0V Ground
data with 5V levels and
TTL logic is available at
Extension J5
Function
the J5 eyelet strip. These Pin Symbol In/Out
VU
9..35V Supply
levels are suitable for 1
2
VDD
+ 5V Supply
direct connection to a µC. 3 GND
0V, Ground
If these signals are used, 4 TxD5 Out Transmit Data
In
Receive Data
4 solder straps LB1, LB2, 5 RxD5
6
RTS5
Out Request To Send
LB 5 und LB 6 has to be
7
CTS5
In
Clear To Send
opened !
8 RESET
In
L: Reset
9
10
SCL
SDA
Out I2C Bus, Clock
In/Out I2C Bus, Data
3
EA KIT320-8
INPUTS AND OUTPUTS
All EA KIT320 operating units are supplied with 8 digital
In- and Output J120
Pin Symbol
inputs and 8 outputs (5V CMOS level, non-isolated). Pin Symbol Function
+5V Supply
1
VDD
2
GND
8 outputs
Port Output 1
3 OUT1 / MO8 Matrix
4
IN1
/ MI8
Output 8
Each line can be controlled by means of the „ESC Y W“
Port Output 2
6 IN2 / MI7
command. The maximum current per line is 6mA. It is 5 OUT2 / MO7 Matrix Output 7
Port Output 3
8 IN3 / MI6
therefore possible to connect an LED (low current) 7 OUT3 / MO6 Matrix Output 6
Port Output 4
10 IN4 / MI5
directly to an output. Higher currents can be amplified 9 OUT4 / MO5 Matrix Output 5
Port Output 5
11 OUT5 / MO4 Matrix Output 4
12 IN5 / MI4
by means of external transistors.
Port Output 6
8 inputs
13 OUT6 / MO3 Matrix Output 3
14 IN6 / MI3
Port Output 7
The inputs can be queried and evaluated („ESC Y R“) 15 OUT7 / MO2 Matrix
16 IN7 / MI2
Output 2
directly via the serial interface. It is also possible to call 17 OUT8 / MO1 Port Output 8
18 IN8 / MI1
Matrix Output 1
a bit/port macro automatically in the event of changes 19
0V, Ground
GND
20
VDD
at the inputs. Automatic port querying can be
deactivated by means of the „ESC Y A 0“ command.
Port macros: Up to 256 port macros can be addressed by means of the binary
combination of 8 inputs.
Bit macros each only affect one input. Bit macro 1..8 is called at one of inputs
1...8 in the event of a change to HIGH level. Bit macros 9..16 are called in the
event of a change to LOW level.
At each change of the input port, the bit macros are executed first, followed by
the port macro. If there is no macro defined, the new port status is sent via
RS232/RS422. Each of the macros can change the contents of the screen or
switch outputs. This allows a wide range of control tasks to be carried out. To
create the macros, you need a PC and the floppy disk EA DISK320.
Note: The logic circuitry is designed for slow operations; in other words, more
than 3 changes per second cannot be easily executed. If an input is open, this
is evaluated as high (internal 100 kOhm pullup).
Function
0V, Ground
Port Input 1
Matrix Input 8
Port Input 2
Matrix Input 7
Port Input 3
Matrix Input 6
Port Input 4
Matrix Input 5
Port Input 5
Matrix Input 4
Port Input 6
Matrix Input 3
Port Input 7
Matrix Input 2
Port Input 8
Matrix Input 1
+5V Supply
INPUTS AND OUTPUTS VIA OPTOCOUPLERS (EA OPT-OPTO16)
The inputs and outputs can be equipped optionally with optocouplers
(EA OPT-OPTO16). The inputs and outputs are then isolated from the rest of
the electronic components as well as each other. The connection is made via
16 different screw-type terminals.
Voltages of 5..35V can be applied directly at all
8 inputs. Voltages of over 4V are identified as high (H)
level; voltages of under 2V are identified as low (L)
level. Voltages between 2 and 4V are undefined.
The collector and emitter of a transistor are each
implemented as outputs on the screw-on terminals.
Each output can switch a maximum of 10mA.
Note: The negative pole of each screw-on terminal
can be interconnected by closing solder straps
LBI1..8 or LBO1..8. In addition, these solder straps
can be connected to system GND (solder 0Ω bridge RGND).
Note: The optocouplers invert the input logic (all inputs open: port macro n°255). It is advisable here
(in the power-on macro, for example) to use the „ESC Y I 1“ command to evaluate the inputs inversely
(i.e. all inputs open: port macro n°0).
4
EA KIT320-8
EXTERNAL MATRIX KEYBOARD
A matrix keyboard (anything from individual keys to an 8x8 matrix keyboard) can be connected at the
plug-in connection J120. The number of inputs and outputs of the ports (n1,n2=1..8) used is defined
and the key debouncing is specified (n3=0..7 in 50ms increments) by means of the ‘ESC Y M n1 n2
n3’ command. Please note when an external keyboard is connected that the digital inputs are reduced
by the number n1 and the outputs are reduced by the number n2.
Each key is generally switched between an output and an input. Each input has a 100kΩ (approx.)
pullup. In order to identify double keystrokes, the outputs must be decoupled from each other. This
is best done with Schottky diodes (e.g. BAT 43).
Transmitting the keystrokes
At each keystroke (key number 1..64), the associated matrix macro is executed or, if no macro is
defined, the key number is transmitted with code letters. The release of the key is not transmitted. If
the release of the key is to be transmitted as well, this can be done by defining matrix macro no. 0.
Note If the CTS handshake line does not permit transmission, up to 8 keystrokes are stored in the
key buffer. When the buffer is full, older keystrokes may be lost.
Determining the key number:
Key no. = (output no. - 1) * no. of inputs + no. of outputs
(output = MOx, input = MIx).
Example: Connection of 4 keys in 3 variations
- Variant 1:
The 4 keys are defined as a 2x2 matrix by means of the ‘ESC Y M 2 2 ..’ command.
The keys are connected to 2 inputs (MI1, MI2) and 2 outputs (MO1, MO2). The
outputs are decoupled from each other by means of diodes so that double
keystrokes can be identified. There are 6 inputs and 6 outputs available as port
connections.
- Variant 2:
The 4 keys are defined as a 1x4 matrix by means of the ‘ESC Y M 1 4 ..’ command.
The keys are connected to 4 outputs (MO1, MO2) and read in via input MI1. There
are 7 inputs and 4 outputs available as port connections.
- Variant 3:
If only one output is used (4x1 matrix), the keys can also be connected to ground
and read in directly at the inputs (= 4x0 matrix). The 4 keys are defined at the 4
inputs (MI1..MI4) by means of the ‘ESC Y M 4 0 ..’ command. There are 4 inputs
and 8 outputs available as port connections.
Type 1: 2x2 Matrix
Type 2: 1x4 Matrix
Type 3: 4x0 Matrix
5
EA KIT320-8
CONNECTION FOR DOT-MATRIX DISPLAY
You can connect a single external dot-matrix module (with
HD44780 or compatible) with 1x8 up to 4x20 or 2x40
characters at eyelets J6 and J7. This dot-matrix display
can be addressed very conveniently by means of ‘ESC T
xx’ terminal commands. Alternatively, ‘ESC L xx’
commands are available for controlling the HD44780
directly. A potentiometer for contrast adjustment is already
fitted. A suitable series resistor RLED can be fitted for LED
backlighting.
MACRO PROGRAMMING
Dotmatrix Connector J6 + J7
Pin Symbol Pegel Description
1
VSS
L
0V, Ground
2
VDD
H
+5V Supply
3
VEE
Display voltage 0V-5V
4
RS
H / L Register Select
5
R/W
H / L H: Read / L: Write
6
E
H
Enable
7
D0
H / L Data 0 (LSB)
8
D1
H / L Data 1
9
D2
H / L Data 2
10
D3
H / L Data 3
11
D4
H / L Data 4
12
D5
H / L Data 5
13
D6
H / L Data 6
14
D7
H / L Data 7 (MSB)
15
A
Anode (RLED)
16
K
L
Kathode (=VSS)
Single or multiple command sequences can be grouped
together in macros and stored in the data flash. You can
then start them by using the Run macro commands. There
are different types of macro:
Normal macros (0..255)
These are started by means of an ‘ESC MN xx’ command via the serial interface or from another
macro. A series of macros occurring one after the other can be called cyclically (movie, hourglass,
multi-page help text). These automatic macros continue to be processed until a command is received
via RS-232 or another macro is activated (e.g. touch, port or matrix macro).
Touch macro (1..255)
Started when you touch/release a touch field (only in versions with a touch panel - TP) or issue an
‘ESC MT xx’ command.
Menu macro (1..255)
Started when you choose a menu item or issue an ‘ESC MM xx’ command.
Bit macro (1..8) or (9..16)
Started when a voltage is applied/changed at individual inputs IN 1..8 (bitwise) or by means of an
‘ESC MB xx’ command. Bit macros 1..8 respond to a rising edge, whereas bit macros 9..16 respond
to a falling edge of inputs 1..8.
Port macro (0..255)
Started when a voltage is applied/changed at the 8 inputs IN 1..8 (binary combined) or by means of
an ‘ESC MP xx’ command.
Matrix macro (0..64)
Matrix macro 1..64: Started when you press a key or issue an ‘ESC MX xx’ command.
Matrix macro 0: Started on release when a key is no longer depressed or by means of a command.
The matrix keyboard is connected at the inputs and outputs; a single 8x8 matrix keyboard can be
connected at most.
Power-on macro
Started after power-on. You can switch off the cursor and define an opening screen, for example.
Reset macro
Started after an external reset or after a voltage drop under 4.7V (VDD-VSS).
Watchdog macro
Started after a fault/error (e.g. failure).
Important: If a continuous loop is programmed in the power-on, reset or watchdog macro, the
display can no longer be addressed. In this case, the only thing you can do is: DIP switch 5
to ON, power-off, power-on and then DIP 5 to OFF. The macros then have to be read in again.
6
EA KIT320-8
256 IMAGES STORED IN THE INTERNAL DATA FLASH
To reduce the transmission times of the serial interface or to save storage space in the processor
system, up to 256 images can be stored in the internal data flash. They can be called using the „ESC
U I“ command or from within a macro. All images in the Windows BMP format (monochrome images
only) can be used. They can be created and edited using widely available software such as Windows
Paint or Photoshop (only black and white = 1 bit).
CREATING INDIVIDUAL MACROS
To create your own macros, you need the following:
- The EA DISK320*) floppy disk, which contains a compiler, examples and fonts
- A PC with a COM1 or COM2 serial interface and approximately 500KB of hard disk space
- A text editor such as WordPad or Textpad
To define a sequence of commands as a macro, all the commands are written to a file on the PC (e.g.
DEMO.KMC). You specify which character sets are to be integrated and which command sequences
are to be in which macros.
Once the macros are defined, you start the program C:>KITCOMP DEMO.KMC. This creates a data
flash file called DEMO.DF, which is then automatically stored in the data flash with the baud rate
entered. This only takes a few seconds, and you can then use your user-defined macros immediately.
You will find a detailed description of how to program macros, together with examples, in the files
DOKU.DOC (for WORD) and DOKU.TXT (DOS) on the EA DISK320*) floppy disk.
WRITE PROTECTION FOR MACRO PROGRAMMING
PCB Rev.C and newer: by setting DIP switch 6 (write enable) to OFF, you can prevent the programmed
macros, images and fonts from being overwritten inadvertently. After successful programming, this DIP
switch 6 should be set to OFF.
(Caution: On older PCB boards Rev.A and Rev.B (before 2002) DIP switch 6 had reverse meaning:
ON=write protect; OFF=programming possible)
*)
also available at http://www.lcd-module.de/deu/disk/disk320.zip
7
EA KIT320-8
internal Font 1: 4x6 monospaced
internal Font 2: 5x6 monospaced
internal Font 3: 6x8 monospaced
internal Font 4: 8x8 monospaced
internal Font 5: 7x12 monospaced
internal Font 6: 8x16 monospaced
8
EA KIT320-8
INTEGRATED AND EXTERNAL FONTS
There are 6 monospaced character sets integrated as standard that can be used in terminal and
graphics mode. Each character set can be increased in height from 1 to 8 times in graphics output.
Independently of this, the width can also be increased two to eight times.
Each character can be positioned with pixel accuracy. Text and graphics can be combined as
required. Several different font sizes can also be displayed together.
Each text can be output left justified, right justified or centered. Rotation in 90° steps is also possible
(for vertical installation of the display, for example).
Macro programming permits a further 10 fonts to be integrated. Proportional character sets are also
possible (in graphics mode only); these look better and take up less space on the screen. All
conceivable fonts up to 255x240 pixels in size can be created using a text editor and programmed
in using the kit compiler.
e.g. external Font 10: GENEVA15.FXT proportional
e.g. external Font 7: CHICAGO.FXT proportional
TIP: FONT EFFECTS
FONT EXAMPLES
With large fonts, you can use the command 'ESC ZM' mode
(link, pattern) to produce interesting effects through
overlaying (writing and offsetting a word several times).
This hardcopy shows 6 internal and 8
external fonts.
Original font 8x16 with ZOOM 3
at position 0,0 without pattern
Overlaying (EXOR) of the
"outline font" at pos. 2,2. results
in an "outline font with fill"
"Outline font" produced by
overlaying (EXOR) at pos. 1,1
Overlaying (OR) with 50% gray
pattern of the "outline font" at pos.
0,0. results in a "font with pattern fill"
9
EA KIT320-8
ALL FUNCTIONS AT A GLANCE
EA KIT320: Command table 1
Command
Codes
Remarks
After
reset
Comands for outputting strings
Output string L: left
justified, C: centered R:
right justified
Set font
Font zoom factor
Add. line spacing
Text angle
Text mode
Text pattern
String for terminal
L
ESC
ESC
Z
Z
C
R
F
xx1 yy1
Z
n1
A string (...) is output to xx1,yy1. ´NUL´ ($00), 'LF' ($0A) or 'CR' ($0D) = end of string;
several lines are separated by the character '|' ($7C); text between two '~' ($7E)
characters flashes on/off; text between two '@' ($40) characters flashes inversely;
text
NUL
...
n1
Set font with the number n1 (1..16)
n2
n1 = X zoom factor (1x..8x); n2 = Y zoom factor (1x..8x)
Y
n1
Insert n1 pixels between two lines of text as additional line spacing
W
n1
Text output angle: n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;
V
n1
Mode n1: 1=set; 2=delete; 3=inverse; 4=replace; 5=inverse replace;
M
n1
Link text with pattern no. n1; 0 = do not link text with pattern
T
text ...
5
1,1
0
4
0
Command for outputting a string in a macro to the terminal
Draw straight lines and points
Draw rectangle
Draw straight line
Continue straight line
Draw point
Point size/line thickness
Graphic mode
Pattern
ESC
G
R
xx1 yy1 xx2 yy2
Draw four straight lines as a rectangle from xx1,yy1 to xx2,yy2
D
xx1 yy1 xx2 yy2
Draw straight line from xx1,yy1 to xx2,yy2
W
xx1 yy1
Draw a straight line from last end point to xx1, yy1
P
xx1 yy1
Set one point at coordinates xx1, yy1
Z
V
n1
n1
n1 = X point size (1..15); n2 = Y point size (1..15);
Set drawing mode n1: 1=set; 2=delete; 3=inverse;
M
n1
n2
Set straight line/point pattern no. n1; 0 = do not use pattern
0
1,1
1
0
Change/draw rectangular areas
Delete area
Invert area
Fill area
Area with fill pattern
Draw box
Draw frame
Draw frame box
ESC
R
L
xx1 yy1 xx2 yy2
Delete an area from xx1,yy1 to xx2,yy2 (all pixels out)
I
xx1 yy1 xx2 yy2
Invert an area from xx1,yy1 to xx2,yy2 (invert all pixels)
S
xx1 yy1 xx2 yy2
M
O
xx1 yy1 xx2 yy2
xx1 yy1 xx2 yy2
n1 Draw an area from xx1,yy1 to xx2,yy2 with pattern n1 (always set)
n1 Draw a rectangle xx1,yy1 to xx2,yy2 with fill pattern n1 (always replace)
R
xx1 yy1 xx2 yy2
n1 Draw a frame of the type n1 from xx1,yy1 to xx2,yy2 (always set)
T
xx1 yy1 xx2 yy2
Fill an area from xx1,yy1 to xx2,yy2 (all pixels on)
n1 Draw a frame box of the type n1 from xx1,yy1 to xx2,yy2 (always replace)
Bitmap image commands
Image from clipboard
Load internal image
Load image
Image zoom factor
Image angle
Image link mode
Image pattern
ESC
U
Image flashing attribute
Send hard copy
ESC
C
xx1 yy1
The current contents of the clipboard are loaded to xx1,yy1 with all the image
attributes
Load internal image with the no. (0..255) from EEPROM to xx1,yy1
I
xx1 yy1
L
xx1 yy1
nr
Z
n1
W
V
n1
n1
Output angle: n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;
Mode n1: 1=set; 2=delete; 3=inverse; 4=replace; 5=inverse replace;
M
n1
B
n1
Link image with pattern no. n1; 0 = do not link image with pattern
n1=0 image attribute flashing off; n1=1 image flashes on/off; n1=2 image flashes
inversely;
A full image is requested in Windows BMP format. The image header is sent first via
RS232, followed by the actual image data (9662 bytes).
data ...
n2
Load an image to xx1,yy1; see image structure for image data
n1 = X zoom factor (1x..8x); n2 = Y zoom factor (1x..8x)
H
1,1
0
4
0
0
Display commands (effect on the entire display)
Delete display
Invert display
Fill display
Switch display off
ESC
D
L
Delete display contents (all pixels off)
I
Invert display contents (invert all pixels)
S
Fill display contents (all pixels on)
Display contents become invisible but are retained, commands continue to be
possible
Display contents become visible again
n1=0: Display outputs are no longer visible (but continue to be executed) n1=1:
Display outputs are visible immediately n1=2: Refresh display contents (previous
outputs become visible)
A
Switch display on
E
Display update
U
n1
Run macro
Run touch macros
Run port macro
Run bit macro
Run menu macro
Run matrix macro
Autom. macro cyclical
Autom. macro pingpong
N
T
n1
n1
Call the (normal) macro with the number n1 (0..255) (max. 7 levels)
Call the touch macro with the number n1 (0..255) (max. 7 levels)
P
n1
Call the port macro with the number n1 (0..255) (max. 7 levels)
B
n1
Call the bit macro with the number n1 (1..16) (max. 7 levels)
M
n1
Call the menu macro with the number n1 (0..255) (max. 7 levels)
X
n1
A
J
n1
n1
B
xx1 yy1 xx2 yy2
Define a flashing area (on/off) from xx1,yy1 to xx2,yy2
I
xx1 yy1 xx2 yy2
Define an inverted flashing area from xx1,yy1 to xx2,yy2
L
xx1 yy1 xx2 yy2
Delete the flashing attribute from xx1,yy1 to xx2,yy2
Z
n1
Set the flashing time n1= 1..15 in 1/10s; 0=deactivate flashing function
On
1
Macro commands
ESC
M
Call the matrix macro with the number n1 (0..64) (max. 7 levels)
n2
n2
n3
n3
Automatically process macros n1..n2 cyclically; n3=pause in 1/10s
Automatically process macros n1..n2..n1 (pingpong); n3=pause in 1/10s
Flashing area commands
Define flashing area
Inverted flashing area
Delete flashing attribute
Set flashing time
10
ESC
Q
6
EA KIT320-8
DEFAULT SETTINGS
After power on or a reset, some functions are set to a particular value (see last column entitled ‘After
reset’ in the table). Please note that all the settings can be overwritten by creating a power-on macro.
EA KIT320: Command table 2
Command
Codes
After
reset
Remarks
Bar graph commands
Update bar graph
Draw new bar graph
Send bar graph value
A
Define bar graph to L(eft), R(ight), O(ben) (up), U(nten) (down)
with the "nr" n1. xx1,yy1,xx2,yy2 form the rectangle enclosing No
n1 xx1 yy1 xx2 yy2 sv ev Typ. pat the bar graph. sv, ev are the values for 0% and 100%. Type=0:bar
bar; type=1: bar in rectangle; pat=bar pattern type=2: line;
define
type=3: line in rectangle; pat= line width
n1 valu
Set and draw the bar graph with the number n1 to the new user "value."
Z
S
n1
n1
Select clipboard no.
Save display contents
Save area
Restore area
Copy area
N
n1
2 clipboards are available, the current clipboard is selected with n1= (1,2).
xx1 yy1 xx2 yy2
The entire contents of the display are copied to the clipboard as an image area
The image area from xx1,yy1 to xx2,yy2 is copied to the clipboard
Define bar graph
ESC
B
R
L
O
U
Draw the bar graph with the number n1 completely
Send the current value of bar graph no. n1 on the serial interface
Clipboard commands (buffer for image areas)
ESC
C
B
S
R
K
1,blan
The image area on the clipboard is copied back its original position in the display
xx1 yy1
The image area on the clipboard is copied to xx1,yy1 in the display
Menu/pop-up commands
Define menu and display
D
Next item
Previous item
N
P
End of menu/send
ESC
N
xx1 yy1
nr
A menu is drawn as of the corner xx1,yy1 with the current menu font. nr:= currently
inverted entry (e.g.: 1 = 1st entry) Text:= string with menu items. The different items
text
NUL are separated by the character '|' ($7C,dec:124) (e.g. "item1|item2|item3"). The
...
background of the menu is saved automatically. If a menu is already defined, it is
automatically canceled+deleted.
The next item is inverted or remains at the end
The previous item is inverted or remains at the beginning
The menu is removed from the display and replaced with the original background.
The current item is sent as a number (1..n) (0=no menu displayed)
The menu is removed from the display and replaced with the original background.
Menu macro n1 is called for item 1, menu macro nr+1 for entry 2, and so on
The menu is removed from the display and replaced with the original background
S
End of menu/macro
M
End of menu/cancel
Set menu font
Menu font zoom factor
Add. line spacing
Menu angle
A
n1
F
n1
Z
Y
n1
n1
W
n1
Set font with the number n1 (1..16) for menu display
n2
n1 = X zoom factor (1x..8x); n2 = Y zoom factor (1x..8x)
Insert n1 pixels between two menu items as additional line spacing
5
1,1
0
Menu display angle: n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;
Port commands
Write output port
W
n1
Read input port
R
n1
A
I
n1
n1
Matrix keyboard
M
n1
Illumination on/off/half
L
n1
Port scan on/off
Invert input port
ESC
Y
n1=0: Set all 8 output ports in accordance with n2 (=8-bit binary value) n1=1..8:
Reset output port n1 (n2=0); set (n2=1); invert (n2=2)
n2
n2
Ports
1-8=0
n1=0: Read all 8 input ports as 8-bit binary value n1=1..8: Read input port <n1> (1=H
level=5V, 0=L level=0V)
The automatic scan of the input port is n1=0: deactivated; n1=1: activated
1
The input port is n1=0: normal; n1=1: evaluated inverted
0
Specifies an external matrix keyboard at the inputs and outputs. n1=number of inputs
0
(1..8); n2=number of outputs (0..8); n3= debouncing (0..7)
CFL/LED illumination n1=0: OFF; n1=1: ON; n1=2: half brightness;
1
n3
Other commands
Wait (pause)
Beep on/off
ESC
ESC
X
J
Send bytes
ESC
S
B
Send analog value
Send version
ESC
S
D
Wait n1 tenths of a second before the next command is executed.
n1=1..255: Tone on for n1 1/10s
OFF
num (=1..255) bytes are sent on the RS-232/RS-422 data ... = num bytes (e.g. control
of an external serial printer)
The current value of the analog input AIN is sent on the RS-232/RS-422
ESC
S
V
The software version no. + date is sent as a string on the RS-232/RS-422
ESC
L
Commands to HD44780 *)
Data to HD44780 *)
Read EEPROM
num
data ...
B
num
data ...
num (=1..255) commands are sent to the ext. dot-matrix module with HD44780.
D
num
data ...
num (=1..255) data is sent to the ext. dot-matrix module with HD44780.
num (=1..255) bytes are requested from the internal user EEPROM as of the address
addr and sent via the RS-232/RS-422.
num (=1..255) bytes are written to the internal user EEPROM as of the address addr.
data ... = num bytes
num (=1..255) bytes are requested from the block on the I2C bus with the device
address addr and sent via the RS-232/RS-422.
num (=1..255) bytes are sent on the 12C bus for the block with the device address
addr. data … = num bytes
R addr num
ESC
E
Write EEPROM
W addr num
Read I2C bus
data ...
R addr num
ESC
Write I2C bus
n1
n1
I
W addr num
data ...
*)
Only for Version 1.1 and higher
11
EA KIT320-8
EA KIT320: Commands for the touch panel
Command
Codes
After
reset
Remarks
Touch: Define areas
C
Define touch key
(key remains depressed as
long as there is contact)
ESC
A
T
U
Define touch switch
(status of the switch
toggles after each contact
on/off)
G
ESC
A
K
J
'C': The touch fields f1 to f2 are defined for a key. 'T': The area from
xx1,yy1 to xx2,yy2 is defined as a key. 'U': Image no. n1 is loaded to
xx1,yy2 and defined as a key. 'down code':(1-255) Return/touch
macro when key pressed. 'up code': (1-255) Return/touch macro
when key released. (down/up code = 0 press/release not reported).
´text´: A string that is centered with the current touch font in the touch
down up
text
xx1 yy1 xx2 yy2
NUL key follows; multiline text is separated with the character '|' ($7C,
code code ...
dec: 124); 'NUL': ($00) = end of string
down up text
xx1 yy1 n1
NUL
f1
f2
down up
code code
text
NUL
...
code code
...
'G': The touch fields f1 to f2 are defined for a switch. 'K': The area
from xx1,yy1 to xx2,yy2 is defined as a switch. 'J': Image no. n1 is
f1
f2
loaded to xx1,yy2 and defined as a switch. 'down code': (1-255)
Return/touch macro when switched on. 'up code': (1-255)
Return/touch macro when switched off. (down/up code = 0 on/off not
reported). ´text´: A string that is centered with the current touch font
down up
text
xx1 yy1 xx2 yy2
NUL in the touch key follows; multiline text is separated with the character
code code ...
'|' ($7C, dec: 124); 'NUL': ($00) = end of string
down up text
xx1 yy1 n1
NUL
down up
code code
text
NUL
...
code code
...
Define touch key with menu
function
ESC
A
M
The area from xx1,yy1 to xx2,yy2 is defined as a menu key.
'down code':(1-255) Return/touch macro when pressed. 'up
Code':(1-255) Return/touch macro when menu canceled 'mnu
Code':(1-255) Return/menu macro+(item no. 1) after selection
of a menu item. (down/up code = 0 activation/cancellation of
down up mnu text
xx1 yy1 xx2 yy2
NUL the menu not reported). 'text':= string with the menu key text
code code code ...
and the menu items. The different items are separated by the
character '|' ($7C,dec:124) (e.g. "key|item1|item2|item3". The
key text is drawn with the current touch font and the menu
items are drawn with the current menu font. The background of
the menu is saved automatically.
Define drawing area
ESC
A
D
xx1 yy1 xx2 yy2
Define free touch area*)
ESC
A
H
xx1 yy1 xx2 yy2
Set bar by touch
ESC
A
B
nr
E
n1
The frame type for the display of touch keys/switches is set with n1
I
n1
Automatic inversion when touch key touched: n1=0=OFF; n1=1=ON;
S
N
n1
Code
Tone sounds briefly when a touch key is touched: n1=0=OFF; n1=1=ON
The touch key with the assigned return code is inverted manually
n1
A drawing area is defined. You can then draw with a line width of n1 within the corner
coordinates xx1,yy1 and xx2,yy2.
A freely usable touch area is defined. Touch actions (down, up and drag) within the
corner coordinates xx1,yy1 and xx2,yy2 are sent via RS232.
The bar graph with the no. n1 is defined for input by touch panel.
Touch: settings
Touch frame
Touch key response
Invert touch key
Query touch switch
Set touch switch
1
1
1
X
Code
The status of the switch (off=0; on=1) is sent via the serial interface.
P
Code n1
Delete touch area
L
Code n1
Send bar value on/off
Q
n1
Touch query on/off
A
n1
The status of the switch is changed by means of a command n1=0=off; n1=1=on.
The touch area with the return code (code=0: all touch areas) is removed from the
touch query. When n1=0, the area remains visible on the display; when n1=1, the
area is deleted from the display.
Automatic transmission of a new bar graph value by touch input is deactivated (n1=0)
1
or activated (n1=1)
Touch query is deactivated (n1=0) or activated (n1=1)
1
Label font
Label zoom factor
Add. line spacing
Label angle
F
Z
n1
n1
Y
n1
Insert n1 pixels between two lines of text as additional line spacing
W
n1
Text output angle: n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;
ESC
A
Touch: Label font
ESC
A
n2
Set font with the number n1 (1..16) for touch key label
n1 = X zoom factor (1x..8x); n2 = Y zoom factor (1x..8x)
*)
5
1,1
0
Only for Version 1.1 and higher
TOUCH PANEL ADJUSTMENT
The EA KIT320-8xxTP has an analog, resistive touch panel. This touch panel is perfectly adjusted
and immediately ready for operation on delivery. As a result of aging and wear, it may become
necessary to readjust the touch panel.
Adjustment procedure:
1. Touch the touch panel at power-on and keep it depressed. After the message „touch adjustment?“
appears, release the touch panel. Alternative to that issue the ‘ESC @’ command.
2. Touch the touch panel (again) within a second for at least one second.
3. Follow the instructions for adjustment (press 2 the points upper left and lower right).
12
EA KIT320-8
EA KIT320: Command table for terminal mode
Command
Codes
Remarks
After
reset
Commands for terminal mode
FF: Form feed (dec:12)
CR: carriage return (d:13)
LF: line feed (dec:10)
Position cursor
^L
The contents of the terminal area are deleted and the cursor is placed at pos. (1,1)
^M
Cursor to the beginning of the line on the extreme left
^J
Cursor is set to the next line
n1
Cursor on/off
C
n1
n1=0: Cursor is invisible; n1=1: Cursor flashes;
1
Terminal mode
M
n1
n1=0: Clear mode; n1=1: Overwrite mode; n1=2: Scroll mode
2
Z
n1
The automatic line feed is switched on (n1=1) or off (n1=0)
1
ESC
Autom. line feed
Terminal invisible
Terminal visible
T
n2
n1=column; n2=line; origin upper-left corner (1,1)
1,1
P
A
Terminal display not visible; outputs continue to be executed
E
Terminal display is visible again;
On
Redirect terminal outputs
Suppress terminal
Terminal output internal
Terminal output external
ESC
N
ASCII characters,FF,CR,LF are suppressed. Commands (ESC T) are executed
I
All terminal outputs/commands affect the internal terminal of the EA KIT320
X
All terminal outputs/commands affect the external dot-matrix module
T
Intern
Settings for the internal terminal
Set font
Add. line spacing
ESC
n1
Set font no. n1 (1..16) for terminal mode (monospaced fonts only)
Y
n1
W
xx1 yy1 xx2 yy2
n1 pixels are defined additionally for the current font as the line spacing
The terminal output is executed only within the window from xx1,yy1 (=upper-left
0..319
corner) to xx2,yy2 (=lower-right corner); xx=0..319; yy=0..239; w=angle (0=0°; 1=90°;
0..239
2=180°; 3=270°) of the terminal display
T
Define window
5
F
w
Settings for the external dot-matrix module (optionally to J6 or J7)
Initialize dot-matrix module
ESC
T
D
n1
n2
Initialize an external dot-matrix display (HD44780 compatible) - n1 = number of
characters; n2 = number of lines
Responses of the EA KIT320 via the serial interface
Id
num
data
Remarks
Automatic response from the KIT320
ESC
A
1
code
Response from the analog touch panel when a key/switch is pressed. code =
down or up code of the key/switch. Only transmitted if no touch macro is
defined with the "down code" !
ESC
N
1
code
After a menu item is selected by touch, the selected menu item code is
transmitted. Only transmitted if no touch macro is defined with the no. code !
ESC
P
1
value
ESC
M
1
nr
ESC
B
2
nr
value
ESC
H
5
Typ.
xLO
ESC
N
1
nr
ESC
B
2
nr
value
ESC
X
2
code
value
ESC
Y
2
nr
value
ESC
D
2
ESC
E
num
ESC
I
num
xHI
yLO
yHI
After the input port is changed, the new 8-bit value is transmitted. The
automatic port scan must be activated. See the 'ESC Y A n1' command. It is
only transmitted when there is no port macro defined with the no. value!
When a keystroke of the external matrix keyboard is detected, the newly
pressed key number nr is transmitted. Only transmitted if no touch macro is
defined with the no. nr!
When a bar graph is set by touch, the current value of the bar is transmitted
with nr. Transmission of the bar balue must be activated (see the 'ESC A Q n
command).
*) The following is transmitted in the case of a free touch area event: type=0
release; type=1 is touch; type=2 is drag within the free touch area at the x,y
coordinates (16-bit values)
Response only when requested by command
LO-byt HI-byt
value value
data ...
data ...
After the 'ESC N S' command, the currently selected menu item is transmitted
nr=0: no menu item is selected.
After the 'ESC B S n1' command, the current value of the bar is transmitted w
nr.
After the 'ESC A X' command, the current status of the touch switch is
transmitted with code (the return code). value = 0 or 1
After the 'ESC Y R' command, the requested input port is transmitted. nr=0:
value is an 8-bit binary value of all 8 inputs. nr=1..8: value is 0 or 1 dependin
on the status of the input nr
After the 'ESC S D' command, the current analog value (max. 1/2 VDD) from
the AIN input. (value = 0..1023 corresponds approximately to 0..2.5V)
After the 'ESC E R addr num' command, the requested bytes are transmitted
from the user EEPROM.
After the 'ESC I R addr num' command, the requested bytes are transmitted
from the 12C bus.
Response without ESC and length specification (num)
B
M
E
A
+ 9660 bytes of image data
String ..
After the 'ESC H' command, 9662 bytes bytes are transmitted (=320x240 BM
image). The first two bytes of the BMP image always begin with 'BM'
After the 'ESC S V' command, the version of the KIT firmware is transmitted a
NUL a string (end code is the character NUL = $00). The first two bytes of the strin
always begin with 'EA'
13
EA KIT320-8
TERMINAL MODE
When you switch the unit on, the cursor flashes in the first line, indicating that the display is ready for
operation. All the incoming characters are displayed in ASCII format on the terminal (exception:
CR,LF,FF,ESC,’#’). Line breaks are automatic or can be executed by means of the ‘LF’ character.
If the last line is full, the contents of the terminal scroll upward. The ‘FF’ character (page feed) deletes
the contents of the terminal display and positions cursor in the upper-left corner.
The terminal has its own layer for display and is thus completely independent of the graphical output;
moreover, the size of the terminal window can be freely defined. If the graphics screen is deleted with
‘ESC DL’, for example, that does not affect the contents of the terminal window (the terminal level is
deleted with ‘FF’).
The character ‘#’ is used as an escape character (see below) and thus cannot be displayed directly
on the terminal. If the character ‘#’ is to be output on the terminal, it must be transmitted twice: ‘##’.
COMMAND TRANSFER/PARAMETERS
The operating unit unit can be programmed by means of various integrated commands. Each
command begins with ESCAPE followed by one or two command letters and then parameters.
There are two ways to transmit commands:
1. ASCII mode
- The ESC character corresponds to the character ‘#’ (hex: $23, dec: 35).
- The command letters come directly after the ‘#’ character.
- The parameters are transmitted as plain text (several ASCII characters) followed by a separating
character (such as a comma ‘,’).
- Strings (text) are written directly without quotation marks and concluded with CR (hex: $0D) or LF
(hex: $0A).
2. Binary mode
- The escape character corresponds to the character ESC (hex: $1B, dec: 27).
- The command letters are transmitted directly.
- The coordinates xx and yy are transmitted as 16-bit binary values (fiirst the LOW byte and then
the HIGH byte).
- All the other parameters are transmitted as 8-bit binary values (1 byte).
- Strings (text) are concluded with CR (hex: $0D) or LF (hex: $0A) or NUL (hex: $00).
No separating characters, such as spaces or commas, may be used in binary mode. The commands
require no final byte, such as a carriage return (apart from the string $00).
14
EA KIT320-8
PROGRAMMING EXAMPLE
In the following example you can see how the string „Test“ can be output left justified at the
coordinates 117,32.
Example
for terminal.exe
for Turbo-Pascal
for ´C´
for Q-Basic
Example
in ASCII
in Hex
in Decimal
Codes can be output in ASCII mode
#ZL117, 32,Test
<Return>
write(aux, '#ZL117, 32,Test', chr(13) );
fprintf(stdaux, "#ZL%d,%d,%s\x0D", 117, 32, "Test");
OPEN "COM1:9600,N,8,1,BIN" FOR RANDOM AS #1
PRINT #1,"#ZL117,32,Test"+CHR$(13)
Codes can be output in binary mode
NUL
space
NUL
NUL
Z
L
u
T
e
s
t
$1B $5A $4C $75 $00 $20 $00 $54 $65 $73 $74 $00
27 90 76 117 0
32
0
84 101 115 116 0
ESC
for Turbo-Pascal
for ´C´
write(aux, chr(27), 'Z', 'L', chr(117), chr(0), chr(32), chr(0), 'Test', chr(0));
for Q-Basic
OPEN "COM1:9600,N,8,1,BIN" FOR RANDOM AS #1
PRINT #1,CHR$(27)+"ZL"+CHR$(117)+CHR$(0)+CHR$(32)+CHR$(0)+"Test"+CHR$(0)
fprintf(stdaux, "\x1BZL%c%c%c%c%s\x00", 117, 0, 32, 0, "Test");
FRAMES AND KEY FORMS
A frame type can be set by using the Draw frame or Draw frame box command or by drawing touch
keys. There are 16 internal frame
types available; in addition, some
frame types can be integrated by
means of the kit compiler.
PATTERN
A pattern type can be set as a parameter with some commands. In this way, rectangular areas, bar
graphs and even text can be filled with
different patterns. There are 16
internal fill patterns available; in
addition, some fill patterns can be
integrated by means of the kit
compiler.
15
EA KIT320-8
DIMENSIONS W/O TOUCH PANEL
all dimensions are in mm
DIMENSIONS WITH TOUCH PANEL
all dimensions are in mm
FRONTPANEL EA 0FP320-8
PANEL CUT OUT
all dimensions are in mm
ZEPPELINSTRASSE
19 · D- 82 205 GILCHING
PHONE +49-8105-778090· FAX +49-8105-778099· http://www.lcd-module.de
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
ELECTRONIC ASSEMBLY:
EA KIT320-8CTP
Similar pages