EA eDIPTFT43-A compiler help - Electronic Assembly
EA eDIPTFT43-A compiler help - Electronic Assembly
EA eDIPTFT43-A compiler help - Electronic Assembly
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>EA</strong> <strong>eDIPTFT43</strong>-A<br />
<strong>compiler</strong> manual<br />
Januar 2012<br />
© ELECTRONIC ASSEMBLY GmbH
2<br />
Table of Contents<br />
1 Overview<br />
2 Syntax rules<br />
3 Compiler Functions<br />
4 Compiler Options<br />
4.1 General ................................................................................................................................... 8<br />
4.2 Transfer ................................................................................................................................... 9<br />
4.3 String ................................................................................................................................... 10<br />
4.4 Fonts ................................................................................................................................... 11<br />
Font<br />
WinFont<br />
LogFontWidth<br />
ExportOverview<br />
ExportWinfont<br />
.......................................................................................................................................................... 11<br />
.......................................................................................................................................................... 12<br />
.......................................................................................................................................................... 13<br />
.......................................................................................................................................................... 14<br />
.......................................................................................................................................................... 15<br />
4.5 Bitmaps ................................................................................................................................... 16<br />
MaxSize<br />
MaxColorDepth<br />
Dithering<br />
MakeTransparent<br />
RemoveBorder<br />
AlphaThreshold<br />
DoGamma<br />
DoRLE<br />
Compress<br />
Pattern<br />
Border<br />
Button<br />
4.6 Macros<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Picture<br />
Animation<br />
Instrument<br />
.......................................................................................................................................................... 16<br />
.......................................................................................................................................................... 17<br />
.......................................................................................................................................................... 18<br />
.......................................................................................................................................................... 19<br />
.......................................................................................................................................................... 20<br />
.......................................................................................................................................................... 21<br />
.......................................................................................................................................................... 21<br />
.......................................................................................................................................................... 21<br />
.......................................................................................................................................................... 21<br />
.......................................................................................................................................................... 22<br />
.......................................................................................................................................................... 23<br />
.......................................................................................................................................................... 24<br />
.......................................................................................................................................................... 24<br />
.......................................................................................................................................................... 25<br />
.......................................................................................................................................................... 26<br />
................................................................................................................................... 28<br />
ExportMacro<br />
SystemMacros<br />
Macro<br />
TouchMacro<br />
BitMacro<br />
PortMacro<br />
MatrixMacro<br />
ProcessMacro<br />
AnalogMacro<br />
5 <strong>EA</strong> <strong>eDIPTFT43</strong>-A commands<br />
.......................................................................................................................................................... 28<br />
.......................................................................................................................................................... 28<br />
.......................................................................................................................................................... 29<br />
.......................................................................................................................................................... 29<br />
.......................................................................................................................................................... 29<br />
.......................................................................................................................................................... 29<br />
.......................................................................................................................................................... 30<br />
.......................................................................................................................................................... 30<br />
.......................................................................................................................................................... 31<br />
5.1 Terminal ................................................................................................................................... 32<br />
5.2 Display ................................................................................................................................... 33<br />
5.3 Draw ................................................................................................................................... 34<br />
5.4 Text ................................................................................................................................... 36<br />
5.5 Bitmap ................................................................................................................................... 37<br />
5.6 Animation ................................................................................................................................... 38<br />
5.7 Bargraph ................................................................................................................................... 39<br />
5.8 Instrument ................................................................................................................................... 40<br />
5.9 Macros ................................................................................................................................... 41<br />
5.10 Touch ................................................................................................................................... 43<br />
4<br />
5<br />
6<br />
8<br />
32
5.11 Backlight ................................................................................................................................... 46<br />
5.12 Digital IO-Port ................................................................................................................................... 47<br />
5.13 Analogue ................................................................................................................................... Input<br />
48<br />
5.14 Other commands ................................................................................................................................... 50<br />
6 Default Fonts<br />
6.1 Terminal ................................................................................................................................... 8x8<br />
51<br />
6.2 Terminal ................................................................................................................................... 8x16<br />
52<br />
6.3 Font 4x6 ................................................................................................................................... 53<br />
6.4 Font 6x8 ................................................................................................................................... 54<br />
6.5 Font 7x12 ................................................................................................................................... 55<br />
6.6 Geneva 10 ................................................................................................................................... 56<br />
6.7 Chicago 14 ................................................................................................................................... 57<br />
6.8 Swiss 30 ................................................................................................................................... 58<br />
6.9 BigZif 50 ................................................................................................................................... 59<br />
6.10 BigZif 100 ................................................................................................................................... 60<br />
7 Default Colors<br />
8 G16FORMAT<br />
9 How-to-use<br />
Contents<br />
9.1 Factory Setting ................................................................................................................................... 67<br />
9.2 RS485 - Factory ................................................................................................................................... Setting<br />
68<br />
9.3 Place Strings ................................................................................................................................... - BEGINNER<br />
69<br />
9.4 Place Strings ................................................................................................................................... - EXPERT<br />
71<br />
9.5 Cyrillic font ................................................................................................................................... - BEGINNER<br />
73<br />
9.6 BMP file - ................................................................................................................................... BEGINNER<br />
74<br />
9.7 Animated ................................................................................................................................... gif - BEGINNER<br />
75<br />
9.8 3 simple touch ................................................................................................................................... buttons - BEGINNER<br />
76<br />
9.9 Glass button ................................................................................................................................... - EXPERT<br />
78<br />
9.10 Radio group ................................................................................................................................... - BEGINNER<br />
80<br />
9.11 Keypad - ................................................................................................................................... EXPERT<br />
82<br />
9.12 Free draw ................................................................................................................................... area - BEGINNER<br />
86<br />
9.13 Free draw ................................................................................................................................... area - EXPERT<br />
87<br />
9.14 Frame - BEGINNER ................................................................................................................................... 89<br />
9.15 Bargraph ................................................................................................................................... by touch - BEGINNER<br />
91<br />
9.16 Bargraph ................................................................................................................................... by touch - EXPERT<br />
93<br />
9.17 Instrument ................................................................................................................................... by touch - BEGINNER<br />
95<br />
9.18 Instrument ................................................................................................................................... by analogue input - BEGINNER<br />
96<br />
9.19 Instrument ................................................................................................................................... slide show - EXPERT<br />
97<br />
9.20 Languages/Macro ................................................................................................................................... Pages - BEGINNER<br />
101<br />
9.21 String tables ................................................................................................................................... - EXPERT<br />
103<br />
9.22 Analogue ................................................................................................................................... Macro - Beginner<br />
105<br />
9.23 Bit Macro ................................................................................................................................... - BEGINNER<br />
107<br />
9.24 Port Macro ................................................................................................................................... - EXPERT<br />
109<br />
9.25 Automatic ................................................................................................................................... Macro - EXPERT<br />
111<br />
9.26 Process ................................................................................................................................... Macro - BEGINNER<br />
113<br />
9.27 Change ................................................................................................................................... display orientation - BEGINNER<br />
115<br />
51<br />
61<br />
62<br />
65<br />
3
4<br />
1 Overview<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
General<br />
The <strong>EA</strong> <strong>eDIPTFT43</strong>-A is able to store many pictures, fonts and macros in internal FLASH memory.<br />
The <strong>EA</strong> KIT Editor is a powerful, free of charge software tool to create those macros and to store the<br />
pictures and fonts very easily.<br />
The <strong>EA</strong> KIT Editor combines 3 functions:<br />
- The editor itself which allows a simple definition of the macros, pictures and fonts like a standard text<br />
editor.<br />
- The <strong>compiler</strong> which translates the text into the uploading code and shows up syntax error.<br />
- The transmitter which search the right connection and uploads the data into the <strong>EA</strong> <strong>eDIPTFT43</strong>-A.
2 Syntax rules<br />
Syntax rules 5<br />
ESC The ESC character ($1B, 27d) is represented by the number sign '#'.<br />
The escape character must always be the first character in a line (except for<br />
tabs and spaces). This is followed by command letters and any parameters.<br />
Comma The comma is used to separate the parameters of a macro.<br />
Numbers All numbers are converted to binary values. Decimal, hexadecimal and binary<br />
numbers can be written.<br />
Example: 163(dez) = $A3(hex) = %10100011(bin)<br />
Comments Comments must begin with a semicolon.<br />
Example: ; this is a comment<br />
Text Text (strings) must be enclosed within quotation marks " " or ' '.<br />
It is possible to use Hex-values between curly brackets { }.<br />
ASCII numbers can also be entered directly.<br />
Example (output of "abc-def-xyz"): #ZL0,0,"abc",45,'def',{2D78797A}<br />
KitEditor: double click within the curly brackets or quotation marks opens a<br />
EditBox, use the mouse to select special characters.<br />
Please make sure that you have selected the correct font (right click on the font<br />
and 'Select Font for EditBox')<br />
Commands Command letters and parameters specified in the <strong>EA</strong> <strong>eDIPTFT43</strong>-A data sheet<br />
are valid. Two exceptions facilitate the creation of command lines:<br />
1.The is appended automatically by the <strong>compiler</strong>. This means<br />
commands in which a string is output, the no longer has to be entered<br />
as the end identifier.<br />
Example: #ZL 0,0,"Text"<br />
2.In the Send bytes command, the number of bytes to be sent is not specified;<br />
this number is calculated automatically by the <strong>compiler</strong>.<br />
Example: #SB 1,2,"Test"<br />
Constants Words without quotation marks are interpreted as numeric constants, which<br />
have to be defined first. The name of a constant can have be up to 60<br />
characters and must begin with a letter followed by letters, numbers or<br />
underscores. Up to 2000 constants can be defined.<br />
Please note that Compiler Options like e.g. INFO or MACRO can not be used.<br />
Example: CORNER_X=5;<br />
the word CORNER_X is replaced with immediate effect by the value 5.<br />
String Constants A string-constant is a constant name between two exclamation marks<br />
Example1: !NAME! = "example text"<br />
Example2: !NAME! = "abc",45,'def',{2D78797A}<br />
Upper / lower case No difference is made between upper case and lower case.
6<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
3 Compiler Functions<br />
Calculating The 4 basic mathematical operations +, -, * and / can be applied to numeric constants<br />
and numbers. Round brackets can be used, and multiplication and division come<br />
before addition and subtraction.<br />
Example: #RL X,Y, X+WIDTH, Y+HEIGHT<br />
following C-style operations are also possible:<br />
- pre/post increment and decrement: ++, --; e.g: ++a, b++, --c, d--<br />
- shift and bit operations: , &, |, ^<br />
- combined operators: *=, /=, +=, -=, =, &=, |=, ^=<br />
During compiling procedure all constants are calculated and transformed to fixed<br />
numbers.<br />
Functions During compiling procedure all functions are calculated and transformed to fixed<br />
numbers.<br />
Follwing functions are available:<br />
LO(value) returns the Low-Byte<br />
HI(value) returns the High-Byte<br />
MIN(value1,value2,...) returns the minimum value<br />
MAX(value1,value2,...) returns the maximum value<br />
AVG(value1,value2,...) returns the average value<br />
RANDOM(min,max)<br />
RANDOM(min,max,delta)<br />
returns a random value from the range min..max<br />
delta = maximum difference to the last random value<br />
SIN(w, a) COS(w, a) TAN(w, a)<br />
w = angle in tenth of degree<br />
a = max. amplitude<br />
to calculate the bounding box of images following functions are available:<br />
PICTURE_W(nr) PICTURE_H(nr) for<br />
Images<br />
PICTURE_W(nr, page) PICTURE_H(nr, page)<br />
BUTTON_W(nr) BUTTON_H(nr) for<br />
Touchbutt<br />
ons 24<br />
BUTTON_W(nr, page) BUTTON_H(nr, page)<br />
ANIMATION_W(nr) ANIMATION_H(nr) for<br />
Animation<br />
s 25<br />
ANIMATION_W(nr, page) ANIMATION_H(nr, page)<br />
INSTRUMENT_W(nr) INSTRUMENT_H(nr) for<br />
Instrumen<br />
ts 26<br />
INSTRUMENT_W(nr, page) INSTRUMENT_H(nr, page) (firmware<br />
V1.4)<br />
24
Example:<br />
String: 1, "Hello World"<br />
font = SWISS30B<br />
stringcode = 1<br />
zoomX = 1<br />
zoomY = 1<br />
addwidth = 3<br />
addheight = 5<br />
spacewidth = 0<br />
to calculate the bounding box of strings following functions are available:<br />
Compiler Functions 7<br />
STRING_W(nr, par, font) STRING_H(nr, par, font) for<br />
internal<br />
Strings 10<br />
STRING_W(nr, par, font, page) STRING_H(nr, par, font, page) (firmware<br />
V1.5)<br />
STRING_W(!NAME!,par,font) STRING_H(!NAME!,par,font) for<br />
Stringcon<br />
stants 5<br />
STRING_W(!NAME!,par,font,page) STRING_H(!NAME!,par,font,page)<br />
nr = internal string number (see <strong>compiler</strong> option STRING: 10 )<br />
font = font number (eDIP command #ZF 34 )<br />
par = STRING_P(zoomX, zoomY, width, height, space, code)<br />
this values needs the <strong>compiler</strong> to calculate the correct outline in functions STRING_W<br />
and STRING_H<br />
zoomX, zoomY = zoom factor 1..8 (eDIP command #ZZ 34 )<br />
width, height = additional width/height 0..15 (eDIP command #ZY 36 )<br />
space = spacewidth (eDIP command #ZJ) 36<br />
code = stringcode (eDIP command #ST 50<br />
)<br />
Makro: MnPowerOn<br />
#ST stringcode<br />
#ZY addwidth,addheight<br />
#ZJ spacewidth<br />
#ZF font<br />
#ZZ zoomX,zoomY<br />
#FZ YELLOW,TRANSPARENT<br />
par = STRING_P(zoomX,zoomY,addwidth,addheight,spacewidth,stringcode)<br />
w = STRING_W(1,par,font)<br />
h = STRING_H(1,par,font)<br />
x = (XPIXEL-w)/2<br />
y = (YPIXEL-h)/2<br />
#RF x,y, x+w-1, y+h-1, BLUE<br />
#ZL x,y, stringcode,2<br />
String Functions A string-function converts a value into a string constant the function is between two<br />
exclamation marks. Following functions are available:<br />
!STR(value, digits)! for decimal numbers<br />
!HEXSTR(value, digits)! for hexadecimal numbers<br />
!BINSTR(value, digits)! for binary numbers<br />
digits = 0: variable length<br />
digits > 0: fix numbers of digits with leading zeros<br />
digits < 0: fix numbers of digits with leading spaces
8<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
4 Compiler Options<br />
4.1 General<br />
<strong>eDIPTFT43</strong>-A "title" Defines <strong>EA</strong> <strong>eDIPTFT43</strong>-A as target. "title" is a short description for the<br />
project. It is shown on the display when uploading the FLASH memory<br />
of the module. "title" can be read out by the command "ESC S J".<br />
Max. 32 character will be stored; more are allowed but will be<br />
suppressed.<br />
DESTINATION Specifies a new file name for the DATA-FLASH upload file. Optionally<br />
you can choose another path for the destination file.<br />
INCLUDE Includes the contents of the file to be used in this actual file.<br />
This makes it possible to divide a project up into a number of source<br />
files. The file should have the extension *.kmi.<br />
PATH Sets a new path to find the following files.<br />
CODETABLE: nr A code table is useful adapt different ASCII tables. With that, the<br />
ASCII code can be changed for some single character (e.g. "ä", "ß").<br />
Up to 255 different code tables nr (1..255) can be defined.<br />
nr = 0 will disable all conversion.<br />
Example:<br />
CodeTable: 1 ; use codetable 1 for *.FXT fonts with<br />
DOS-Code<br />
'€' = 128<br />
'äöüÄÖÜß' = $84,$94,$81, $8E,$99,$9A, $E1
4.2 Transfer<br />
Compiler Options 9<br />
AUTOSCAN: n1 Scan baudrate for connected eDIP on COM/USB before programming<br />
n1=0: autoscan off, use baud for connecting and programming<br />
n1=1: autoscan on, search baudrate automatically and programm with<br />
baudrate baud<br />
COMx: baud With this statement the COM port and baud rate is defined.<br />
USB: baud, "device" With this statement the USB device and baud rate is defined.<br />
If the <strong>EA</strong> EVAL<strong>eDIPTFT43</strong> is connected to the USB, "device" is "eDIP<br />
Programmer".<br />
RS485ADR: adr Selects the eDIP with RS485 address "adr" before uploading the<br />
macros.<br />
"adr" can be a number from 0..255.<br />
(see example INIT_with_RS485_address.KMC 68<br />
)<br />
VERIFY Verifies the complete contents of the FLASH memory after upload.
10<br />
4.3 String<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
STRING: nr "text..."<br />
STRING: nr[page]"text..."<br />
The statement STRING defines and stores internal strings nr (1..255).<br />
The internal strings can be used with any command that uses strings<br />
e.g (#ZL,#ZC,#ZR,#ZB 36 , #AT,#AK,#AU,#AJ 43 ,<br />
#BX 39 ,#IX 40 ,#VE 48 )<br />
After the stringcode, defined with #ST n1 50 , internal strings are used.<br />
Optionally different strings can be stored for different pages [0..15]. If<br />
no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize<br />
e.g. strings in different languages.<br />
Example 1:<br />
StringCode = $01<br />
STRING: 1, "Hello World"<br />
MACRO: MnPowerOn<br />
#ST StringCode<br />
#ZL 10,5, StringCode, 1<br />
Example 2:<br />
StringCode = $01<br />
STRING: 1, "Hello World "<br />
STRING: 1[1], "Hallo Welt "<br />
STRING: 1[2], "Ciao a tutti "<br />
MACRO: MnPowerOn<br />
#ST StringCode<br />
#MK 0<br />
#ZL 10,10, StringCode, 1<br />
#MK 1<br />
#ZL 10,30, StringCode, 1<br />
#MK 2<br />
#ZL 10,50, StringCode, 1<br />
You can use the Compiler Functions 6 STRING_W, STRING_H and<br />
STRING_P to get the outline in pixels of the string.<br />
(see How-to-use example String tables - EXPERT 103<br />
)
4.4 Fonts<br />
4.4.1 Font<br />
Compiler Options 11<br />
FONT: nr,<br />
FONT: nr[page], Defines a font file which will be assigned to the number nr (0..255).<br />
can be FXT, G16 62 .<br />
predfined fonts (include ):<br />
; default fonts<br />
FONT4x6 = 1<br />
FONT6x8 = 2<br />
FONT7x12 = 3<br />
GENEVA10 = 4<br />
CHICAGO14 = 5<br />
SWISS30B = 6<br />
BIGZIF50 = 7<br />
BIGZIF100 = 8<br />
Path: <br />
Font: FONT4x6, <br />
Font: FONT6x8, <br />
Font: FONT7x12, <br />
Font: GENEVA10, <br />
Font: CHICAGO14, <br />
Font: SWISS30B, <br />
Font: BIGZIF50, <br />
Font: BIGZIF100, <br />
Optionally different fonts can be stored for different pages [0..15]. If no<br />
page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize e.g.<br />
screens in different languages.<br />
(see How-to-use example Place Strings - BEGINNER 69 )<br />
see Character Table<br />
Terminal 8x8 51<br />
Terminal 8x16 52<br />
Font 4x6 53<br />
Font 6x8 54<br />
Font 7x12 55<br />
Geneva 10 56<br />
Chicago 14<br />
Swiss 30 58<br />
57<br />
BigZif 50 59<br />
BigZif 100 60
12<br />
4.4.2 WinFont<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
WINFONT: nr, "name",script,style, regions.., size<br />
WINFONT: nr[page], "name",script,style, regions.., size<br />
Defines a Windows font and assigns to font number nr (0..255).<br />
The best is to double click on "name" to edit all parameter.<br />
Select the start-character by pressing the left mouse botton and move<br />
to the end-character.<br />
Additonal regions can be selected with the SHIFT-key.<br />
Optionally different winfonts can be stored for different pages [0..15].<br />
If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize<br />
e.g. screens in different languages.<br />
(see How-to-use example Cyrillic font - BEGINNER 73<br />
)
4.4.3 LogFontWidth<br />
Compiler Options 13<br />
LOGFONTWIDTH: n1 Each character in proportional font does have an individual width. The<br />
statement LOGFONTWIDTH provides the width for all characters in<br />
form of a table. The result is in LOG file (find it in project directory).<br />
n1 > 0: specifies the count of column<br />
n1 = 0: no table will be generated<br />
Example:<br />
LogFontWidth: 4<br />
WinFont: 9, "Arial",0,0, 32-127, 24<br />
Output in Logfile:<br />
Import WinFont "Arial", ANSI<br />
height: 24 dots, used codes: 32..127, 5182 bytes<br />
width: 32:' '= 7 33:'!'= 8 34:'"'= 9 35:'#'= 13<br />
36:'$'= 13 37:'%'= 21 38:'&'= 16 39:'''= 5<br />
40:'('= 8 41:')'= 8 42:'*'= 9 43:'+'= 14<br />
44:','= 7 45:'-'= 8 46:'.'= 7 47:'/'= 7<br />
48:'0'= 13 49:'1'= 13 50:'2'= 13 51:'3'= 13<br />
52:'4'= 13 53:'5'= 13 54:'6'= 13 55:'7'= 13<br />
56:'8'= 13 57:'9'= 13 58:':'= 7 59:';'= 7<br />
60:''= 14 63:'?'= 13<br />
64:'@'= 24 65:'A'= 15 66:'B'= 16 67:'C'= 17<br />
68:'D'= 17 69:'E'= 16 70:'F'= 15 71:'G'= 19<br />
72:'H'= 17 73:'I'= 6 74:'J'= 12 75:'K'= 16<br />
76:'L'= 13 77:'M'= 19 78:'N'= 17 79:'O'= 19<br />
80:'P'= 16 81:'Q'= 19 82:'R'= 17 83:'S'= 16<br />
84:'T'= 14 85:'U'= 17 86:'V'= 15 87:'W'= 23<br />
88:'X'= 15 89:'Y'= 16 90:'Z'= 15 91:'['= 7<br />
92:'\'= 7 93:']'= 7 94:'^'= 12 95:'_'= 13<br />
96:'`'= 8 97:'a'= 13 98:'b'= 14 99:'c'= 12<br />
100:'d'= 14 101:'e'= 13 102:'f'= 7 103:'g'= 14<br />
104:'h'= 14 105:'i'= 5 106:'j'= 6 107:'k'= 12<br />
108:'l'= 6 109:'m'= 20 110:'n'= 14 111:'o'= 13<br />
112:'p'= 14 113:'q'= 14 114:'r'= 8 115:'s'= 12<br />
116:'t'= 7 117:'u'= 14 118:'v'= 11 119:'w'= 17<br />
120:'x'= 11 121:'y'= 12 122:'z'= 12 123:'{'= 8<br />
124:'|'= 6 125:'}'= 8 126:'~'= 14 127:' '= 18
14<br />
4.4.4 ExportOverview<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
EXPORTOVERVIEW: n1 This statement enables the generation of a BMP file for all following<br />
fonts and animations.<br />
This is good to get an overview which character / pictures are<br />
available.<br />
Example:<br />
n1= 1: only fonts will be exported<br />
n1= 2: only animations will be exported<br />
n1= 3: fonts and animations will be exported<br />
n1= 0: no export at all<br />
ExportOverview: 3<br />
WinFont: 9, "Arial",0,0, 32-127, 48 ; export "Font9_Arial_ANSI_N_32-<br />
127_48.bmp"<br />
Animation: 1 ; export "Animation1_Erde_G16_1-8.bmp"<br />
Font9_Arial_ANSI_N_32-127_48.bmp:<br />
Animation1_Erde_G16_1-8.bmp:
4.4.5 ExportWinfont<br />
Compiler Options 15<br />
EXPORTWINFONT: n1 n1= 1: Exports all following win fonts as a FXT-File. The file is stored<br />
in project path.<br />
To change or add some character it can easily be edited with the<br />
"KitEditor.exe" or another simple text editor .<br />
n1= 0: no FXT-export will be done.<br />
ExportWinFont: 1<br />
WinFont: 9, "Arial",0,0, 66-67, 8 ; use only character 'B' and 'C'<br />
Font9_Arial_ANSI_N_66-67_8.fxt:<br />
; First Nr : 66<br />
; Last Nr : 67<br />
; Typ : monospaced<br />
; width : 7<br />
; height : 8<br />
66 $42 'B'<br />
#####..<br />
#....#.<br />
#....#.<br />
######.<br />
#....#.<br />
#....#.<br />
#....#.<br />
#####..<br />
67 $43 'C'<br />
..###..<br />
.#...#.<br />
#......<br />
#......<br />
#......<br />
#......<br />
.#...#.<br />
..###..
16<br />
4.5 Bitmaps<br />
4.5.1 MaxSize<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
MAXSIZE: width,height,p If a picture or bitmap is larger than width x height dots (default:<br />
480x272) the size can be reduced automatically to fit to the display.<br />
Examples:<br />
Picture: 1, <br />
MaxSize: 200,200,1<br />
Picture: 1, <br />
MaxSize: 200,200,0<br />
Picture: 1, <br />
p = 1 reduce proportional<br />
p = 0 reduce non proportional to exact "width" and "height", distortions<br />
are possible
4.5.2 MaxColorDepth<br />
Compiler Options 17<br />
MAXCOLORDEPTH: bitpixel Reduces color depth of bitmaps. This saves memory space. Attention:<br />
This may effect to the quality of the image.<br />
Examples:<br />
MaxColorDepth: 16<br />
Picture: 1, <br />
MaxColorDepth: 8<br />
Picture: 1, <br />
MaxColorDepth: 4<br />
Picture: 1, <br />
MaxColorDepth: 1<br />
Picture: 1, <br />
bitpixel = 1: black&white (monochrome)<br />
bitpixel = 4: change to 4 bit color depth<br />
bitpixel = 8: change to 8 bit color depth<br />
bitpixel = 16: change to 16 bit color depth
18<br />
4.5.3 Dithering<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
DITHERING: n1 The <strong>EA</strong> <strong>eDIPTFT43</strong>-A is a 16-Bit Hi-Color Display with 65536 colors.<br />
It is necessary to convert a 24-bit True-Color or 24-bit Color-Palette<br />
from RGB888 into RGB565 colorspace.<br />
24-bit original BMP<br />
115254 Byte<br />
n1=0: no dithering, not used bits are truncated<br />
n1=1: dithering is only on for 24-bit True-Color images (default)<br />
n1=2: dithering is only on for 8-/4-bit images with 24-bit Color-Palette<br />
n1=3: dithering is on for all 24-bit True-Color and 24-bit Color-Palette<br />
images<br />
dithering = 1<br />
DoRLE=0: 76830 Byte<br />
DoRLE=1: 49502 Byte<br />
dithering = 0<br />
DoRLE=0: 76830 Byte<br />
DoRLE=1: 12443 Byte
4.5.4 MakeTransparent<br />
Compiler Options 19<br />
MAKETRANSPARENT: type Parts of a picture can be switched to transparent for a nice overlie of a<br />
picture on the background. GIF, TGA, PNG and G16 files may<br />
already include any transparency information. If not (or a BMP / JPEG<br />
format is used) one color can be defined to become transparent. The<br />
color will be picked out from 1 of 9 positions (type).<br />
Examples:<br />
MakeTransparent: 0<br />
Picture: 1, <br />
MakeTransparent: 1<br />
Picture: 1, <br />
MakeTransparent: 2<br />
Picture: 1, <br />
MakeTransparent: 5<br />
Picture: 1, <br />
1 = Top Left 2 = Top Center 3 = Top Right<br />
4 = Middle Left 5 = Middle Center 6 = Middle Right<br />
7 = Bottom Left 8 = Bottom Center 9 = Bottom Right<br />
0 = no transparency (default)
20<br />
4.5.5 RemoveBorder<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
REMOVEBORDER: n1 With this <strong>compiler</strong> option it is possible to remove an additionally not used<br />
border in a single image<br />
n1=0: off<br />
n1=1: cut a single color boundary<br />
n1=2: cut a single color boundary only before resize (see MAXSIZE 16 )<br />
n1=3: cut only a transparency boundary<br />
n1=4: cut transparency boundary only before resize (default) (see<br />
MAXSIZE 16<br />
)<br />
Examples:<br />
MakeTransparent: 0 MakeTransparent: 0<br />
RemoveBorder: 0 RemoveBorder: 1<br />
Picture: 1, Picture: 2, <br />
MakeTransparent: 0 MakeTransparent: 1<br />
RemoveBorder: 3 RemoveBorder: 3<br />
Picture: 1, Picture: 2, <br />
MaxSize: 100,100,1 MaxSize: 100,100,1<br />
MakeTransparent: 0 MakeTransparent: 0<br />
RemoveBorder: 0 RemoveBorder: 2<br />
Picture: 1, Picture: 2, <br />
MaxSize: 100,100,1 MaxSize: 100,100,1<br />
MakeTransparent: 0 MakeTransparent: 1<br />
RemoveBorder: 4 RemoveBorder: 4<br />
Picture: 1, Picture: 2,
4.5.6 AlphaThreshold<br />
Compiler Options 21<br />
ALPHATHRESHOLD: n1 The image formats *.TGA and *.PNG may include an alpha channel<br />
for transparency<br />
4.5.7 DoGamma<br />
4.5.8 DoRLE<br />
n1=0: alpha channel will be ignored<br />
n1=1..255: threshold level for a single transparency color, like a mask<br />
(default=128)<br />
DOGAMMA: n1 The image format *.PNG may include an gamma table<br />
n1=0: ignore the image gamma information (default)<br />
n1=1: use the image gamma information<br />
DORLE: type Large pictures and fonts need a lot of memory space. RLE<br />
compression may reduce data size to save memory space. RLE<br />
compression is loss-free.<br />
4.5.9 Compress<br />
type = 0: RLE compression is disabled<br />
type = 1: RLE compression is always on<br />
type = 2: RLE is made automatically when compressed file is smaller<br />
than the non-compressed one. (default)<br />
COMPRESS: n1 Compression for animation (generates difference images). Large<br />
animations need a lot of memory space. Compression may reduce<br />
data size to save memory space. The drawing time may also be<br />
reduced.<br />
Compression is only useable for cyclic animations. It is not possible<br />
to use single sub images from a compressed animation (see<br />
commands #WI 38 , #WF 38<br />
).<br />
n1=0: compression off (default)<br />
n1=1: compression on (only useable for cyclic animations)
22<br />
4.5.10 Pattern<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
PATTERN: nr <br />
PATTERN: nr[page] Pattern are used to fill a box 34 , a bargraph 39 or to draw a line 34<br />
.<br />
The statement PATTERN defines the pattern nr (0..255) as the<br />
bitmap . The bitmap size need to be 8x8 dots exactly. can<br />
be BMP, GIF, JPG, TGA, PNG or G16.<br />
Optionally different pattern can be stored for different pages [0..15]. If<br />
no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize<br />
e.g. screens in different languages.<br />
predfined pattern (include ):<br />
; default pattern (8x8 Bitmaps)<br />
Path: <br />
Pattern: 1 <br />
Pattern: 2 <br />
Pattern: 3 <br />
Pattern: 4 <br />
Pattern: 5 <br />
Pattern: 6 <br />
Pattern: 7 <br />
Pattern: 8 <br />
Pattern: 9 <br />
Pattern: 10 <br />
Pattern: 11 <br />
Pattern: 12 <br />
Pattern: 13 <br />
Pattern: 14 <br />
Pattern: 15 <br />
Pattern: 16 <br />
Pattern: 17 <br />
Pattern: 18 <br />
Pattern: 19 <br />
Pattern: 20
4.5.11 Border<br />
BORDER: nr <br />
BORDER: nr[page] <br />
BORDER: nr ,<br />
BORDER: nr[page] ,<br />
A border is used for rectangle 34 , bargraph 39 and<br />
Compiler Options 23<br />
touch key/switch 43 . A border can be scaled. The statement BORDER<br />
defines a bitmap for a border nr (0..255). can be BMP,<br />
GIF, JPG, TGA, PNG or G16. The bitmap size need to be 24x24 dots<br />
exactly.<br />
When used for a touch key or a switch, 2 different bitmaps can be<br />
defined as and . is for touch key/ switch and<br />
will be used if the touch key/ switch is pressed.<br />
Optionally different border can be stored for different pages [0..15]. If<br />
no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize<br />
e.g. screens in different languages.<br />
(see How-to-use example Frame - BEGINNER 89<br />
)<br />
predfined borders (include ):<br />
; default border (24x24 Bitmaps)<br />
Border: 1 <br />
Border: 2 <br />
Border: 3 <br />
Border: 4 <br />
Border: 5 <br />
Border: 6 <br />
Border: 7 <br />
Border: 8 <br />
Border: 9 <br />
Border: 10 <br />
Border: 11 <br />
Border: 12 <br />
Border: 13 <br />
Border: 14 <br />
Border: 15 <br />
Border: 16 <br />
Border: 17 <br />
Border: 18 <br />
Border: 19 <br />
Border: 20 <br />
Border: 31 ,<br />
Border: 32 ,<br />
; default bars (24x24 Bitmaps)<br />
Border: 101 <br />
Border: 102 <br />
Border: 103 <br />
Border: 104 <br />
Border: 105 <br />
Border: 106 <br />
Border: 107 <br />
Border: 111 <br />
Border: 112 <br />
Border: 113 <br />
Border: 114 <br />
Border: 115 <br />
Border: 116 <br />
Border: 117 <br />
Border: 121 <br />
Border: 122 <br />
Border: 123 <br />
Border: 124 <br />
Border: 125 <br />
Border: 126 <br />
Border: 127
24<br />
4.5.12 Button<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
BUTTON: nr <br />
BUTTON: nr[page] <br />
BUTTON: nr ,<br />
BUTTON: nr[page] ,<br />
A button is used for a touch key or a switch<br />
(see Touch commands 43 ). Note that using a button for touch key/<br />
switch is not so flexible as a border (width and height is fix). The<br />
statement BUTTON defines a bitmap for a button nr (0..255).<br />
can be BMP, GIF, JPG, TGA, PNG or G16.<br />
Optionally 2 different buttons can be defined as and .<br />
is for touch key/ switch and will be used if the touch<br />
key/ switch is pressed.<br />
Optionally different buttons can be stored for different pages [0..15]. If<br />
no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize<br />
e.g. screens in different languages.<br />
4.5.13 Picture<br />
You can use the Compiler Functions 6 BUTTON_W and BUTTON_H to<br />
get the outline in pixels of the buttons.<br />
(see How-to-use example Glass button - EXPERT 78 )<br />
PICTURE: nr,<br />
PICTURE: nr[page],<br />
It is convenient to store all bitmap in FLASH; this will save transfer<br />
time via serial interface. The statement PICTURE defines a bitmap<br />
with nr (0..255). Optionally different pictures can be stored for<br />
different pages [0..15]. If no page is selected it is set to 0. The 16<br />
pages are <strong>help</strong>ful to realize e.g. screens in different languages.<br />
Following image formats can be used:<br />
- BMP: Windows Bitmap with 1-, 4-, 8-, 16-, 24-, 32-BIT colordepth<br />
incl. RLE.<br />
- GIF: Graphics Interchange Format incl. optionally transparency<br />
- JPG: JPEG Compressed Images<br />
- TGA: TARGA Images with 8-, 16-, 24-, 32-BIT colordepth incl.<br />
RLE and transparency.<br />
- PNG: Portable Network Graphics indexed-color / truecolor /<br />
greyscale and transparency.<br />
- G16: internal eDIPTFT format, incl. RLE and transparency<br />
All pictures are converted into internal G16 format with RLE encoding<br />
(Compileroption DORLE 21 :).<br />
Too big pictures are resized proportional (Compileroption<br />
MAXSIZE 16 :).<br />
It is also possible to reduce the colordepth (Compileroption<br />
MAXCOLORDEPTH 17 :).<br />
One Color can be defined as transparent for bitmaps without<br />
transparency (Compileroption MAKETRANSPARENT 19 :)<br />
It is possible to cut a single color or transparency border<br />
(Compileroption REMOVEBORDER 20 :).<br />
You can use the Compiler Functions 6 PICTURE_W and PICTURE_H<br />
to get the outline in pixels of the picture.<br />
The pictures can be used with the Bitmap commands. 37<br />
(see How-to-use example BMP file - BEGINNER 74<br />
)
4.5.14 Animation<br />
Compiler Options 25<br />
ANIMATION: nr <br />
ANIMATION: nr[page] <br />
ANIMATION: nr ,,...<br />
ANIMATION: nr[page] ,,...<br />
A animation is a self-running picture. The statement ANIMATION<br />
defines an animation image with nr (0..255).<br />
can be an animated GIF, G16.<br />
,,... two or more single bitmaps BMP, GIF, JPG, TGA,<br />
PNG or G16<br />
Note that max. 4 animations can run at the same time.<br />
The animation images can be used with the Animation commands 38 .<br />
Optionally different animations can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
For cyclic animations, compression may reduce data size to save<br />
memory space (Compileroption COMPRESS 21 :).<br />
You can use the Compiler Functions 6 ANIMATION_W and<br />
ANIMATION_H to get the outline in pixels of the animation.<br />
(see How-to-use example Animated gif - BEGINNER 75<br />
)
26<br />
4.5.15 Instrument<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
INSTRUMENT: nr <br />
A instrument is a serie of pictures which shows e.g. a panelmeter. The<br />
statement INSTRUMENT defines an instrument image with nr<br />
(0..255). After DoubleClick the an DialogBox<br />
apears for edit/change the instrument.<br />
The instrument images can be used with the<br />
Instrument commands 40 . Note that max. 4 instruments can used at<br />
the same time.<br />
You can use the Compiler Functions 6 INSTRUMENT_W and<br />
INSTRUMENT_H to get the outline in pixels of the instrument.<br />
Example "voltmeterdown.i16":<br />
(see How-to-use example Instrument by touch - BEGINNER 95<br />
)
further examples:<br />
Compiler Options 27
28<br />
4.6 Macros<br />
4.6.1 ExportMacro<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
EXPORTMACRO: n1 [,"chartyp"] [,]<br />
n1=0: no export<br />
n1=1: export all following Macros as a include-File *.h for C;<br />
n1=2: export all following Macros as a binary-File *.bin;<br />
n1=3: export both a include-File *.h and a binary-File *.bin;<br />
"chartyp": optionally another variable type for the byte-array (default<br />
is "unsigned char")<br />
: optionally another filename (default is<br />
"macroname_macronumber")<br />
Example:<br />
ExportMacro: 1, "char flash"<br />
Macro: 5<br />
#TA<br />
#DF BLUE<br />
#FZ WHITE,TRANSPARENT<br />
#ZF FONT4x6<br />
#ZL 12,10, "Font4x6: 0123456789"<br />
#ZF FONT6x8<br />
#ZL 12,20, "Font6x8: Schriftprobe"<br />
#ZF FONT7x12<br />
#ZL 12,30, "Font7x12: Schriftprobe"<br />
Output in Logfile "Macro_5.h":<br />
/* Macro 5 as include */<br />
#define MACRO_5_LEN 110<br />
char flash MACRO_5[MACRO_5_LEN] =<br />
{<br />
27, 84, 65, 27, 68, 70, 2, 27, 70, 90, 8, 0, 27, 90, 70, 1, 27, 90, 76, 12,<br />
0, 10, 0, 70,111,110,116, 52,120, 54, 58, 32, 48, 49, 50, 51, 52, 53, 54, 55,<br />
56, 57, 0, 27, 90, 70, 2, 27, 90, 76, 12, 0, 20, 0, 70,111,110,116, 54,120,<br />
56, 58, 32, 83, 99,104,114,105,102,116,112,114,111, 98,101, 0, 27, 90, 70, 3,<br />
27, 90, 76, 12, 0, 30, 0, 70,111,110,116, 55,120, 49, 50, 58, 32, 83, 99,104,<br />
114,105,102,116,112,114,111, 98,101, 0<br />
};<br />
4.6.2 SystemMacros<br />
POWERONMACRO: All commands defined in this macro will be automatically executed<br />
when the power supply is switched on.<br />
RESETMACRO: All commands defined in this macro will be automatically executed<br />
when an external reset on Pin 5 is done.<br />
WATCHDOGMACRO: All commands defined in this macro will be automatically executed<br />
when the display hangs up.<br />
BROWNOUTMACRO: All commands defined in this macro will be automatically executed<br />
when VDD brakes down to 4,6V or lower.
4.6.3 Macro<br />
Compiler Options 29<br />
MACRO: nr<br />
MACRO: nr[page] Defines a normal macro with number nr (0..255). This macro will be<br />
executed with the command #MN nr 41 .<br />
Optionally different normal macros can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
4.6.4 TouchMacro<br />
TOUCHMACRO: nr<br />
TOUCHMACRO: nr[page] Defines a touch macro with number nr (0..255). This macro will be<br />
executed if a touch key / switch with the return code nr is defined and<br />
the touch key /switch is pressed or by command #MT nr 41 .<br />
Optionally different touch macros can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
4.6.5 BitMacro<br />
(see How-to-use example 3 simple touch buttons - BEGINNER 76 )<br />
BITMACRO: nr<br />
BITMACRO: nr[page] Defines a bit macro with number nr (0..255). bitmacros will start<br />
voltage at a single line IN 1..8 (bit) will change or by command<br />
#MB nr 41 .<br />
BitMacro 1..8 are good for falling edge at input 1..8.<br />
BitMacro 9..16 are good for rising edge at input 1..8.<br />
Since firmware V1.1 it is possible to change the assignment between<br />
BitMacro and intput with command #YD n1,n2,n3 47 .<br />
Optionally different bit macros can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
4.6.6 PortMacro<br />
(see How-to-use example Bit Macro - BEGINNER 107 )<br />
PORTMACRO: nr<br />
PORTMACRO: nr[page] Defines a port macro with number nr (0..255). This macro will be<br />
executed if the matching binary bit code is put on the pins IN1..IN8 or<br />
by command #MP nr 41 .<br />
Optionally different port macros can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
(see How-to-use example Port Macro - BEGINNER 109<br />
)
30<br />
4.6.7 MatrixMacro<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
MATRIXMACRO: nr<br />
MATRIXMACRO: nr[page] Defines a matrix macro with number nr (0..255). This macro will be<br />
executed if the one of the connected key pad is pressed or by<br />
command #MX nr 41 .<br />
Matrix Macro 1..64: start when keypressed.<br />
Matrix Macro 0: start after release of key.<br />
Since firmware V1.1 it is possible to change the assignment between<br />
keynumber and matrixmacro with command #YX n1,n2,n3 47 .<br />
The relating pins for matrix keyboard need to be defined with the<br />
command #YM n1,n2,n3 47 .<br />
Optionally different matrix macro can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
4.6.8 ProcessMacro<br />
PROCESSMACRO: nr<br />
PROCESSMACRO: nr[page] Defines a process macro with number nr (0..255). This macro will be<br />
executed automatically (see command #MD no,type,n3,n4,zs 41 ) or<br />
by command #MC nr 41 .<br />
Optionally different process macros can be stored for different pages<br />
[0..15]. If no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to<br />
realize e.g. screens in different languages.<br />
(see How-to-use example Process Macro - BEGINNER 113<br />
)
4.6.9 AnalogMacro<br />
Compiler Options 31<br />
ANALOGMACRO: nr<br />
ANALOGMACRO: nr[page] Defines an analogue macro with number nr (0..255). The macro will be<br />
executed automatically when the relating voltage is on the pins AIN1 and<br />
AIN2 (see table below) or by command #MV nr 41 .<br />
Since firmware V1.1 it is possible to change the assignment between<br />
analogurmacrofunction 0..19 and analogmacronumber with command<br />
#VM n1,n2 48 .<br />
Optionally different analog macros can be stored for different pages [0..15]. If<br />
no page is selected it is set to 0. The 16 pages are <strong>help</strong>ful to realize e.g.<br />
reens in different languages.<br />
(see How-to-use example Analogue Macro - Beginner 105<br />
)<br />
Macro nr<br />
AIN1 AIN2 Macro starts at<br />
0 10 every change of input voltage<br />
1 11 falling input voltage<br />
2 12 rising input voltage<br />
3 13 below lower limit<br />
4 14 above lower limit<br />
5 15 below upper limit<br />
6 16 above upper limit<br />
7 17 outside of both limits<br />
8 18 inside of both limits<br />
9 19 lower than other channel
32<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
5 <strong>EA</strong> <strong>eDIPTFT43</strong>-A commands<br />
5.1 Terminal<br />
Terminal definition:<br />
Set terminal color #FT fg,bg Preset color 1..32 for terminal mode (see<br />
default colors 61 )<br />
fg=foreground color; bg=background color;<br />
Define window #TW n1,C,L,W,H The terminal output is executed with font n1: 1=8x8;<br />
2=8x16 only within the window from column C and<br />
line L (=upper-left corner)<br />
with a width of W and a height of H (specifications in<br />
characters)<br />
Display organisation:<br />
480x272: C=1..60; L=1..34/17<br />
272x480: C=1..34; L=1..60/30<br />
Terminal off #TA Terminal display is switched off; outputs are rejected<br />
Terminal on #TE Terminal display is switched on;<br />
Cursor commands:<br />
Position cursor #TP C,L C=column; L=line; origin upper-left corner (1,1)<br />
Cursor on/off #TC n1 n1=0: Cursor is invisible;<br />
n1=1: Cursor flashes;<br />
Save cursor position #TS The current cursor position is saved<br />
Restore cursor position #TR The last saved cursor position is restored<br />
Terminal output:<br />
String for terminal #ZT "text..." Command for outputting a string (text...) from a<br />
macro to the terminal<br />
Output version #TV The version no. is output in the terminal<br />
e.g. "<strong>EA</strong> <strong>eDIPTFT43</strong>-A V1.0 Rev.A"<br />
Output projectname #TJ The macrofile-projectname is output in the terminal<br />
e.g. "init / delivery state"<br />
Output interface #TQ The used interface is output in the terminal<br />
e.g "RS232,115200 baud, ADR $07"<br />
Output informationen #TI The terminal is initialisized and cleared; the software<br />
version, hardware revision, macrofile-projectname<br />
and CRC-checksum are output in the terminal<br />
(see How-to-use example Keypad - EXPERT 82<br />
)<br />
Special ASCII-characters:<br />
Form feed FF (dec:12) The contents of the screen are deleted and the<br />
cursor is placed at pos. (1,1)<br />
Carriage return CR (dec:13) Cursor to the beginning of the line on the extreme<br />
left<br />
Line feed LF (dec:10) Cursor 1 line lower, if cursor in last line then scroll
5.2 Display<br />
Display commands (effect on the entire display):<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 33<br />
Set display color #FD fg,bg Defines color 1..32 for display and areas<br />
fg=foreground color; bg=background color; (see<br />
default colors 61 )<br />
Set display orientation #DO n1 n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°<br />
(0°+180°=480x272; 90°+270°=272x480)<br />
Delete display #DL Delete display contents (all pixels to background<br />
color)<br />
Fill display #DS Fill display contents (all pixels to foreground color)<br />
Fill display with color #DF n1 Fill complete display content with color n1=1..32<br />
(see default colors 61 )<br />
Invert display #DI Invert display content<br />
(see How-to-use example Change display orientation - BEGINNER 115<br />
)
34<br />
5.3 Draw<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Draw straight lines and points:<br />
Set color for lines #FG fg,bg Colors 1..32 (0=transparent)<br />
fg=color for line; bg=pattern background; (see<br />
default colors 61 )<br />
Point size/line thickness #GZ n1,n2 n1=X-point size (1 to 15)<br />
n2=Y-point size (1 to 15)<br />
Pattern #GM n1 Set line/point pattern no n1=1..255; 0=do not use<br />
pattern<br />
(see <strong>compiler</strong> option PATTERN 22 :)<br />
Draw point #GP x1,y1 Set a point at coordinates x1, y1<br />
Draw rectangle #GR x1,y1,x2,y2 Draw four straight lines as a rectangle from x1,y1 to<br />
x2,y2<br />
Draw straight line #GD x1,y1,x2,y2 Draw straight line from x1,y1 to x2,y2<br />
Continue straight line #GW x1,y1 Draw a straight line from last end point to x1, y1<br />
Set start point<br />
(firmware V1.5)<br />
Draw X-graph<br />
(firmware V1.5)<br />
Draw Y-graph<br />
(firmware V1.5)<br />
Change/draw rectangular areas:<br />
#GS x1,y1 Set the last end point at coordinates x1,y1 for<br />
commands #GW, #GX and #GY<br />
#GX step,y1,... Draw lines with fix X-steps=0..127 (add 128 for<br />
neg.steps) and variable count of Y-values 1..255<br />
#GY step,x1,... Draw lines with fix Y-steps=0..127 (add 128 for<br />
neg.steps) and variable count of X-values 1..255<br />
Delete area #RL x1,y1,x2,y2 Delete an area from x1,y1 to x2,y2 (fill with<br />
background color)<br />
Fill area #RS x1,y1,x2,y2 Fill an area from x1,y1 to x2,y2 (fill with<br />
foreground color)<br />
Fill area with color #RF x1,y1,x2,y2,n1 Fill an area from x1,y1 to x2,y2 with color<br />
n1=1..32<br />
(see default colors 61<br />
)<br />
Invert area #RI x1,y1,x2,y2 Invert an area from x1,y1 to x2,y2<br />
Copy area #RC x1,y1,x2,y2,x3,y3 Copy an area from x1,y1 to x2,y2 to new<br />
position x3,y3
Draw rectangular areas with pattern:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 35<br />
Pattern color #FM fg,bg Color 1..32 (0=transparent) for monochrome<br />
pattern<br />
fg=foreground; bg=background color; (see<br />
default colors 61 )<br />
Area with fill pattern #RM x1,y1,x2,y2,nr Draw an area from x1,y1 to x2,y2 with pattern nr<br />
(see <strong>compiler</strong> option PATTERN 22 :)<br />
Draw box #RO x1,y1,x2,y2,nr Draw a rectangle x1,y1 to x2,y2 and fill with<br />
pattern nr<br />
(see <strong>compiler</strong> option PATTERN 22 :)<br />
Draw frames/borders:<br />
Set color for border #FR c1,c2,c3 Set color 1..32 (0=transparent) for border<br />
segments<br />
c1=frame outside; c2=frame inside; c3=filling;<br />
(see default colors 61 )<br />
Set border type #RE nr,n2 Set border type nr=1..255<br />
border angle: n2=0: 0°; n1=1: 90°; n1=2: 180°;<br />
n1=3: 270°<br />
(see <strong>compiler</strong> option BORDER 23 :)<br />
Draw border box #RR x1,y1,x2,y2 Draw a border box from x1,y1 to x2,y2<br />
(see How-to-use example Frame - BEGINNER 89<br />
)
36<br />
5.4 Text<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Text settings:<br />
Set text color #FZ fg,bg Color 1..32 (0=transparent) for string and character<br />
fg=text color; bg=background color; (see<br />
default colors 61 )<br />
Set font #ZF n1 Set font with the number nr<br />
(see <strong>compiler</strong> option FONT 11 : or WINFONT 12 :)<br />
Font zoom factor #ZZ n1,n2 n1 = X-zoom factor (1x to 8x)<br />
n2 = Y-zoom factor (1x to 8x)<br />
Additional width/height #ZY n1,n2 n1=0..15: additional width left/right<br />
n2=0..15: additional height top/bottom<br />
Spacewidth #ZJ n1 n1=0: use spacewidth from font<br />
n1=1: same witdh as a number<br />
n1>=2: width in dot<br />
Text angle #ZW n1 Text output angle<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°<br />
Text output:<br />
Output string<br />
left justified<br />
Output string<br />
centered<br />
Output string<br />
right justified<br />
Output string<br />
in an area<br />
(firmware V1.2)<br />
#ZL x,y,"text..." A string (text...) is output left justified to x,y<br />
several lines are separated by the character '|' ($7C,<br />
pipe)<br />
character '\' ($5C, backslash) canceles the special<br />
function of '|' and '\'<br />
#ZC x,y,"text..." A string (text...) is output centered to x,y<br />
several lines are separated by the character '|' ($7C,<br />
pipe)<br />
character '\' ($5C, backslash) canceles the special<br />
function of '|' and '\'<br />
#ZR x,y,"text..." A string (text...) is output right justified to x,y<br />
several lines are separated by the character '|' ($7C,<br />
pipe)<br />
character '\' ($5C, backslash) canceles the special<br />
function of '|' and '\'<br />
#ZB x1,y1,x2,y2,<br />
n1,"text..."<br />
Output a string (...) inside area from x1,y1 to x2,y2 at<br />
position n1=1..9; the area will be filled with<br />
background color;<br />
n1=1: Top Left; n1=2: Top Center; n1=3: Top Right<br />
n1=4: Middle Left; n1=5: Middle Center; n1=6:<br />
Middle Right<br />
n1=7: Bottom Left; n1=8: Bottom Center; n1=9:<br />
Bottom Right<br />
String for terminal #ZT "text..." Command for outputting a string (text...) from a<br />
macro to the terminal<br />
(see How-to-use example Place Strings - BEGINNER 69 )<br />
(see How-to-use example Cyrillic font - BEGINNER 73<br />
)
5.5 Bitmap<br />
Bitmap settings:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 37<br />
Set bitmap colors #FU fg,bg painting color 1..32 (0=transparent) for monchrome<br />
bitmaps<br />
fg=foreground color; bg=background color; (see<br />
default colors 61 )<br />
Image zoom factor #UZ n1,n2 n1 = X-zoom factor (1x to 8x)<br />
n2 = Y-zoom factor (1x to 8x)<br />
Image angle #UW n1 output angle of the image<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°<br />
Mirror Image #UX n1 n1=0: normal display<br />
n1=1: the image is mirrored horizontally<br />
Transparency for color<br />
bitmaps<br />
Output bitmaps:<br />
#UT n1 n1=0: no transparency; show picture with all colors<br />
rectangular<br />
n1=1: color of the first dot at top left side will be<br />
defined as transparent (like a mask)<br />
n1=2: if defined - use transparent color from bitmapfile<br />
(GIF,TGA,PNG,G16)<br />
n1=3: replace transparent color from bitmap-file<br />
(GIF,TGA,PNG,G16) with actually background<br />
color<br />
Load internal image #UI x1,y1,nr Load internal image with the no (0 to 255) from the<br />
data flash memory to x1,y1 (see <strong>compiler</strong> option<br />
PICTURE 24 :)<br />
Load image #UL x1,y1,data... Load an image to x1,y1; data... = image in G16 62<br />
format<br />
This command is only for serial interface, do not use<br />
this command in a macro !<br />
(see How-to-use example BMP file - BEGINNER 74<br />
)<br />
Hardcopy:<br />
RLE compression<br />
(firmware V1.5)<br />
#UR the next hardcopy (#UH xx1,yy1,xx2,yy2) will be sent<br />
with RLE compression<br />
Send hardcopy #UH x1,y1,x2,y2 After this command, the image extract is sent (to<br />
sendbuffer) in G16 format.<br />
With the program "BitmapEdit.exe" from the LCD-<br />
Tools you can convert the G16 format to a Windows<br />
*.BMP image
38<br />
5.6 Animation<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Animation settings:<br />
Set animation colors #FW fg,bg color for 1..32 monchrome animation images<br />
fg=foreground color; bg=background color; (see<br />
default colors 61 )<br />
Animation zoom factor #WZ n1,n2 n1 = X-zoom factor (1x to 8x)<br />
n2 = Y-zoom factor (1x to 8x)<br />
Animation angle #WW n1 output angle of the animation image<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°<br />
Mirror animation #WX n1 n1=0: normal display<br />
n1=1: the animation image is mirrored horizontally<br />
Transparency for color<br />
animation<br />
Animation bitmap:<br />
#WT n1 n1=0: no transparency; show animation with all colors<br />
rectangular<br />
n1=1: color of the first dot at top left side will be<br />
defined as transparent (like a mask)<br />
n1=2: if defined - use transparent color from<br />
animation-file (.GIF.G16)<br />
n1=3: replace transparent color from animation-file<br />
with actually background color<br />
Load single image #WI x1,y1,nr,n2 Load from animation image nr=0..255 the sub image<br />
n2 to x1,y1(see ANIMATION 25 :)<br />
Animation process:<br />
Define animation process #WD<br />
no,x1,y1,nr,type,ti<br />
me<br />
Define an animationprocess no=1..4 at position x1,y1<br />
(=left top edge) with animation image nr=0..255. (see<br />
ANIMATION 25 :)<br />
type: 1=run once; 2=cyclically; 3=pingpong; 4=once<br />
backwards; 5=cyclic backwards; 6=pingpong<br />
backwards; 7=manually (use command ESC W<br />
N|P|F|M)<br />
time: 0=stop; 1..254=time in in 1/10 sec; 255=use<br />
time from animation-file<br />
Change animation type #WY no,type Assign a new type=1..7 to animationprocess no=1..4<br />
Change animation time #WC no,time Assign a new time=0..255 to animationprocess<br />
no=1..4<br />
Next animation image #WN no Show the next image from animationprocess no=1..4<br />
Previous animation<br />
image<br />
#WP no Show the previous image from animationprocess<br />
no=1..4<br />
Show animation image #WF no,n2 Show image n2 from animationprocess no=1..4<br />
Run to animation image #WM no,n2 Run animationprocess no=1..4 from actually image to<br />
image n2<br />
Stop animationprocess #WL no Stop animationprocess no=1..4 and clear last image<br />
with actually background color<br />
(see How-to-use example Animated gif - BEGINNER 75<br />
)
5.7 Bargraph<br />
Bargraph settings:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 39<br />
Set color for bargraph #FB fg,bg,fc Set colors 1..32 for bargraph (see default colors 61<br />
fg=foreground; bg=background; fc=color for frame<br />
)<br />
Bargraph pattern #BM nr Pattern for bargraph nr=1..255; nr=0 no pattern/solid<br />
(valid for type=0..3) (see PATTERN 22 :)<br />
Bargraph border #BE nr Border for bargraph nr=0..255 (valid for type=4..7)<br />
(see <strong>compiler</strong> option BORDER 23 :)<br />
Bargraph linewidth #BB n1 Linewidth for bargraph n1=1..255; n1=0 automatic<br />
(valid for type=2,3,6,7)<br />
Define/use bargraphs:<br />
Define bargraph #BR #BL #BO<br />
#BU<br />
no,x1,y1,x2,y2,<br />
sv,ev,type<br />
Define bargraph no=1..20 to L(eft), R(ight), O(up),<br />
U(down) x1,y1,x2,y2 rectangle enclosing the bar<br />
graph; sv, ev are the values for 0% and 100%<br />
type: 0=pattern bar; 1=pattern bar in rectangle<br />
type: 2=pattern line; 3=pattern line in rectangle<br />
type: 4=border bar; 5=border bar in rectangle<br />
type: 6=border line; 7=border line in rectangle<br />
Update bargraph #BA no,value Set and draw the bar no=1..20 to the new value<br />
Draw bargraph #BN no Entirely redraw the bar with the number no=1..20<br />
Send bargraph value #BS no Send the current value of bar no=1..20 to sendbuffer<br />
Delete bargraph #BD no,n2 The definition of the bar with the number no=1..20<br />
becomes invalid. If the bar graph was defined as<br />
input with touch, this touch field will also be deleted.<br />
n2=0: Bar remains visible; n2=1: Bar is deleted<br />
(see How-to-use example Bargraph by touch - BEGINNER 91 )<br />
Bargraph user values - Format text output:<br />
User value color #FX fg,bg Set color 1..32 for bargraph user value<br />
fg=foreground; bg=background color; (see<br />
default colors 61 )<br />
User value font #BF nr Set font nr for bargraph user value<br />
(see <strong>compiler</strong> option FONT 11 : or WINFONT 12<br />
:)<br />
User value zoom #BZ n1,n2 Set zoom factor for bargraph user value<br />
n1=X-Zoom 1x..8x; n2=Y-Zoom 1x..8x<br />
User value additional<br />
width/height<br />
#BY n1,n2 n1=0..15: additional width left/right;<br />
n2=0..15: additional height top/bottom for user value<br />
User value angle #BW n1 Set writing angle for bargraph user value<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;<br />
User values / scaling #BX no,x1,y1,<br />
"FormatString"<br />
Define user value for bargraph no=1..20.<br />
Output is always right justified to x1,y1<br />
Format String: "bv1=uservalue1;bv2=uservalue2"<br />
Assign two bar values (bv1,bv2 =0..254) to user<br />
defined values max. range: 4 1/2 digits 19999 +<br />
decimal point ('.' oder ',') + sign e.g. display "-123.4"<br />
for bar value bv1=0 and "567.8" for bar value<br />
bv2=100 Format String: "0=-123.4;100=567.8"
40<br />
5.8 Instrument<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Define/use instruments:<br />
Define instrument # IP no, x1,y1,<br />
n2,n3, sv,ev<br />
Define instrument no=1..4 at position x1,y1 (=left top<br />
edge) with instrument image n2=0..255.<br />
Instrument angle: n3=0: 0°; n3=1: 90°; n3=2: 180°;<br />
n3=3: 270°;<br />
sv, ev are the values for 0% and 100%<br />
(see <strong>compiler</strong> option INSTRUMENT 26 :)<br />
Update instrument # IA no,value Set and draw the instrument no=1..4 to the new<br />
value<br />
Draw instrument # IN no Entirely redraw the instrument with the number<br />
no=1..4<br />
Send instrument value # IS no Send the current value of instrument no=1..4 to<br />
sendbuffer<br />
Delete instrument # ID no,n2 The definition of the instrument with the number<br />
no=1..4 becomes invalid.<br />
n2=0: Instrument remains visible;<br />
n2=1: Instrument is deleted<br />
(see How-to-use example Instrument by touch - BEGINNER 95 )<br />
Instrument user values - Format text output:<br />
User value color # FI fg,bg Set color 1..32 for instrument user value<br />
fg=foreground; bg=background color; (see<br />
default colors 61 )<br />
User value font # IF nr Set font nr for instrument user value<br />
(see <strong>compiler</strong> option FONT 11 : or WINFONT 12<br />
:)<br />
User value zoom # IZ n1,n2 Set zoom factor for instrument user value<br />
n1=X-Zoom 1x..8x; n2=Y-Zoom 1x..8x<br />
User value additional<br />
width/height<br />
# IY n1,n2 n1=0..15: additional width left/right;<br />
n2=0..15: additional height top/bottom for instrument<br />
user value;<br />
User value angle # IW n1 Set writing angle for instrument user value<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;<br />
User values / scaling # IX no,x1,y1,<br />
"FormatString"<br />
Define user value for instrument no=1..4. Output is<br />
always right justified to x1,y1<br />
Format String: "iv1=uservalue1;iv2=uservalue2"<br />
Assign two instrument values (iv1,iv2 =0..254) to<br />
user defined values max. range: 4 1/2 digits 19999 +<br />
decimal point ('.' or ',') + sign e.g. display "-123.4" for<br />
iv1=0 and "567.8" for iv2=100 Format String: "0=-<br />
123.4;100=567.8"
5.9 Macros<br />
Run macros:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 41<br />
Run macro #MN nr Call the (normal) macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option MACRO 29 :)<br />
Run touch macros #MT nr Call the touch macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option TOUCHMACRO 29 :)<br />
Run port macro #MP nr Call the port macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option PORTMACRO 29 :)<br />
Run bit macro #MB nr Call the bit macro with the number nr (max. 7 levels)<br />
(see <strong>compiler</strong> option BITMACRO 29 :)<br />
Run matrix macro #MX nr Call the matrix macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option MATRIXMACRO 30 :)<br />
Run process macro #MC nr Call the process macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option PROCESSMACRO 30 :)<br />
Run analogue macro #MV nr Call the analogue macro with the number nr (max. 7<br />
levels)<br />
(see <strong>compiler</strong> option ANALOGMACRO 31 :)<br />
Macro settings:<br />
Disable macros #ML type,n1,n2 Macros of the type'N','T','P','B','X','C' or 'V'<br />
(type 'A' = all macro types) are disabled from the<br />
number n1 to n2; i.e. no longer run when called.<br />
Enable macros #MU type,n1,n2 Macros of the type 'N','T','P','B','X','C' or 'V'<br />
(type 'A' = all macro types) are enabled from number<br />
n1 to n2; i.e. run again when called.<br />
Select macro/image<br />
page<br />
#MK n1 A page is selected for macros and images n1=0 to<br />
15<br />
if a macro/image is not defined in the current page 1<br />
to 15, this macro/image is taken from page 0<br />
(e.g. to switch languages or for horizontal/vertical<br />
installation).<br />
Save macro/image page #MW the current macro/image page is saved<br />
(when used in process macros)<br />
Restore macro/image<br />
page<br />
#MR the last saved macro/image page is restored<br />
(see How-to-use example Languages/Macro Pages - BEGINNER 101<br />
)
42<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Automatic (normal-) macros:<br />
Macro with delay #MG n1,n2 Call the (normal) macro with the number n1 in n2/10s<br />
Execution is stopped by commands<br />
(e.g. receipt or touch macros).<br />
Autom. macros once only #ME n1,n2,n3 Automatically run macros n1 to n2 once only;<br />
n3=pause in 1/10s<br />
Execution is stopped by commands<br />
(e.g. receipt or touch macros).<br />
Autom. macros cyclical #MA n1,n2,n3 Automatically run macros n1 to n2 cyclically;<br />
n3=pause in 1/10s<br />
Execution is stopped by commands<br />
(e.g. receipt or touch macros).<br />
Autom. macros ping<br />
pong<br />
#MJ n1,n2,n3 Automatically run macros n1 to n2 to n1 (ping pong);<br />
n3=pause in 1/10s<br />
Execution is stopped, for example, by receipt or<br />
touch macros<br />
(see How-to-use example Automatic Macro - EXPERT 111 )<br />
Macro processes:<br />
Define macro process #MD<br />
no,type,n3,n4,zs<br />
A macro process with the number no (1 to 4) is<br />
defined (1=highest priority).<br />
The process macros n3 to n4 are run successively<br />
every zs/10s.<br />
type: 1=once only; 2=cyclical; 3=ping pong n3 to n4<br />
to n3<br />
Macro process interval #MZ no,zs a new time zs in 1/10s is assigned to the macro<br />
process with the number no (1 to 4). if the time zs=0,<br />
execution is stopped.<br />
Stop macro processes #MS n1 All macro processes and animations are stopped<br />
with n1=0 and restarted with n1=1 in order, for<br />
example, to execute settings and outputs via the<br />
interface undisturbed<br />
(see How-to-use example Process Macro - BEGINNER 113<br />
)
5.10 Touch<br />
Touch presets:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 43<br />
Touch border colors #FE n1,n2,n3, s1,s2,s3 Set the colors 1..32 (0=transparent) for touch<br />
border (#AT #AK)<br />
n=normal; s=selected; 1=frame outside;<br />
2=frame inside; 3=filling<br />
(see default colors 61 )<br />
Touch border form #AE nr,n2 nr=1..255 border number (see <strong>compiler</strong> option<br />
BORDER 23 :)<br />
nr=0 no border<br />
n2=angle 0=0°; 1=90°; 2=180°; 3=270°<br />
Touch button colors #FC nf,nb, sf,sb Set the colors 1..32 for monochrome touch<br />
buttons (#AU #AJ)<br />
n=normal; s=selected; f=foreground;<br />
b=background<br />
(see default colors 61 )<br />
Touch button number #AC nr,n2,n3,n4 nr=0..255 button number (see <strong>compiler</strong> option<br />
BUTTON 24 :)<br />
n2=button angle 0=0°; 1=90°; 2=180°; 3=270°<br />
n3=X-Zoom 1..8; n4=Y-Zoom 1..8<br />
Radio group for switches #AR n1 n1=0: newly defined switches do not belong to<br />
a group<br />
n1=1..255: newly defined switches belong to<br />
the group with the number n1.<br />
Only 1 switch in a group is active at any one<br />
time; all the others are deactivated. In the<br />
case of a switch in a group, only the down<br />
code is applicable. the up code is ignored.<br />
(see How-to-use example Radio group - BEGINNER 80 )<br />
Label font presets:<br />
Font color #FA nf,sf Color 1..32 for touch labeling (see<br />
default colors 61 )<br />
nf=normal fontcolor; sf= fontcolor for selection<br />
Label font #AF nr Set font with the number nr for touch key label<br />
(see <strong>compiler</strong> option FONT 11 : or<br />
WINFONT 12<br />
:)<br />
Label zoom factor #AZ n1,n2 n1=X-zoom factor (1x to 8x); n2=Y-zoom<br />
factor (1x to 8x)<br />
Additional width/height #AY n1,n2 n1=0..15: additional width left/right<br />
n2=0..15: additional height top/bottom<br />
Label angle #AW n1 Label output angle: n1=0: 0°; n1=1: 90°; n1=2:<br />
180°; n1=3: 270°<br />
Offset for selected label #AO n1,n2 n1=X-offset; n2=Y-offset<br />
n1,n2=0..7 (add +8 for negative direction)
44<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Define touch key/switches:<br />
Define touch key #AT x1,y1,x2,y2, downCode,upCode, "text..."<br />
#AU x,y, downCode,upCode, "text..."<br />
Define touch switch #AK x1,y1,x2,y2, downCode,upCode, "text..."<br />
#AJ x,y, downCode,upCode, "text..."<br />
key remains<br />
depressed as long<br />
as there is contact<br />
status of the switch<br />
toggles after each<br />
contact<br />
#AT: The area from x1,y1 to x2,y2 is drawn with actual border and defined as a key<br />
#AK: The area from x1,y1 to x2,y2 is drawn with actual border and defined as a switch<br />
#AU: The actual button is loaded to x,y and defined as a key<br />
#AJ: The actual button is loaded to x,y and defined as a switch<br />
'downCode':(1-255) return/touchmacro when key pressed<br />
'upCode': (1-255) return/touchmacro when key released<br />
(downCode/upCode = 0 press/release not reported).<br />
"text...": this is a string that is placed in the key with the current touch font.<br />
The first character determines the alignment of the text (C=centered, L=left justified, R=right<br />
justified)<br />
Multiline texts are separated with the character '|' ($7C, dec: 124)<br />
optional: after the character '~' ($7E, dec: 126) you can write a 2nd text for a selected touch<br />
key/switch<br />
e.g. "LED|on~LED|off"<br />
(see How-to-use example 3 simple touch buttons - BEGINNER 76 )<br />
(see How-to-use example Glass button - EXPERT 78 )<br />
Define touch areas:<br />
Define drawing area #AD x1,y1,x2,y2, n1,fg A drawing area is defined. You can then draw<br />
with a line width of n1 and color fg within the<br />
corner coordinates x1,y1 and x2,y2.<br />
(see default colors 61 )<br />
Define free touch area #AH x1,y1,x2,y2 A freely usable touch area is defined. Touch<br />
actions (down, up and drag) within the corner<br />
coordinates x1,y1 and x2,y2 are sent.<br />
Set bar by touch #AB no The bargraph with no=1..20 is defined for input<br />
by touch panel.<br />
Set instrument by touch<br />
(firmware V1.4)<br />
#A+ no The instrument with no=1..4 is defined for<br />
input by touch panel.<br />
(see How-to-use example Free draw area - BEGINNER 86 )<br />
(see How-to-use example Bargraph by touch - BEGINNER 91 )<br />
(see How-to-use example Instrument by touch - BEGINNER 95<br />
)
Global settings:<br />
Touch query on/off #AA n1 Touch query is<br />
n1=0: deactivated<br />
n1=1: activated<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 45<br />
Touch key response #AI n1 Automatic inversion when touch key touched<br />
n1=0: OFF<br />
n1=1: ON<br />
Touch key response<br />
buzzer<br />
#AS n1 Tone sounds briefly when a touch key is<br />
touched<br />
n1=0: OFF<br />
n1=1: ON<br />
Send bar value on/off #AQ n1 Automatic transmission of a new bar graph<br />
value by touch input<br />
n1=0: deactivated<br />
n1=1: is placed in the sendbuffer once at the<br />
end of input<br />
n1=2: changes are placed continous into<br />
sendbuffer during input<br />
Other touch functions:<br />
Invert touch key #AN code The touch key with the assigned return code is<br />
inverted manually<br />
Set touch switch #AP code,n1 The status of the switch with the return code is<br />
changed to<br />
n1=0: OFF<br />
n1=1: ON<br />
Query touch switch #AX code The status of the switch with the return code is<br />
placed in the sendbuffer (off=0; on=1)<br />
Query radio group #AG n1 down code of the activated switch from the<br />
radio group n1 is placed in the sendbuffer<br />
Delete touch area<br />
by up- or down-code<br />
Delete touch area<br />
by coordinates<br />
#AL code, n1 The touch area with the return code is removed<br />
from the touch query (code=0: all touch areas).<br />
When n1=0, the area remains visible on the<br />
display<br />
When n1=1, the area is deleted<br />
#AV x,y,n1 Remove the Touch area that includes the<br />
coordinates x1,y1 from the touch query.<br />
When n1=0, the area remains visible on the<br />
display<br />
When n1=1, the area is deleted
46<br />
5.11 Backlight<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
LED backlight:<br />
Illumination brightness #YH n1 Set brightness of the LED illumination n1=0 to 100%.<br />
Increase brightness #YN Increase brightness of the LED illumination (one<br />
step=1%)<br />
Decrease brightness #YP Decrease brightness of the LED illumination (one<br />
step=1%)<br />
Brightness changetime #YZ n1 Time n1=0..31 in 1/10sec for changing brightness<br />
from 0 to 100%<br />
Illumination on/off #YL n1 LED n1=0: OFF; n1=1: ON<br />
n1=2 to 255: LED switched ON for n1/10sec<br />
Assign bar with backlight #YB no Assign bar no=1..20 for changing brightness of the<br />
backlight<br />
Assign instrument with<br />
backlight (firmware V1.4)<br />
#Y+ no Assign instrument no=1..4 for changing brightness of<br />
the backlight<br />
Save parameter #Y@ Save the actual brightness and changetime for<br />
poweron to EEPROM<br />
(see How-to-use example Bargraph by touch - BEGINNER 91<br />
)
5.12 Digital IO-Port<br />
I/O-ports:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 47<br />
Write output port #YW n1,n2 n1=0: Set all 8 output ports in accordance with n2<br />
(=8-bit binary)<br />
n1=1..8: Reset output port n1 (n2=0); set (n2=1);<br />
invert (n2=2)<br />
Read input port #YR n1 n1=0: Read all 8 input ports as 8-bit binary value (to<br />
sendbuffer)<br />
n1=1..8: Read input port (1=H-level=5V, 0=Llevel=0V)<br />
Port scan on/off #YA n1 The automatic scan of the input port is<br />
n1=0: deactivated<br />
n1=1: activated<br />
Invert input port #YI n1 The input port is<br />
n1=0: evaluated normal<br />
n1=1: evaluated inverted<br />
Redefine input bitmacro<br />
(firmware V1.1)<br />
(see How-to-use example Bit Macro - BEGINNER 107 )<br />
(see How-to-use example Port Macro - BEGINNER 109<br />
)<br />
External matrix keyboard:<br />
#YD n1,n2,n3 n1=1..8: input port<br />
n2=0: falling-edge or n2=1: rising-edge<br />
n3=0..255: new BitMacro number<br />
Matrix keyboard #YM n1,n2,n3 Specifies an external matrix keyboard at the inputs<br />
and outputs<br />
n1=number of inputs (1..8)<br />
n2=number of outputs (0..8)<br />
n3=debouncing (0..7)<br />
Redefine matrixmacro for<br />
keys (firmware V1.1)<br />
Additional Outputs:<br />
Write extended ports<br />
(firmware V1.4 with<br />
74HC4094)<br />
#YX n1,n2 Assign keynumber n1=1..65 with matrixtmacro<br />
n2=0..255<br />
After release the key n1=0 run matrixtmacro<br />
n2=0..255<br />
#YE n1,n2,n3 write from output port n1=0..255 to port n2=0..255<br />
n3=0 Reset ports<br />
n3=1 Set ports<br />
n3=2 Invert ports
48<br />
5.13 Analogue Input<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Analogue inputs:<br />
Calibration #V@ ch,x1 Calibration procedure is as follows:<br />
1.) Apply defined voltage (3..5V) to AIN1 or AIN2<br />
2.) Run this command with channel information<br />
ch=1..2 and x1=voltage value in [mV]<br />
e.g. 4.0V on AIN1 command: #V@1,4000<br />
Enable/disable AIN scan #VA n1 n1=0 disables input scan for AIN1 and AIN2<br />
n1=1 enable input scan<br />
Send analog value #VD ch Voltage in [mV] will be sent (to sendbuffer) for<br />
channel ch=1..2<br />
Limit for analog macro #VK ch,n1,n2,n3 Sets two limits for channel ch=1..2<br />
n1=lower limit [mV/20]<br />
n2=upper limit [mV/20]<br />
n3=hysteresis [mV]<br />
Related to this limits serveral analogmacros can be<br />
started automatically.<br />
Redefine analogmacro<br />
(firmware V1.1)<br />
#VM n1,n2 Assign analogmacrofunction n1=0..19<br />
with analogmacronumber n2=0..255<br />
Bargraph for AIN1/AIN2 #VB ch,no Assigns bargraph no=1..20 to analogue input ch=1..2<br />
(it is possible to assign more than one bargraph to an<br />
anlogue input). Define start- endvalues for bargraph<br />
(see #B RLOU 39 ) in [mV/20]<br />
Instrument for AIN1/AIN2<br />
(firmware V1.4)<br />
#V+ ch,no Assigns instrument no=1..4 to analogue input<br />
ch=1..2<br />
Define start- endvalues for instrument (see # IP 40 ) in<br />
[mV/20]<br />
Redraw bar/instrument #VR ch Redraw all bargraphs and instruments defined for<br />
channel ch=1..2<br />
(see How-to-use example Analogue Macro - Beginner 105 )<br />
(see How-to-use example Instrument by analogue input - BEGINNER 96<br />
)
Analogue in user values - Format text output:<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A commands 49<br />
User value color #FV ch,fg,bg Set color 1..32 for string output of channel ch=1..2<br />
fg=foreground, bg=background color; (see<br />
default colors 61 )<br />
User value Font #VF ch,nr Set font nr for channel ch=1..2<br />
(see <strong>compiler</strong> option FONT 11 : or WINFONT 12<br />
:)<br />
User value zoom #VZ ch,n1,n2 Set zoom factor for channel ch=1..2<br />
n1=X-Zoom 1x..8x<br />
n2=Y-Zoom 1x..8x<br />
User value additional<br />
width/height<br />
#VY ch,n1,n2 n1=0..15: additional width left/right<br />
n2=0..15: additional height top/bottom for channel<br />
ch=1..2;<br />
User value angle #VW ch,n1 Set writing angle for channel ch=1..2<br />
n1=0: 0°; n1=1: 90°; n1=2: 180°; n1=3: 270°;<br />
User values / scaling #VE ch,"FmtStr" Set user value for channel ch=1..2<br />
Format String: "mV1=uservalue1;mV2=uservalue2"<br />
Assign two voltages (0..5000mV) to user defined<br />
values<br />
max. range: 4 1/2 digits 19999 + decimal point ('.'<br />
oder ',') + sign<br />
e.g. display for 2000mV should be "-123.45" and<br />
"0.00" for 1000mV Format String: "2000=-<br />
123.45;1000=0"<br />
Send user value #VS ch This will send current voltage as formated string for<br />
channel ch=1..2 to sendbuffer<br />
Display on terminal #VT ch Show formated string of channel ch=1..2 on termial<br />
window<br />
Display user value #VG ch,x1,y1 Show formated string of channel ch=1..2 at<br />
coordinate x1,y1
50<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
5.14 Other commands<br />
Use string table:<br />
String table code<br />
(firmware V1.5)<br />
(see How-to-use example String tables - EXPERT 103 )<br />
Send functions:<br />
#ST n1 n1=0: no use of internal strings<br />
n1>0: after code n1 appears following codes are<br />
internal string numbers (see <strong>compiler</strong> option<br />
STRING: 10 )<br />
Send bytes #SB data... bytes are sent to the sendbuffer data... can be<br />
numbers or strings e.g #SB "Test",10,13<br />
Send version #SV The version is sent as a string to sendbuffer<br />
e.g. "<strong>EA</strong> <strong>eDIPTFT43</strong>-A V1.0 Rev.A TP+"<br />
Send projectname #SJ The macro-projectname is sent as a string to the<br />
sendbuffer<br />
e.g. "init / delivery state"<br />
Send internal infos #SI Internal information about the eDIP is sent to the<br />
sendbuffer.<br />
Other functions:<br />
Define color #FP no, R5,G6,B5 Set a new RGB value for color no. n1=1..32<br />
R5:Bit7..3; G6:Bit7..2; B5:Bit7..3; (see<br />
default colors 61 )<br />
Wait (pause) #X n1 Wait n1/10sec before the next command is<br />
executed.<br />
Set RS485 address #KA adr For RS232/RS485 operation only and only possible<br />
when Hardware address is 0. The eDIP is assigned a<br />
new address adr (in the Power-On macro).<br />
(see compile option RS485ADR 9 )<br />
(see example INIT_with_RS485_address.KMC 68<br />
)<br />
Tone on/off #YS n1 The tone output (pin 16) becomes<br />
n1=0:OFF; n1=1:ON; n1=2 to 255:ON for n1/10s
6 Default Fonts<br />
6.1 Terminal 8x8<br />
Default Fonts 51
52<br />
6.2 Terminal 8x16<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
6.3 Font 4x6<br />
Default Fonts 53
54<br />
6.4 Font 6x8<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
6.5 Font 7x12<br />
Default Fonts 55
56<br />
6.6 Geneva 10<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
6.7 Chicago 14<br />
Default Fonts 57
58<br />
6.8 Swiss 30<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
6.9 BigZif 50<br />
Default Fonts 59
60<br />
6.10 BigZif 100<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
7 Default Colors<br />
Default Colors 61<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A is able to work with 65,536 colors. For an easy use there exists a color palette with<br />
32 entrys (16 colors are predefined after PowerOn). This color palette can be redefined at any time<br />
without changing the content of the display (command: #FP no R G B 50<br />
). To use a color for text and<br />
graphic functions you set only a number between 1..32. The dummy color number 255 means that the<br />
actual color is not changed e.g you want only to change the foreground- and not the background color.<br />
The color number 0=transparent is special and can be used for background of character e.g. that<br />
means placing a character no rectangular field will be deleted around the character itself.<br />
predfined constants (include )<br />
;------------------------------------------------------------------------------<br />
; color constants<br />
TRANSPARENT = 0<br />
BLACK = 1 ; RGB: 0 0 0<br />
BLUE = 2 ; RGB: 0 0 255<br />
RED = 3 ; RGB: 255 0 0<br />
GREEN = 4 ; RGB: 0 255 0<br />
MAGENTA = 5 ; RGB: 255 0 255<br />
CYAN = 6 ; RGB: 0 255 255<br />
YELLOW = 7 ; RGB: 255 255 0<br />
WHITE = 8 ; RGB: 255 255 255<br />
DARKGREY = 9 ; RGB: 111 111 111<br />
ORANGE = 10 ; RGB: 255 143 0<br />
PURPLE = 11 ; RGB: 143 0 255<br />
DEEPPINK = 12 ; RGB: 255 0 143<br />
MINT = 13 ; RGB: 0 255 143<br />
LAWNGREEN = 14 ; RGB: 143 255 0<br />
SKYBLUE = 15 ; RGB: 0 143 255<br />
GREY = 16 ; RGB: 175 175 175<br />
NOCHANGE =255
62<br />
8 G16FORMAT<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Use 'BitmapEdit.exe' from the LCD-Tools package to convert<br />
*.BMP, *.JPG, *.GIF, *.TGA or *.PNG into internal G16-format.<br />
Structure of an image file in the G16 format:<br />
This format handles both a single picture, and several pictures (e.g. containing fonts or animations).<br />
A transparency color is supported.<br />
Structure of the picture header:<br />
Byte value descripion<br />
1. $1b ESC An image file always begins with<br />
2. $55 ' U ' the imag load instruction<br />
3. $4c ' L '<br />
4. $00 X-coordinate LOW byte<br />
5. $00 X-coordinate HIGH byte<br />
6. $00 Y-coordinate LOW byte<br />
7. $00 Y-coordinate HIGH byte<br />
8. $47 'G' identification for a picture -, Font-,<br />
9. $31 '1' or animation-file in the G16 format<br />
10. $36 '6'<br />
11. Bits per pixel 1=Monochrome; 4=16 colors; 8=256 colors;<br />
16=65536 colors High Color RGB565<br />
12. Transparency 0=none, 1=the following vaild transparency color<br />
4/8-bit: 16-Bit:<br />
13. Pallet No. of the transparency color \ RGB565-WORD that<br />
14. Number of existing color palette (0=256) / transparency color<br />
15. reserved<br />
16. Size of the<br />
pictures<br />
0=different dimensions<br />
1=equal width<br />
2=qual height (e.g. proportional Fonts)<br />
3=equal dimensions<br />
17. First First picture / characters number<br />
18. Last Last picture / characters number<br />
19. Width \ Width of the broadest picture/character Low byte<br />
20. / High byte<br />
21. Height \ Height of the highest picture/character Low byte<br />
22. / High byte
After the header, the color pallete entries follow (only for 4 or 8-bits of pictures)<br />
Palette entry: 16-Bit RGB565-WORD<br />
1. Byte: \ Low byte<br />
2. Byte: / High byte<br />
Palette entry: RGB565-WORD<br />
Bit NR. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />
R4 R3 R2 G1 R0 G5 G4 G3 G2 G1 G0 B4 B3 B2 B1 B0<br />
After the color palette, the picture table follows, 8 bytes per picture<br />
Byte value description<br />
1. Width \ Width of the picture in pixel Low byte<br />
2. / High byte<br />
3. Height \ Height of the picture in pixel Low byte<br />
4. / High byte<br />
5. Offset \ offset of the graphic data Low byte<br />
6. > Mid byte<br />
7. / High byte (starting from file beginning)<br />
8. BIT D6..D0 = 0,,127 waiting period for animations (in 0.1 secs)<br />
BIT D7 = 0: uncompressed graphic data<br />
= 1: RLE compressed character rows<br />
According to the picture table, the actual graphic data follows<br />
The lines are always put down from above downward<br />
The arrangement of the pixels in a line is from left to the right<br />
Structure of a line of the picture (uncompressed):<br />
1 bit per pixel:<br />
(monochrome)<br />
4 bits per pixel:<br />
(16-color)<br />
8 bits per pixel:<br />
(256-color)<br />
16 bits per pixel:<br />
(65636-color)<br />
the first pixel is the data bit D7<br />
Number of Bytes per Line = (Width+7) / 8<br />
the first pixel is the HI Nibble (D7..D4)<br />
the second pixel is the LO Nibble (D3..D0)<br />
Number of Bytes per Line = (Width+1) / 2<br />
the first pixel is the first byte<br />
Number of Bytes per Line = width<br />
the first pixel is the first RGB565-WORD<br />
Number of Bytes per Line = width * 2<br />
G16FORMAT 63
64<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Structure of a RLE compressed line:<br />
first the Number-byte is read<br />
BIT D6..D0 = 0..127; +1 = number of 1..128<br />
BIT D7 = 0 the following are uncompressed bytes/pixels<br />
BIT D7 = 1 the following byte/pixel is repeated this number of times<br />
Next, the repeating byte/repeating pixel or the uncompressed bytes/pixels follow.<br />
For pictures with 1 -, 4 and 8-bits per pixel, the data is treated byte by byte.<br />
For High Color 16-Bit picture, the data are treated pixel-wise.<br />
Example monochrome line with 128 pixels:<br />
00 00 00 00 00 12 34 56 78 FF FF FF FF FF FF FF<br />
compresses to<br />
84 00 03 12 34 56 78 86 ff<br />
Example 16-Bit RGB565 line with 16 pixels:<br />
0000 0000 0000 0000 0000 1234 5678 ABCD FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF<br />
compresses to<br />
84 0000 02 1234 5678 ABCD 87 FFFF
9 How-to-use<br />
How-to-use 65<br />
To find an easy start, you will find a project under "..\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic displays\<strong>eDIPTFT43</strong>-A\My first project\my_first_project.KMC".<br />
In that example all main commands are used.<br />
There are two different classes of examples. The ones starting with "BEGINNER.." are good to get an<br />
easy start. The ones starting with "EXPERT" describe special functions, such as using constants,<br />
definitions and <strong>compiler</strong> functions.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\My first project<br />
File:<br />
my_first_project.kmc<br />
Commands:<br />
#AT, #BR, #ZL, #UI, #WD<br />
<strong>eDIPTFT43</strong>-A "First project"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;Include picture<br />
Picture: 1, ;store as picture 1<br />
Animation: 1, ;store as animation 1<br />
;-------------------------------------------------------------------------------<br />
;start of macro programming<br />
;Normal Macros:<br />
Macro: 0 ;define macro 0, called after power on, reset, watchdog reset<br />
#TA ; terminal off<br />
#AF CHICAGO14 ; set touch label font, the font is defined in include file<br />
"default_font.kmi"<br />
#AT 5,10,150,35,1,0, "Picture" ; place 3 touchbuttons at x1,y1 to x2,y2,<br />
Touchmacro 1 is called<br />
#AT 5,45,150,70,2,0, "String" ; touchmacro 2 is called<br />
#AT 5,80,150,105,3,0, "Bargraph" ; touchmacro 3 is called<br />
#AT 5,115,150,140,4,0,"Animation" ; touchmacro 3 is called<br />
;Touch Macros:<br />
TouchMacro: 1 ;Picture<br />
#BD 1, 0 ; delete bargraph 1, because of touchmacro 3 ("Bargraph"), it<br />
can stay visible,<br />
; because pixels are deleted with next command<br />
#WL 1 ;stop animation process<br />
#RL 220,0,479,239 ; delete area on the right (to delete pixels of other<br />
touchmacros)<br />
#UI 220,10, 1 ;load internal picture 1<br />
TouchMacro: 2 ;String<br />
#BD 1, 0 ; delete bargraph 1, because of touchmacro 3 ("Bargraph"), it<br />
can stay visible,<br />
; because pixels are deleted with next command<br />
#WL 1 ;stop animation process<br />
#RL 220,0,479,239 ; delete area on the right (to delete pixels of other<br />
touchmacros)
66<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#ZF SWISS30B ;set font for strings (font is defined in "default_font.kmi")<br />
#ZC 260,40, "Hello|World" ;write string centered, '|' means next line<br />
TouchMacro: 3 ;Bargraph<br />
#BD 1, 0 ; delete bargraph 1, because of touchmacro 3 ("Bargraph"), it<br />
can stay visible,<br />
; because pixels are deleted with next command<br />
#WL 1 ;stop animation process<br />
#RL 220,0,479,239 ; delete area on the right (to delete pixels of other<br />
touchmacros)<br />
#AQ 0 ; deactivate sending barvalues into sendbuffer<br />
#FB RED, BLACK, WHITE ; set colors for bargraph<br />
#BM 2 ; set pattern<br />
#BO 1,220,190,270,10,0,100,1 ; define bargraph and show it<br />
#BA 1,75 ; set bar 1 to new val of 75<br />
#AB 1 ; set bar 1 with touch<br />
TouchMacro: 4 ;Animation<br />
#BD 1, 0 ; delete bargraph 1, because of touchmacro 3 ("Bargraph"), it<br />
can stay visible,<br />
; because pixels are deleted with next command<br />
#RL 220,0,479,239 ; delete area on the right (to delete pixels of other<br />
touchmacros)<br />
#WD 1, 220,30, 1,2,255 ; show animation 1, with picture 1 (see definition above,<br />
cyclically with the time stored within the gif-fle
9.1 Factory Setting<br />
This macrofile sets the display back to factroy setting.<br />
Open file in KitEditor<br />
How-to-use 67<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\Init\<br />
File:<br />
Init.kmc<br />
Commands:<br />
---<br />
<strong>eDIPTFT43</strong>-A "Status on delivery" ; define eDIP, "Projectname" max. 32 character<br />
;brings the display back to ex-works condition with it's standard-fonts 1..8, standardpattern<br />
and standard-border<br />
AutoScan: 1 ; autoscan for correct baud rate to connect to eDIP on<br />
COM/USB<br />
;COM1: 115200 ; program eDIP on COMx with 115200 Baud<br />
USB: 230400, "eDIP Programmer" ; use <strong>EA</strong> 9777-USB eDIP Programmer and program eDIP<br />
with 230400 baud<br />
;VERIFY ; verify after program<br />
;------------------------------------------------------------------------------<br />
; load defaults<br />
include ; double click to open<br />
include <br />
include <br />
include <br />
;-------------------------------------------------------------------------------<br />
MnAutoStart = 0<br />
PowerOnMakro: ; runs after power-on<br />
#MN MnAutoStart<br />
ResetMakro: ; runs after external reset<br />
#MN MnAutoStart<br />
WatchdogMakro: ; runs after a crash (>500ms)<br />
#MN MnAutoStart<br />
BrownOutMakro: ; runs when supply voltage drops
68<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.2 RS485 - Factory Setting<br />
This macrofile uses RS485 addressing and sets the display back to factory setting.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\Init\<br />
File:<br />
INIT_with_RS485_address.KMC<br />
Commands:<br />
---<br />
<strong>eDIPTFT43</strong>-A "Status on delivery" ; define eDIP, "Projectname" max. 32 character<br />
;brings the display back to ex-works condition with it's standard-fonts 1..8, standardpattern<br />
and standard-border<br />
AutoScan: 1 ; autoscan for correct baud rate to connect to eDIP on<br />
COM/USB<br />
;COM1: 115200 ; program eDIP on COMx with 115200 Baud<br />
USB: 230400, "eDIP Programmer" ; use <strong>EA</strong> 9777-USB eDIP Programmer and program eDIP<br />
with 230400 baud<br />
;VERIFY ; verify after program<br />
progadr = 0 ; Constant for program address<br />
RS485ADR: progadr ; program only eDIP with address xx (possible addresses: 0..255)<br />
;newadr = 10 ; Constant for new software address, see Makro 0 (#KA newadr)<br />
; (software addres only possible for hardware address 0)<br />
newadr = progadr ; do not change the address<br />
;------------------------------------------------------------------------------<br />
; load defaults<br />
include ; double click to open<br />
include <br />
include <br />
include <br />
;-------------------------------------------------------------------------------<br />
MnAutoStart = 0<br />
PowerOnMakro: ; runs after power-on<br />
#MN MnAutoStart<br />
ResetMakro: ; runs after external reset<br />
#MN MnAutoStart<br />
WatchdogMakro: ; runs after a crash (>500ms)<br />
#MN MnAutoStart<br />
BrownOutMakro: ; runs when supply voltage drops
9.3 Place Strings - BEGINNER<br />
How-to-use 69<br />
Place different strings with different fonts and orientation. This example is available as an EXPERTversion<br />
(EXPERT - Place text.kmc 71 ). In addition you will find <strong>help</strong> to include WinFonts under<br />
BEGINNER - Cyrillic Font.kmc 73<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Font\<br />
File:<br />
BEGINNER - Place text.kmc<br />
Commands:<br />
WinFont, #ZL, #ZF,#ZW<br />
<strong>eDIPTFT43</strong>-A "Place text<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;include pictures<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place picture no. 1<br />
#GD 40,120,439,120 ; draw a Line<br />
;---- left justified text ----<br />
#FZ MAGENTA,BLACK ; set text colour no. 5 and background no. 1<br />
; same as "#FZ 5,1"<br />
#ZF 3 ; set font no. 3<br />
#ZZ 2,2 ; set zoom factor 2 in x and y direction<br />
#ZL 0,140,"left justified" ; place text "left justified" at the left frame<br />
in line 140<br />
;---- centered text ----<br />
#FZ GREEN,WHITE ; set text colour<br />
#ZF 6 ; set font no. 6<br />
#ZZ 2,1 ; set zoom factor 2 in x and 1 in y direction<br />
#ZC 240,195,"centered text" ; place text "centered text" in the center in<br />
line 195<br />
;---- right justified text ----<br />
#FZ RED,BLUE ; set text colour<br />
#ZF 2 ; set font no. 2<br />
#ZZ 2,2 ; set zoom factor 2 in x and y direction<br />
#ZR 479,256,"right justified" ; place text "right justified" at the left<br />
frame in line 256<br />
;---- vertical centered text ----<br />
#FZ GREEN,BLACK ; set text colour<br />
#ZF 6 ; set font no. 6<br />
#ZZ 1,1 ; set zoom factor 1 in x and 1 in y direction<br />
#ZW 1 ; rotate text 90°<br />
#ZC 450,136,"vertical centered" ; place text "vertical centered" in the center
70<br />
in row 450<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong>
9.4 Place Strings - EXPERT<br />
How-to-use 71<br />
Place different strings with different fonts and orientation.This example is available as a BEGINNERversion<br />
(BEGINNER - Place text.kmc 69 ). In addition you will find <strong>help</strong> to include WinFonts under<br />
BEGINNER - Cyrillic Font.kmc 73<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Font\<br />
File:<br />
EXPERT - Place text.kmc<br />
Commands:<br />
WinFont, #ZL, #ZF,#ZW<br />
<strong>eDIPTFT43</strong>-A "Place text"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;include pictures<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open<br />
;-------------------------------------------------------------------------------<br />
;define string constants<br />
!TEXT1! = "left justified"<br />
!TEXT2! = "centered text"<br />
!TEXT3! = "right justified"<br />
!TEXT4! = "vertical centered"<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- left justified text ----<br />
#FZ MAGENTA,BLACK ; set text colour no. 5 and background no. 1<br />
; same as "#FZ 5,1"<br />
#ZF 3 ; set font no. 3<br />
#ZZ 2,2 ; set zoom factor 2 in x and y direction<br />
#ZL 0,140,!TEXT1! ; place text "left justified" at the left frame in<br />
line 140<br />
;---- centered text ----<br />
#FZ GREEN,WHITE ; set text colour<br />
#ZF 6 ; set font no. 6<br />
#ZZ 2,1 ; set zoom factor 2 in x and 1 in y direction<br />
#ZC 240,195,!TEXT2! ; place text "centered text" in the center in line 195<br />
;---- right justified text ----<br />
#FZ RED,BLUE ; set text colour<br />
#ZF 2 ; set font no. 2<br />
#ZZ 2,2 ; set zoom factor 2 in x and y direction
72<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#ZR 479,256,!TEXT3! ; place text "right justified" at the left<br />
frame in line 256<br />
;---- vertical centered text ----<br />
#FZ GREEN,BLACK ; set text colour<br />
#ZF 6 ; set font no. 6<br />
#ZZ 1,1 ; set zoom factor 1 in x and 1 in y direction<br />
#ZW 1 ; rotate text 90°<br />
#ZC 450,136,!TEXT4! ; place text "vertical centered" in the center<br />
in row 450
9.5 Cyrillic font - BEGINNER<br />
Show the use of Windows fonts, in this case Cyrillic font. Two examples of placing strings are<br />
available (see BEGINNER - Place text.kmc 69 , EXPERT - Place text.kmc 71<br />
).<br />
Open file in KitEditor<br />
How-to-use 73<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Font\<br />
File:<br />
BEGINNER - Cyrillic Font.kmc<br />
Commands:<br />
WinFont, #ZL, #ZF,#ZW<br />
<strong>eDIPTFT43</strong>-A "Cyrillic Font"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;include Picture (Logo)<br />
Picture 1 ; double click to<br />
open Bitmap Editor<br />
;-------------------------------------------------------------------------------<br />
;include an internal Windows font<br />
ExportOverview: 1 ; creates the file "Font9_Arial_RUSSIAN_N_32-<br />
255_48.bmp"<br />
WinFont 9, "Arial",204,0, 32,255, 36 ; double click to open (on Fontname)<br />
; select regions and characters by pressing<br />
shift and mark them with the mouse<br />
; be sure that the box "use Font for EditBox"<br />
is activated<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 30,120,449,120 ; draw a Line<br />
;---- Place cyrillic text ----<br />
#FZ YELLOW,BLACK ; set text color and background color<br />
; YELLOW is defined as 7 (compare with line 12:<br />
"include "<br />
#ZF 9 ; set font to no. 9 (the above, line 36, defined Font)<br />
#ZC 240,170, {CFD0C8C2C5D28220CAC0CA20C4C5CBC03F} ; character table: see file<br />
"Font9_Arial_RUSSIAN_N_32-255_48.bmp"<br />
; double click between the<br />
curly brackets to open EditBox for fonts<br />
; use mouse to select<br />
characters<br />
; You have to select Font no.9<br />
for EditBox to see the characters correctly<br />
; by clicking right on the<br />
Fontname and "Select Font for EditBox"
74<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.6 BMP file - BEGINNER<br />
Show simple pictures invertered and normal. If you want to show an animation, plese refer to<br />
BEGINNER - Show an animated giff file.kmc 75<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Picture\<br />
File:<br />
BEGINNER – show a bmp file.kmc<br />
Commands:<br />
#UI<br />
<strong>eDIPTFT43</strong>-A "Show a bmp File"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Picture: 1 ; double<br />
click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 30,120,449,120 ; draw a Line
9.7 Animated gif - BEGINNER<br />
How-to-use 75<br />
Example of a little animation. The animation is a gif-file. If you want to show a simple picture, please<br />
refer to BEGINNER – show a bmp_file.kmc 74<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Picture\<br />
File:<br />
BEGINNER - Show an animated giff file.kmc<br />
Commands:<br />
#WD<br />
<strong>eDIPTFT43</strong>-A "Show an animated giff file"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Picture: 1 ; double<br />
click to open<br />
;-------------------------------------------------------------------------------<br />
;-------------------------------------------------------------------------------<br />
Animation: 5 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 30,120,449,120 ; draw a Line<br />
;---- Place Information logo ----<br />
#WD 1,193,140,5,2,1 ; place Animation no. 5 (process no. 1)
76<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.8 3 simple touch buttons - BEGINNER<br />
Explanation of general use of TouchButtons and TouchMacros. There are further examples available,<br />
containig information about Bargraph (see BEGINNER - bargraph_by_touch.kmc 91 ), Radiogroups<br />
(see BEGINNER - radiogroup.kmc 80 ) and another Example with touch buttons (see EXPERT -<br />
numbers to terminal with autorepeat.kmc 82<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Touch\<br />
File:<br />
BEGINNER - 3 simple touch areas.kmc<br />
Commands:<br />
#AU, #AT<br />
<strong>eDIPTFT43</strong>-A "3 simple touch areas"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
Button 1 ,<br />
Button 2 ,<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 30,120,449,120 ; draw a Line<br />
;---- Place the left touch ----<br />
#AE 14,0 ; set Frame style no. 14 and rotation for Touch<br />
(1..20)<br />
#AF 6 ; set font no. 6 for Touch area<br />
#AT 50,170,100,220,65,0 "A" ; draw Touch area - this will put a $41 (65 dec.)<br />
into send buffer<br />
;---- Place the middle touch as a bitmap ----<br />
#AF 6 ; set font no. 6for Touch area<br />
#AC 1,0,2,2 ; set Button no.1 , rotation and size<br />
#AU 210,162,66,0 "B" ; draw Touch area - this will put a $42 (66 dec.) into<br />
send buffer<br />
;---- Place the right touch as a bitmap ----<br />
#AF 6 ; set font no. 6for Touch area<br />
#AC 2,0,1,1 ; set Button no.2 , rotation and size<br />
#AU 350,160,67,68 "CC" ; draw Touch area - this will put a $43 (67 dec.) into<br />
send buffer<br />
; the first "C" means Center<br />
;---- Touch Macro for the right touch ----<br />
Touch: 67<br />
#FZ 3,0 ; set color for text<br />
#ZF 6 ; set font no. 6<br />
#ZC 240,245 "Macro #67" ; place text
;---- Release the right touch ----<br />
Touch: 68<br />
#RL 0,245,479,271 ; delete area (text)<br />
How-to-use 77
78<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.9 Glass button - EXPERT<br />
Example of using pictures as buttons. There are further examples available, containig information<br />
about Bargraph (see BEGINNER - bargraph_by_touch.kmc 91 ) and another Example with touch<br />
buttons (see BEGINNER - 3 simple buttons.kmc 76<br />
)<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Touch\<br />
File:<br />
EXPERT - Glass buttons.kmc<br />
Commands:<br />
#AU<br />
<strong>eDIPTFT43</strong>-A "Glas buttons"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
LOGO = 1<br />
BACKGROUND = 2<br />
Picture: LOGO, ; double click to open<br />
Picture: BACKGROUND <br />
;--- define picture button ---<br />
GLASBUT = 1<br />
Button: GLASBUT , ; double<br />
click to open Bitmap Editor<br />
;--- define Unicode Font ---<br />
; double click to open (on Fontname)<br />
; select regions and characters by pressing shift and mark them with the mouse<br />
; be sure that the box "use Font for EditBox" is activated, if you want to edit strings<br />
(refer to l.20)<br />
WEB = 10<br />
DAUPHIN = 11<br />
WinFont: WEB "Webdings",-52,0, 52 + 55-60 + $F058 + $F0AF + $F0B2-$F0B3, 22<br />
WinFont: DAUPHIN "Dauphin",-32,1, 32-125, 36<br />
;-------------------------------------------------------------------------------<br />
;define string-constants for webdings<br />
; double click between the curly brackets to open EditBox for fonts<br />
; use mouse to select characters<br />
; You have to select Font no.9 for EditBox to see the<br />
characters correctly<br />
; by clicking right on the Fontname and "Select Font<br />
for EditBox"<br />
!PLAY! = {34}<br />
!PAUS! = {39}<br />
!REW! = {37}<br />
!FOW! = {38}<br />
!STOP! = {3A}<br />
!<strong>EA</strong>RCD! = {3D3C3E}<br />
;-------------------------------------------------------------------------------<br />
;define coinstants for touch-macros<br />
play = 1
paus = 2<br />
rew = 3<br />
fow = 4<br />
stop = 5<br />
;define constants for normal-macros<br />
delete = 10<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo with background ----<br />
#TC 0 ; Cursor invisible<br />
#FD BLACK,BLACK ; set display colors<br />
#UI 0,0,BACKGROUND ; place background<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- Place buttons ---xs<br />
= 250<br />
pitch = 15<br />
xw = BUTTON_W(GLASBUT)<br />
ys = 175<br />
x=xs<br />
How-to-use 79<br />
#AC GLASBUT,0,1,1 ; use Picturebutton 1<br />
#AF WEB ; set Fontlabel for Touchbuttons (refer to l.16Webdings)<br />
#AU x,ys,0,play,!PLAY! ; define Picture Button with call touchmacro 1<br />
x+=pitch+xw<br />
#AU x,ys,0,rew,!REW!<br />
x+=pitch+xw<br />
#AU x,ys,0,fow,!FOW!<br />
x+=pitch+xw<br />
#AU x,ys,0,stop,!STOP!<br />
#ZF WEB ; select Font 1 (Webdings)<br />
#FZ WHITE,transparent ; set fontcolors<br />
#ZL 5,ys,!<strong>EA</strong>RCD! ; place earphone, cd...<br />
x=xs<br />
st_x=x<br />
st_y=230<br />
TouchMacro: play ;called by Button Play<br />
#MN DELETE ; dedlete old string and set font<br />
#ZL st_x,st_y, "Pressed play" ; place description<br />
#AU x,ys,0,5,!PAUS! ; replace play button as pause button<br />
TouchMacro: rew ;called by Button rewind<br />
#MN DELETE ; dedlete old string and set font<br />
#ZL st_x,st_y, "Pressed rewind" ; place description<br />
#AU x,ys,0,1,!PLAY!; replace pause button as play button<br />
TouchMacro: fow ;called by Button forward<br />
#MN DELETE ; dedlete old string and set font<br />
#ZL st_x,st_y, "Pressed forward" ; place description<br />
#AU x,ys,0,1,!PLAY!; replace pause button as play button<br />
TouchMacro: stop ;called by Button stop<br />
#MN DELETE ; dedlete old string and set font<br />
#ZL st_x,st_y, "Pressed stop" ; place description<br />
#AU x,ys,0,1,!PLAY!; replace pause button as play button<br />
TouchMacro: paus ;called by Button rewind<br />
#MN DELETE ; dedlete old string and set font<br />
#ZL st_x,st_y,"Pressed pause" ; place description<br />
#AU x,ys,0,1,!PLAY!; replace pause button as play button<br />
Macro: DELETE<br />
#RL st_x,st_y,,XMAX,YMAX ; delete area to have clear background<br />
#ZF DAUPHIN ; set font to Dauphin<br />
#FZ WHITE,transparent ; set fontcolors
80<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.10 Radio group - BEGINNER<br />
Explanation of general use of TouchButtons and TouchMacros. There are further examples available,<br />
containig information about Bargraph (see BEGINNER - bargraph_by_touch.kmc 91 ), Buttons (see<br />
BEGINNER - 3 simple buttons.kmc 76 ) and another Example with touch buttons (see EXPERT -<br />
numbers to terminal with autorepeat.kmc 82<br />
)<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Touch\<br />
File:<br />
BEGINNER - touch as radio button.kmc<br />
Commands:<br />
#AR, #AJ<br />
<strong>eDIPTFT43</strong>-A "Touch as Radio Button"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
Button 1 ,<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 30,120,449,120 ; draw a Line<br />
;---- Place some buttons as a radio group ----<br />
OriginX = 200 ; using a constant makes it more easy to move the<br />
group later<br />
OriginY = 160<br />
PitchY = 25<br />
#AF 4 ; set font no. 4 for<br />
Touch area<br />
#FA 8,1 ; define color for font<br />
#AR 1 ; put the following<br />
defined touch switches into the group no. 1<br />
#AC 1,0,1,1 ; use Button 1, no Zoom<br />
#AJ OriginX,OriginY+0*PitchY,'1',0 "L Number 1" ; draw Touch switch - this will<br />
put a "1" ($31, 49 dec.) into send buffer<br />
; the first "L" means<br />
"left aligned text"<br />
#AJ OriginX,OriginY+1*PitchY,'2',0 "L Number 2" ; draw Touch switch - this will<br />
put a "2" ($32, 50 dec.) into send buffer<br />
#AJ OriginX,OriginY+2*PitchY,'3',0 "L Number 3" ; draw Touch switch - this will<br />
put a "3" ($33, 51 dec.) into send buffer<br />
#AJ OriginX,OriginY+3*PitchY,'4',0 "L Number 4" ; draw Touch switch - this will<br />
put a "4" ($34, 52 dec.) into send buffer
ON<br />
How-to-use 81<br />
#AP '1',1 ; preset switch no. 1 to
82<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.11 Keypad - EXPERT<br />
Place a keypad (0..9) and send the numbers to the terminal. There are further examples available,<br />
containig information about Bargraph (see BEGINNER - bargraph_by_touch.kmc 91 ), Buttons (see<br />
BEGINNER - 3 simple buttons.kmc 76 ) and Radio groups (see BEGINNER - radiogroup.kmc 80<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Touch\<br />
File:<br />
EXPERT - numbers to terminal with<br />
autorepeat.kmc<br />
Commands:<br />
#AT<br />
<strong>eDIPTFT43</strong>-A "numbers to terminal with autorepeat"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
; load bitmaps<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open Bitmap<br />
Editor<br />
;-------------------------------------------------------------------------------<br />
; Information about macro definition<br />
; Content:<br />
; 1. Place ELECTRONIC ASSEMBLY Logo<br />
; 2. Define the small blue terminal window<br />
; 3. Define a keypad with numbers 0..9<br />
; 4. Define 10 touch macros for the touch keys 0..9 (key pressed)<br />
; 5. Define one touch macro if any touch key 0..9 is released<br />
; 6. Define 10 process macros for repeat function<br />
;-------------------------------------------------------------------------------<br />
; define constants for touchmacros<br />
Nb1 = 1<br />
Nb2 = Nb1+1<br />
Nb3 = Nb2+1<br />
Nb4 = Nb3+1<br />
Nb5 = Nb4+1<br />
Nb6 = Nb5+1<br />
Nb7 = Nb6+1<br />
Nb8 = Nb7+1<br />
Nb9 = Nb8+1<br />
Nb0 = Nb9+1<br />
Carriage = NB0+1<br />
FormFeed = Carriage+1<br />
Stop = 20<br />
; define constants for processmacros<br />
Pm1 = 1<br />
Pm2 = Pm1+1<br />
Pm3 = Pm2+1<br />
Pm4 = Pm3+1<br />
Pm5 = Pm4+1
Pm6 = Pm5+1<br />
Pm7 = Pm6+1<br />
Pm8 = Pm7+1<br />
Pm9 = Pm8+1<br />
Pm0 = Pm9+1<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;-------------------------------------------<br />
;---- 1. Place ELECTRONIC ASSEMBLY Logo ----<br />
;-------------------------------------------<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;--------------------------------------------------<br />
;---- 2. Define the small blue terminal window ----<br />
;--------------------------------------------------<br />
How-to-use 83<br />
#FT YELLOW,BLUE ; define terminal colors<br />
t_y = 8<br />
ft = 2<br />
t_x = 4<br />
lines=8<br />
column=25<br />
#TW ft,t_x,t_y,column,lines ; define the font (8x16), origin<br />
(5x8=40,7x16=112), width (20 character) and height (7 lines)<br />
; note: origin is defined as column no.7 and line<br />
no.10 (not dots)<br />
#TC 1 ; Terminal on<br />
;----------------------------------------------<br />
;---- 3. Define a keypad with numbers 0..9 ----<br />
;----------------------------------------------<br />
#FA YELLOW,BLACK ; define color for touch font<br />
#AF SWISS30B ; set font for touch area<br />
#AE 20,0 ; set border no. 20<br />
#FE WHITE,BLACK,BLUE, WHITE,BLACK,YELLOW ; set border colors normal and for<br />
selection<br />
; using a constant for (touch)size and (touch)pitch makes it more easy to move the whole<br />
key group later<br />
; XPIXEL=320 and YPIXEL=240 are defined in the file , see line<br />
12<br />
; YPIXEL-80 to have enough space for the header<br />
pitch = 3<br />
ys=(t_y-1)*ft*8 ;terminal is organised in lines 1..30/15, depending on<br />
selcted font -> to calculate pixelpostion, decrement line and multiplay with font height<br />
yh=(YPIXEL-ys-3*pitch)/4<br />
xw = yh+8<br />
xs = XPIXEL-(3*xw+2*pitch)<br />
x=xs<br />
y=ys<br />
#AT x,y,x+xw,y+yh, Nb1,Stop, "1" ; define a touchkey with number "1".<br />
When pressed, touchmacro no. 1 will be executed<br />
x+=pitch+xw ; while release, touchmacro no. 20 will<br />
be executed<br />
#AT x,y,x+xw,y+yh, Nb2,Stop, "2"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Nb3,Stop, "3"<br />
x=xs<br />
y+=pitch+yh<br />
#AT x,y,x+xw,y+yh, Nb4,Stop, "4"<br />
x+=pitch+xw
84<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#AT x,y,x+xw,y+yh, Nb5,Stop, "5"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Nb6,Stop, "6"<br />
x=xs<br />
y+=pitch+yh<br />
#AT x,y,x+xw,y+yh, Nb7,Stop, "7"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Nb8,Stop, "8"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Nb9,Stop, "9"<br />
x=xs<br />
y+=pitch+yh<br />
#AT x,y,x+xw,y+yh, FormFeed,0, "FF"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Nb0,Stop, "0"<br />
x+=pitch+xw<br />
#AT x,y,x+xw,y+yh, Carriage,0, "CCR"<br />
;-------------------------------------------------------------------------<br />
;---- 4. Define 10 touch macros for the touch keys 0..9 (key pressed) ----<br />
;-------------------------------------------------------------------------<br />
DelayTime = 7 ; define a constant for DelayTime (autorepeat process)<br />
RepeatTime = 1 ; define a constant for RepeatTime (autorepeat process)<br />
Pronumber = 1<br />
TouchMacro: Nb1<br />
#ZT "1" ; sends number "1" to terminal window<br />
#MD Pronumber,2, Pm1,Pm1, DelayTime ; defines a process for autorepeating<br />
touchkey "1",<br />
; macro process no.1, type is "run cyclical", run from<br />
processmacro no.1 to processmacro no.1 (see line 171)<br />
TouchMacro: Nb2<br />
#ZT "2"<br />
#MD Pronumber,2, Pm2,Pm2, DelayTime<br />
TouchMacro: Nb3<br />
#ZT "3"<br />
#MD Pronumber,2, Pm3,Pm3, DelayTime<br />
TouchMacro: Nb4<br />
#ZT "4"<br />
#MD Pronumber,2, Pm4,Pm4, DelayTime<br />
TouchMacro: Nb5<br />
#ZT "5"<br />
#MD Pronumber,2, Pm5,Pm5, DelayTime<br />
TouchMacro: Nb6<br />
#ZT "6"<br />
#MD Pronumber,2, Pm6,Pm6, DelayTime<br />
TouchMacro: Nb7<br />
#ZT "7"<br />
#MD Pronumber,2, Pm7,Pm7, DelayTime<br />
TouchMacro: Nb8<br />
#ZT "8"<br />
#MD Pronumber,2, Pm8,Pm8, DelayTime<br />
TouchMacro: Nb9<br />
#ZT "9"<br />
#MD Pronumber,2, Pm9,Pm9, DelayTime<br />
TouchMacro: Nb0<br />
#ZT "0"<br />
#MD Pronumber,2, Pm0,Pm0, DelayTime<br />
TouchMacro: FormFeed<br />
#ZT FF<br />
TouchMacro: Carriage<br />
#ZT CR LF<br />
;---------------------------------------------------------------------<br />
;---- 5. Define one touch macro if any touch key 0..9 is released ----
;---------------------------------------------------------------------<br />
How-to-use 85<br />
TouchMacro: Stop<br />
#MZ Pronumber,0 ; stop autorepeat process (= macro process no.<br />
1) after touchkey release<br />
;---------------------------------------------------------<br />
;---- 6. Define 10 process macros for repeat function ----<br />
;---------------------------------------------------------<br />
ProcessMacro: Pm1<br />
#ZT "1" ; sends number "1" to terminal window<br />
#MZ Pronumber,RepeatTime ; for macro process no.1 change process time to<br />
RepeatTime<br />
; (was originally DelayTime)<br />
ProcessMacro: Pm2<br />
#ZT "2"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm3<br />
#ZT "3"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm4<br />
#ZT "4"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm5<br />
#ZT "5"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm6<br />
#ZT "6"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm7<br />
#ZT "7"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm8<br />
#ZT "8"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm9<br />
#ZT "9"<br />
#MZ Pronumber,RepeatTime<br />
ProcessMacro: Pm0<br />
#ZT "0"<br />
#MZ Pronumber,RepeatTime
86<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.12 Free draw area - BEGINNER<br />
Define a free drawing area. IThere is a an EXPERT example available, too. Please have a look at<br />
EXPERT – free_draw_area.kmc 87<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Draw\<br />
File:<br />
BEGINNER – free_draw_area.kmc<br />
Commands:<br />
#AD<br />
<strong>eDIPTFT43</strong>-A "Free drawing area"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;include Pictures<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 50,100,429,100 ; draw a Line<br />
;--- Place information ---<br />
#FZ WHITE, BLACK ; set color for text<br />
#ZF CHICAGO14 ; set font no.5<br />
#ZL 10, 115,"Drawing area:"<br />
;---- Place buttons ----<br />
#FA WHITE, BLUE ; set color for touchstring<br />
#AE 10, 0 ; touch frame and angle 0°<br />
#FC BLUE, WHITE, BLUE, YELLOW; set color for button<br />
#AF CHICAGO14 ; set font no. 5 for Touch area<br />
#AT 300,160,420,190,1,0, "CClear" ; place touchbutton 1<br />
;---- Place drawing area ----<br />
#FG YELLOW, BLACK ; set color for drawing box<br />
#GR 10,140,250,270 ; place rectangle around drawing area<br />
#AD 11,141,249,269,1, GREEN ; place drawing area, linewith 1 and green drawingline<br />
;-------------------------------------------------------------------------------<br />
TouchMacro: 1<br />
#RL 11,141,249,269 ; clear drawing area
9.13 Free draw area - EXPERT<br />
How-to-use 87<br />
Define a free drawing area. There is a an BEGINNER example available, too. Please have a look at<br />
BEGINNER – free_draw_area.kmc 86<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Draw\<br />
File:<br />
EXPERT – free_draw_area.kmc<br />
Commands:<br />
#AD<br />
<strong>eDIPTFT43</strong>-A "Free drawing area"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open<br />
;-------------------------------------------------------------------------------<br />
;define constants for Touchmacro<br />
CL<strong>EA</strong>R = 1<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- Place drawing area ---dw_xs<br />
= 10<br />
dw_xw = 240<br />
dw_ys = 140<br />
dw_yh = YMAX-dw_ys<br />
#FG YELLOW, BLACK ; set color for drawing box<br />
#GR dw_xs,dw_ys,dw_xs+dw_xw,dw_ys+dw_yh ; place rectangle around drawing area<br />
#AD dw_xs+1,dw_ys+1,dw_xs+dw_xw-1,dw_ys+dw_yh-1,1, GREEN ; place drawing area,<br />
linewith 1 and green drawingline<br />
;--- Place information ---<br />
#FZ WHITE, BLACK ; set color for text<br />
#ZF CHICAGO14 ; set font no.5<br />
#ZL dw_xs, dw_ys-14-5,"Drawing area:"<br />
;---- Place buttons ----<br />
#FA WHITE, BLUE ; set color for touchstring<br />
#AE 10, 0 ; touch frame and angle 0°<br />
#FC BLUE, WHITE, BLUE, YELLOW; set color for button<br />
#AF CHICAGO14 ; set font no. 5 for Touch area<br />
xs = 30+dw_xs+dw_xw<br />
xw = 100<br />
ys = dw_ys<br />
yh = 20<br />
#AT xs,ys,xs+xw,ys+yh,CL<strong>EA</strong>R,0, "CClear" ; place touchbutton 1 (C=centered)
88<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
;-------------------------------------------------------------------------------<br />
TouchMacro: CL<strong>EA</strong>R<br />
#RL dw_xs+1,dw_ys+1,dw_xs+dw_xw-1,dw_ys+dw_yh-1 ; clear drawing area
9.14 Frame - BEGINNER<br />
Show the different borders.<br />
Open file in KitEditor<br />
How-to-use 89<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Frame\<br />
File:<br />
BEGINNER – frame.kmc<br />
Commands:<br />
#RT, #RR<br />
<strong>eDIPTFT43</strong>-A "Different Borders"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place picture no. 1<br />
#GD 40,100,439,100 ; draw a Line<br />
;--- Place 5 Buttons to select different Boarders ---<br />
; use default paramters for Border, color and font of Touchbuttons<br />
#AT 5, 110,80,130,1,0,"Border1"<br />
#AT 5,140,80,160,2,0,"Border2"<br />
#AT 5,170,80,190,3,0,"Border3"<br />
#AT 5,200,80,220,4,0,"Border4"<br />
#AT 5,230,80,250,5,0,"Border5"<br />
#MT 2 ; run a TouchMacro to show something on the screen at startup<br />
TouchMacro 1: ; Called by Button Border1<br />
#FR GREEN,GREEN,TRANSPARENT ; set color for border<br />
#RE 2,0 ; set border no. 2<br />
#MN 1 ; call Macro 1 (draw frame)<br />
TouchMacro 2: ;Called by Button Border2<br />
#FR RED,RED,TRANSPARENT ; set color for border<br />
#RE 15,0 ; set border<br />
#MN 1 ; call Macro 1 (draw frame)<br />
TouchMacro 3: ; Called by Button Border3<br />
#FR BLUE,WHITE,BLUE ; set color for border<br />
#RE 18,0 ; set border no. 18<br />
#MN 1 ; call Macro 1 (draw frame)<br />
TouchMacro 4: ;Called by Button Border4<br />
#RL 180,110,350,260 ; delete area, to draw button<br />
#FE BLUE,WHITE,BLUE, YELLOW,WHITE,YELLOW ; set colors for touchbutton<br />
#AE 18, 0 ; set touchframe no. 18<br />
#FA YELLOW,BLUE ; set colors for fontcolor of touchbutton
90<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#AT 180,150,300,190,6,0,"Border-Button" ; define button<br />
TouchMacro 5: ;Called by Button Border5<br />
#RL 180,110,350,260<br />
#BM 0 ; set fill pattern for bargraph (none)<br />
#FB GREEN,BLACK,TRANSPARENT ; set colour for bargraph pattern, background<br />
and frame<br />
#BE 18 ; set the bargraph frame<br />
type<br />
#BR 1,180,150,340,180,0,100,5 ; define bargraph no. 1 with size, value and<br />
type<br />
#AB 1 ; define bargraph no. 1 to be adjusted by the<br />
touch<br />
#BA 1,75 ; set bargraph no. 1 to value 75<br />
#ZL 180,200,"Bargraph with border"; place info-text<br />
Macro 1: ; Draw Rectangel with selected Border<br />
#RL 180,110,350,260 ; delete area, to draw new frame<br />
#RR 180,110,350,260 ; draw new frame<br />
TouchMacro 6: ; called by Boder-Button<br />
#ZL 180,200,"Border Button was|pressed" ; place text, that Border-Button was<br />
touched<br />
; '|' means new line
9.15 Bargraph by touch - BEGINNER<br />
How-to-use 91<br />
Place a bargraph, that is adjustable by touch and controls the backlight. There is a an EXPERT<br />
example available, too. Please have a look at EXPERT - 2 Bargraphs with backlight dimming.kmc 93 . If<br />
you need <strong>help</strong> using touch functions, please refer to BEGINNER - 3 simple buttons.kmc 76<br />
.<br />
Open file in KitEditor<br />
<strong>eDIPTFT43</strong>-A "2 Bargraphs with backlight dimming"<br />
...<br />
...<br />
...<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Bargraph\<br />
File:<br />
BEGINNER - 2 Bargraphs with backlight<br />
dimming.kmc<br />
Commands:<br />
#BR, #YB<br />
;-------------------------------------------------------------------------------<br />
;Include Pictures<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 50,120,429,120 ; draw a Line<br />
;---- Place a bargraph no. 1 ----<br />
#BM 0 ; set fill pattern for bargraph (none)<br />
#FB GREEN,BLACK,WHITE ; set colour for bargraph pattern, background and<br />
frame<br />
; same as "#FB 4,1,8<br />
#BE 114 ; set the bargraph frame type<br />
#BR 1,40,230,439,277,0,100,5 ; define bargraph no. 1 with size, value and type<br />
#BA 1,57 ; actualize bargraph no. 1 value<br />
#AB 1 ; define bargraph no. 1 to be adjusted by the<br />
touch<br />
;---- show the value of the bargraph 1 on the display ----<br />
#FX GREEN,BLACK ; set the colour of the value text and the<br />
background<br />
#BF 7 ; set the textfont no.7<br />
#BZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#BX 1,260,170,"0=0;100=100" ; place the value of bargraph 1 to row 240 and<br />
line 170<br />
; set the bottom value to 0 and the top to 100<br />
;---- writing "%" as Text to the display ----<br />
#ZF 6 ; set the textfont no.6;<br />
#FZ GREEN,BLACK ; set the colour of the value text and the<br />
background<br />
#ZZ 1,1 ; set the zoom for the text size 1 in horizontal and
92<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
vertical<br />
#ZR 290,185,"%" ; place the text "%" to row 290 and line 170<br />
;---- Place another bargraph no. 2 ----<br />
#FB YELLOW,BLACK,YELLOW ; set colour for bargraph pattern, background<br />
and frame<br />
#BE 123 ; set the bargraph frame type<br />
#BO 2,460,250,480,20,0,100,5 ; define bargraph no. 2 with size, value and type<br />
#BA 2,38 ; actualize bargraph no. 2 value<br />
#AB 2 ; define bargraph no. 2 to be adjusted by the<br />
touch<br />
;---- show the value of the bargraph 2 on the display ----<br />
#FX RED,BLACK ; set the colour of the value text and the<br />
background<br />
#BF 6 ; set the textfont no.6;<br />
#BZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#BX 2,450,180,"0=-12,00;100=12,00" ; place the value of bargraph 2 to row 210 and<br />
line 190<br />
; set the bottom value to -12,0 and the top to<br />
12,0<br />
;---- Brightness adjustment by bargraph 1 ----<br />
#YB 1 ; brightness is adjusted by bargraph no. 1<br />
; the actual brightness value has higher<br />
priority than the bargraph value<br />
; in this example 100% brightness is adjusted<br />
after the YB command<br />
#BA 1,87 ; actualize bargraph no. 1 value; now<br />
brightness is set to 87%<br />
;---- Deactivate transmission of bar ----<br />
#AQ 0 ; deactivate transmision of bar-value to<br />
display's sendbuffer
9.16 Bargraph by touch - EXPERT<br />
How-to-use 93<br />
Place a bargraph, that is adjustable by touch and controls the backlight. There is a a BEGINNER<br />
example available, too. Please have a look at BEGINNER - 2 Bargraphs with backlight dimming.kmc 91 .<br />
If you need <strong>help</strong> using touch functions, please refer to BEGINNER - 3 simple buttons.kmc 76<br />
.<br />
Open file in KitEditor<br />
<strong>eDIPTFT43</strong>-A "2 Bargraphs with backlight dimming"<br />
...<br />
...<br />
...<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Bargraph\<br />
File:<br />
EXPERT - 2 Bargraphs with backlight<br />
dimming.kmc<br />
Commands:<br />
#BR, #YB<br />
;-------------------------------------------------------------------------------<br />
;Include Pictures<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open<br />
;-------------------------------------------------------------------------------<br />
;define constants for bargraph numbers<br />
BR1 = 1<br />
BR2 = 2<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 20<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- Place bargraph no. 1 ---br1x<br />
= 40<br />
br1w = 400<br />
br1y = 230<br />
br1h = YMAX-br1y<br />
#BM 0 ; set fill pattern for bargraph (none)<br />
#FB GREEN,BLACK,WHITE ; set colour for bargraph pattern, background and<br />
frame<br />
; same as "#FB 4,1,8<br />
#BE 114 ; set the bargraph frame type<br />
#BR BR1,br1x,br1y,br1x+br1w,br1y+br1h,0,100,5 ; define bargraph no. 1 with<br />
size, value and type<br />
#AB BR1 ; define bargraph no. 1 to be adjusted by the touch<br />
;---- show the value of the bargraph 1 on the display ----<br />
#FX GREEN,BLACK ; set the colour of the value text and the<br />
background
94<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#BF BIGZIF50 ; set the textfont no.7<br />
#BZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#BX BR1,br1x+br1w/2,br1y-50-5,"0=0;100=100" ; place the value of bargraph 1<br />
right above the bar<br />
; set the bottom value to 0 and the top to 100<br />
;---- writing "%" as Text to the display ----<br />
#ZF SWISS30B ; set the textfont no.6;<br />
#FZ GREEN,BLACK ; set the colour of the value text and the<br />
background<br />
#ZZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#ZL br1x+br1w/2+5,br1y-30-5,"%" ; place the text "%" next to the value of the<br />
bar<br />
;---- Brightness adjustment by bargraph 1 ----<br />
#YB BR1 ; brightness is adjusted by bargraph no. 1<br />
; the actual brightness value has higher<br />
priority than the bargraph value<br />
; in this example 100% brightness is adjusted<br />
after the YB command<br />
#BA BR1,79 ; actualize bargraph no. 1 value; now<br />
brightness is set to 79%<br />
;---- Place another bargraph no. 2 ---br2x<br />
= XPIXEL-10-br1h/2<br />
br2w = br1h ;same thickness as bar1<br />
br2y = 230<br />
br2h = 200<br />
#FB YELLOW,BLACK,YELLOW ; set colour for bargraph pattern, background<br />
and frame<br />
#BE 123 ; set the bargraph frame type<br />
#BO BR2,br2x,br2y,br2x+br2w,br2y-br2h,0,100,5 ; define bargraph no. 2 with<br />
size, value and type<br />
#BA BR2,38 ; actualize bargraph no. 2 value<br />
#AB BR2 ; define bargraph no. 2 to be adjusted by the touch<br />
;---- show the value of the bargraph 2 on the display ----<br />
#FX RED,BLACK ; set the colour of the value text and the<br />
background<br />
#BF SWISS30B ; set the textfont no.6;<br />
#BZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#BX BR2,br2x-5,br2y-30-10,"0=-12,00;100=12,00" ; place the value of bargraph 2<br />
to row 210 and line 190<br />
; set the bottom value to -12,00 and the top to<br />
12,00<br />
;---- Deactivate transmission of bar ----<br />
#AQ 0 ; deactivate transmision of bar-value to<br />
display's sendbuffer
9.17 Instrument by touch - BEGINNER<br />
How-to-use 95<br />
Place an instrument adjustable by touch. Connect back light with instrument. Instruments can be<br />
connected to an analogue input (see BEGINNER - instrument_by_analoginput.kmc 96 ). If you want an<br />
overview about all instruments, refer to EXPERT - show some instruments.kmc 97<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to<br />
use\Instruments\<br />
File:<br />
BEGINNER - compass_by_touch.kmc<br />
Commands:<br />
#IP<br />
<strong>eDIPTFT43</strong>-A "Compass as instrument"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
path <br />
;next line: defines an instrument with kompass.bmp as background, the scale is degree<br />
;double click to open instrument preview and to edit/change instrument settings<br />
Instrument: 1 <br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 50,100,429,100 ; draw a Line<br />
;---- Place Insturment ----<br />
#IP 1, 169,110, 1,0, 0,100 ; place instument no. 1 with angle and start/end value<br />
#A+ 1 ; instrument is controlled by touch<br />
#Y+ 1 ; instrument is assigned to brightness
96<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
9.18 Instrument by analogue input - BEGINNER<br />
Place instrument and connect them with the anlogue input.Instruments can be connected to the<br />
backlight (see BEGINNER - compass_by_touch.kmc 95 ). If you want an overview about all<br />
instruments, refer to EXPERT - show some instruments.kmc 97<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to<br />
use\Instruments\<br />
File:<br />
BEGINNER - instrument_by_analoginput.kmc<br />
Commands:<br />
#IP, #V+<br />
<strong>eDIPTFT43</strong>-A "Instruments controlled by analog input"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
path <br />
;next line: defines an instrument with kompass.bmp as background, the scale is degree<br />
;double click to open instrument preview and to edit/change instrument settings<br />
Instrument: 1 <br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 50,100,429,100 ; draw a Line<br />
#VE 1,"0=0;5000=5.00"<br />
;---- Place Insturment ----<br />
#IP 1, 130,120, 1,0, 0,250 ; place instument no. 1 with angle and start/end value<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VA 1 ; enable analog inputs<br />
;-------------------------------------------------------------------------------<br />
AnalogeMacro: 0 ; rising analog input 1 (->hysteresis)<br />
#VR 1 ; redraw insturment 1 with new anlog value<br />
#VG 1,400,250
9.19 Instrument slide show - EXPERT<br />
Place many instrumentsand connect them with the anlogue input.<br />
Open file in KitEditor<br />
How-to-use 97<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to<br />
use\Instruments\<br />
File:<br />
EXPERT - show some instruments.kmc<br />
Commands:<br />
#IP, #V+<br />
<strong>eDIPTFT43</strong>-A "Instruments controlled by analog input"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO, ; double click to open<br />
path <br />
;next line: defines an instrument<br />
;double click to open instrument preview and to edit/change instrument settings<br />
Instrument_1=1<br />
Instrument_2=2<br />
Instrument_3=3<br />
Instrument_4=4<br />
Instrument_5=5<br />
Instrument_6=6<br />
Instrument_max=20<br />
Instrument: Instrument_1 <br />
Instrument: Instrument_2 <br />
Instrument: Instrument_3 <br />
Instrument: Instrument_4 <br />
Instrument: Instrument_5 <br />
Instrument: Instrument_6 <br />
Instrument: Instrument_max <br />
Wingdings=9<br />
WinFont: Wingdings,"Wingdings",1,0, 231-232, 18<br />
;-------------------------------------------------------------------------------<br />
BT_Left_xstart=5<br />
BT_Left_ystart=250<br />
BT_width=80<br />
BT_height=YMAX-BT_Left_ystart<br />
BT_Right_xstart=XMAX-BT_width-BT_Left_xstart<br />
BT_Right_ystart=BT_Left_ystart<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
YoffLOGO=yoff+PICTURE_H(LOGO)<br />
YSPACE=YPIXEL-YoffLOGO
98<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,YoffLOGO,(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),YoffLOGO<br />
#VA 1 ; enable analog inputs<br />
#VE "0=0.00;5000=5.00" ; set user string for analog output<br />
#VF 1, SWISS30B ; set font for analog output<br />
#ZF Chicago14<br />
#AF Wingdings<br />
#MT Instrument_1<br />
;-------------------------------------------------------------------------------<br />
TouchMacro: Instrument_1<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
; place instument no. 1 with angle and start/end value<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_1))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_1))/2, INSTRUMENT_1,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"voltmeterdown.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_max,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_2,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_2<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_2))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_2))/2, INSTRUMENT_2,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"green amperemeter.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_1,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_3,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_3<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_3))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_3))/2, INSTRUMENT_3,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"handwheel4.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_2,{E7}
How-to-use 99<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_4,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_4<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_4))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_4))/2, INSTRUMENT_4,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"tachometer.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_3,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_5,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_5<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_5))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_5))/2, INSTRUMENT_5,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"WattmeterOutside.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_4,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_6,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_6<br />
#AL 0,0; delete Touchbutton, but remain visible<br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(INSTRUMENT_6))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(INSTRUMENT_6))/2, INSTRUMENT_6,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"Hygrometer.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_5,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_max,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
TouchMacro: Instrument_max<br />
#AL 0,0; delete Touchbutton, but remain visible
100<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#RL BT_Left_xstart+BT_width+1,YoffLOGO+1, BT_Right_xstart-1,YMAX ; delete old<br />
instrument including name<br />
#RL 0,YoffLOGO+1,XMAX,YoffLOGO+1+20<br />
;---- Place Instrument ----<br />
#IP 1,(XPIXEL-INSTRUMENT_W(Instrument_max))/2,YoffLOGO+(YSPACE-<br />
INSTRUMENT_H(Instrument_max))/2, Instrument_max,0, 0,250<br />
#ZR XMAX,YoffLOGO+1,"<strong>EA</strong>.i16"<br />
#V+ 1,1; connect instrument 1 and analog input 1 (AIN1)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
;---- Place navigation buttons ----<br />
#AT<br />
BT_Left_xstart,BT_Left_ystart,BT_Left_xstart+BT_width,BT_Left_ystart+BT_height,0,Instrumen<br />
t_6,{E7}<br />
#AT<br />
BT_Right_xstart,BT_Right_ystart,BT_Right_xstart+BT_width,BT_Right_ystart+BT_height,0,Instr<br />
ument_1,{E8}<br />
#MV 0 ; run analog macro 0 to update instrument<br />
;-------------------------------------------------------------------------------<br />
;using string constants makes it easier to calculate positions<br />
!VOLTAGE! = "Voltage|AnlogIn 1:"<br />
x=400<br />
y=155<br />
AnalogeMacro: 0 ; rising analog input 1 (->hysteresis)<br />
#VR 1 ; redraw instrument 1 with new anlog value<br />
#ZL x,y, !VOLTAGE!<br />
str_par = STRING_P(1,1,0,0,0,0) ; you have to define the string parameters. It's<br />
neccessary for STRIN_W. Please look into <strong>help</strong> (F1) for further information<br />
#VG 1, x+STRING_W(!VOLTAGE!, str_par, Chicago14),y+STRING_H(!VOLTAGE!, str_par,<br />
Chicago14)+3 ;diplay analog value
9.20 Languages/Macro Pages - BEGINNER<br />
How-to-use 101<br />
Describe the important function of different languages, with the <strong>help</strong> of MacroPages. If you want to<br />
use string tables, refer to EXPERT - stringtable.kmc 103<br />
.<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Language\<br />
File:<br />
BEGINNER – multilingual.kmc<br />
Commands:<br />
#MK<br />
<strong>eDIPTFT43</strong>-A "Multilingual Support"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
; constants for language support<br />
GERMAN = 0<br />
ENGLISH = 1<br />
FRENCH = 2<br />
ITALIAN= 3<br />
;------------------------------------------------------------------------------<br />
; Bilder einbinden max. 256 Bilder (0..255)<br />
Path ; specify path<br />
Picture 1 ; double click to open<br />
PATH: <br />
Picture: 100[GERMAN] <br />
Picture: 100[ENGLISH]<br />
Picture: 100[FRENCH] <br />
Picture: 100[ITALIAN]<br />
;------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 50,100,429,100 ; draw a Line<br />
#GD 240,100,240,270<br />
;---- Place some text ----<br />
#FZ WHITE, BLACK ;string color<br />
#ZF CHICAGO14 ;string font<br />
#ZL 5,120, "Select Language:"<br />
;--- 3 Touchbuttons (Language selection) ---<br />
#AE 14,0 ; set Frame style no. 14 and rotation<br />
for Touch (1..20)<br />
#AF 5 ; set font no. 5 for Touch area<br />
#AT 5,150,85,180,1,0 "Deutsch" ; place button "German" and call<br />
TouchMacro 1<br />
#AT 5,190,85,220,2,0 "English" ; place button "English" and call<br />
TouchMacro 2<br />
#AT 95,150,175,180,3,0 "Fran"135"ais" ; place button "French" and call<br />
TouchMacro 3<br />
; the 135 is the decimal value for
102<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
cdille<br />
#AT 95,190,175,220,4,0 "Italiano" ; place button "Italian" and call<br />
TouchMacro 4<br />
;--- Call standard language ---<br />
#MN 1 ; Call macro 1 with standard language (Page=0) i.e. German<br />
;-------------------------------------------------------------------------------<br />
TouchMacro 1:<br />
#MK GERMAN ; select page<br />
#MN 1 ; call macro 1<br />
TouchMacro 2:<br />
#MK ENGLISH ; select page<br />
#MN 1 ; call macro 1<br />
TouchMacro 3:<br />
#MK FRENCH ; select page<br />
#MN 1 ; call macro 1<br />
TouchMacro 4:<br />
#MK ITALIAN ; select page<br />
#MN 1 ; call macro 1<br />
;-------------------------------------------------------------------------------<br />
Macro 1[GERMAN]:<br />
#FZ WHITE, BLACK ; string color<br />
#ZF CHICAGO14 ; string font<br />
#RL 250,110,360,140 ; delete area behind text<br />
#ZL 250,120, "Deutsch" ; write actual language<br />
#UI 250,140,100 ; place picture<br />
Macro 1[ENGLISH]:<br />
#FZ WHITE, BLACK ; string color<br />
#ZF CHICAGO14 ; string font<br />
#RL 250,110,360,140 ; delete area behind text<br />
#ZL 250,120, "English" ; write actual language<br />
#UI 250,140,100 ; place picture<br />
Macro 1[FRENCH]:<br />
#FZ WHITE, BLACK ; string color<br />
#ZF CHICAGO14 ; string font<br />
#RL 250,110,360,140 ; delete area behind text<br />
#ZL 250,120,"Fran"135"ais" ; write actual language<br />
#UI 250,140,100 ; place picture<br />
Macro 1[ITALIAN]:<br />
#FZ WHITE, BLACK ; string color<br />
#ZF CHICAGO14 ; string font<br />
#RL 250,110,360,140 ; delete area behind text<br />
#ZL 250,120, "Italiano" ; write actual language<br />
#UI 250,140,100 ; place picture
9.21 String tables - EXPERT<br />
Different languages, using string table, so you don't need macro pages. If you want to use<br />
MacroPages, refer to BEGINNER – multilingual.kmc 101<br />
.<br />
Open file in KitEditor<br />
How-to-use 103<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Language\<br />
File:<br />
EXPERT - stringtable.kmc<br />
Commands:<br />
#ST, #MK<br />
<strong>eDIPTFT43</strong>-A "Stringtable"<br />
...<br />
...<br />
...<br />
;------------------------------------------------------------------------------<br />
; Bilder einbinden max. 256 Bilder (0..255)<br />
Path ; specify path<br />
LOGO = 1 ; unsing constants makes it easier<br />
Picture: LOGO, ; double click to open<br />
;-------------------------------------------------------------------------------<br />
;define Stringtable (not Stringkonstants)<br />
StringCode = $01 ; define String table code (see command #ST)<br />
ENGLISH = 0<br />
GERMAN = 1<br />
FRENCH = 2<br />
ITALIAN = 3<br />
HELLO = 1<br />
STRING: HELLO[ENGLISH] "Hello World!"<br />
STRING: HELLO[GERMAN] "Hallo Welt!"<br />
;you can use EditBox to write your strings<br />
;please select font (double click on default font.kmi)-> right click on CHICAG14.FXT and<br />
select font for EditBox<br />
;double click on string below and the EditBox will open.<br />
STRING: HELLO[FRENCH] {426F6E6A6F7572208520746F757321} ;same as "Bonjour à tous!"<br />
STRING: HELLO[ITALIAN] "Ciao a tutti!"<br />
;-------------------------------------------------------------------------------<br />
;define constants for normal macros<br />
SHOWSTR = 1<br />
;define constants for touch macros<br />
GER = 1<br />
ENG = 2<br />
FRE = 3<br />
ITA = 4<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart
104<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- Use internal string table ----<br />
#ST StringCode<br />
;--- 3 Touchbuttons (Language selection) --xs<br />
= 5<br />
xw = 80<br />
ys = 150<br />
yh = 30<br />
pitch = 10<br />
x = xs<br />
y = ys<br />
#AE 14,0 ; set Frame style no. 14 and rotation<br />
for Touch (1..20)<br />
#AF CHICAGO14 ; set font no. 5 for Touch area<br />
#AT x,y,x+xw,y+yh,GER,0 "Deutsch" ; place button "German" and call<br />
TouchMacro 1<br />
y+=yh+pitch<br />
#AT x,y,x+xw,y+yh,ENG,0 "English" ; place button "English" and call<br />
TouchMacro 2<br />
x+=xw+pitch<br />
y=ys<br />
#AT x,y,x+xw,y+yh,FRE,0 "Fran"135"ais" ; place button "French" and call<br />
TouchMacro 3<br />
y+=yh+pitch ; the 135 is the decimal value<br />
for cdille<br />
#AT x,y,x+xw,y+yh,ITA,0 "Italiano" ; place button "Italian" and call<br />
TouchMacro 4<br />
;---- Place some text ----<br />
#FZ WHITE, BLACK ;string color<br />
#ZF CHICAGO14 ;string font<br />
#ZL xs,ys-2*pitch, "Select Language:"<br />
;--- Call standard language ---<br />
#MN SHOWSTR ; Call macro 1 with standard language (Page=0) i.e. ENGLISH<br />
;-------------------------------------------------------------------------------<br />
TouchMacro: GER<br />
#MK GERMAN ; select page<br />
#MN SHOWSTR ; call macro 1<br />
TouchMacro: ENG<br />
#MK ENGLISH ; select page<br />
#MN SHOWSTR ; call macro 1<br />
TouchMacro: FRE<br />
#MK FRENCH ; select page<br />
#MN SHOWSTR ; call macro 1<br />
TouchMacro: ITA<br />
#MK ITALIAN ; select page<br />
#MN SHOWSTR ; call macro 1<br />
;-------------------------------------------------------------------------------<br />
Macro: SHOWSTR<br />
#FZ WHITE, BLACK ; string color<br />
#ZF SWISS30B ; string font<br />
#RL xs+2*xw+pitch+5,ys+5,XMAX,ys+5+35 ; delete area behind text<br />
#ZC XPIXEL*3/4,ys+5, StringCode, HELLO
9.22 Analogue Macro - Beginner<br />
How-to-use 105<br />
Show the use of analogue inputs and analogue macros. If you want to use I/Os plese refer to<br />
BEGINNER – Bit Macro.kmc 107 or EXPERT – Port Macro.kmc 109 . In adition you will find halp using<br />
ProcessMacros (see BEGINNER - Prozess Macro.kmc 113 ) and AutomaticMacros (see<br />
EXPERT – Automatic Macro.kmc 111<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Macro\<br />
File:<br />
BEGINNER - Analog Macro.kmc<br />
Commands:<br />
#VG, #V@, #VE<br />
<strong>eDIPTFT43</strong>-A "Analog Macro"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 50,100,429,100 ; draw a Line<br />
#GR 360,110,460,230 ; draw a rectangle<br />
;---- Write some information ----<br />
#FZ WHITE, BLACK ;string color<br />
#ZF CHICAGO14 ;string font<br />
#ZC 100,130, "Analog input (AIN1 Pin 23):"<br />
#ZR 450,130, "Calibration:"<br />
;---- Place a bargraph no. 1 ----<br />
#BM 0 ; set fill pattern for bargraph (none)<br />
#FB GREEN,BLACK,WHITE ; set colour for bargraph pattern, background and<br />
frame<br />
; same as "#FB 4,1,8<br />
#BE 114 ; set the bargraph frame type<br />
#BR 1,10,230,310,260,0,250,5 ; define bargraph no. 1 with size, value and type (250<br />
= Vdd)<br />
;--- Analog input ---<br />
#VB 1, 1 ; assign analog input 1 to bargraph 1<br />
#VR 1 ; redraw bargraph analog input 1<br />
;---- show the value of the analog input 1 on the display ----<br />
#FV 1,GREEN,BLACK ; set the colour of the value text and the<br />
background<br />
#VF 1,7 ; set the textfont no.7<br />
#VZ 1,1,1 ; set the zoom for the text size 1 in<br />
horizontal and vertical<br />
#VE 1,"0=0.000;5000=5.000" ; set new user format for AIN1<br />
#VG 1,250,170 ; place the value of AIN 1
106<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
;---- writing "V" as Text to the display ----<br />
#ZF 6 ; set the textfont no.6;<br />
#FZ GREEN,BLACK ; set the colour of the value text and the<br />
background<br />
#ZZ 1,1 ; set the zoom for the text size 1 in horizontal and<br />
vertical<br />
#ZR 275,195,"V" ; place the text "%" to row 200 and line 145<br />
;--- 2 Touchbuttons (Calibration) ---<br />
#AE 14,0 ; set Frame style no. 14 and rotation for Touch<br />
(1..20)<br />
#AF 5 ; set font no. 5 for Touch area<br />
#AT 370,150,450,180,1,0 "5V" ;<br />
#AT 370,190,450,220,2,0 "3.3V"<br />
;-------------------------------------------------------------------------------<br />
AnalogMacro 0: ; this macro is called by evry change of input voltage AIN1<br />
#VR 1 ; redraw bargraph analog input 1<br />
#VG 1,250,170 ; refresh value<br />
;#VD 1 ; send analog value<br />
;-------------------------------------------------------------------------------<br />
TouchMacro 1:<br />
#V@ 1,5000 ; calibration procedure to set 5.0V<br />
#VE 1,"0=0.000;5000=5.000" ; set new user format for AIN1<br />
;-------------------------------------------------------------------------------<br />
TouchMacro 2:<br />
#V@ 1,3300 ; calibration procedure to set 3.3V<br />
#VE 1,"0=0.000;3300=3.300" ; set new user format for AIN1
9.23 Bit Macro - BEGINNER<br />
How-to-use 107<br />
Get into the use of BitMacros, i.e. get an idea of working with I/Os. There are further examples<br />
available, containig information about AutomaticMacro (see EXPERT – Automatic Macro.kmc 111 ),<br />
ProcessMacros (see BEGINNER - Prozess Macro.kmc 113 ), PortMacros (see BEGINNER -<br />
Port Macro.kmc 109 ) and AnalogueMacros (see BEGINNER - Analog Macro.kmc 105<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Macro\<br />
File:<br />
BEGINNER – Bit Macro.kmc<br />
Commands:<br />
#YW<br />
<strong>eDIPTFT43</strong>-A "Bit Macro"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Picture 1 ; double click to<br />
open Bitmap Editor<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 30,90,449,90 ; draw a Line<br />
#GD 240,90,240,272<br />
;----- OUTPUTS ---<br />
#FZ WHITE, BLACK ;String color<br />
#ZF CHICAGO14 ;String font<br />
#ZL 5,100, "OUTPUTS"<br />
#ZL 5,120, "Port 1 (Pin 25):"<br />
#ZL 5,170, "Port 2 (Pin 26):"<br />
#ZL 5,220 "All ports (Pin 25-32):"<br />
#FE BLUE, WHITE, BLUE, YELLOW, WHITE, YELLOW ; Define button colors<br />
#FA YELLOW, BLUe ; Define text colors<br />
#AF CHICAGO14 ; Touchfont<br />
#AT 5,140,65,160,1,0,"CToggle" ; Define Button with TouchMacro 1<br />
; "C" means aligment centered<br />
#AT 5,190,65,210,2,0,"CSet" ; Define Button with TouchMacro 2(down<br />
code) and 3 (up code)<br />
#AT 75,190,125,210,3,0,"CReset" ; Define Button with TouchMacro 2(down<br />
code) and 3 (up code)<br />
#AT 5,240,65,260,4,0,"CSet" ; Define Button with TouchMacro 3<br />
#AT 75,240,125,260,5,0,"CReset" ; Define Button with TouchMacro 4<br />
;---- INPUTS ---<br />
#FZ WHITE, BLACK ;String color<br />
#ZF CHICAGO14 ;String font<br />
#ZL 260,100, "INPUTS"<br />
#ZL 260, 120, "Port 1:"<br />
#ZL 260, 170, "Port 2:"
108<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
;-------------------------------------------------------------------------------<br />
TouchMacro 1:<br />
#YW 1, 2 ; Toggle port 1<br />
TouchMacro 2:<br />
#YW 2, 1 ; Set port 2<br />
TouchMacro 3:<br />
#YW 2, 0 ; Reset port 2<br />
TouchMacro 4:<br />
#YW 0, $FF ; Set all ports<br />
TouchMacro 5:<br />
#YW 0, 0 ; Reset all ports<br />
;-------------------------------------------------------------------------------<br />
BitMacro 9: ;Port 1 rising edge<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL 280, 140, "1"<br />
BitMacro 1: ;Port 1 falling edge<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL 280, 140, "0"<br />
BitMacro 10: ;Port 2 rising edge<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL 280, 190, "1"<br />
BitMacro 2: ;Port 2 falling edge<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL 280, 190, "0"
9.24 Port Macro - EXPERT<br />
How-to-use 109<br />
Get into the use of PortMacros, i.e. get an idea of working with I/Os. There are further examples<br />
available, containig information about AutomaticMacro (see EXPERT – Automatic Macro.kmc 111 ),<br />
ProcessMacros (see BEGINNER - Prozess Macro.kmc 113 ), BitMacros (see<br />
BEGINNER – Bit Macro.kmc 107 ) and AnalogueMacros (see BEGINNER - Analog Macro.kmc 105<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Macro\<br />
File:<br />
EXPERT – Port Macro.kmc<br />
Commands:<br />
#YW<br />
<strong>eDIPTFT43</strong>-A "Port Macro"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open Bitmap<br />
Editor<br />
;-------------------------------------------------------------------------------<br />
;define constants for bit pattern<br />
PATTERN1= $FE<br />
PATTERN2= $7F<br />
;-------------------------------------------------------------------------------<br />
;define constans for touchmacros<br />
PORT1TOG = 1<br />
PORT2SET = 21<br />
PORT2RES = PORT2SET+1<br />
PORTALLSET = 100<br />
PORTALLRES = PORTALLSET+1<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
#GD XPIXEL/2,yoff+PICTURE_H(LOGO),XPIXEL/2,YMAX<br />
;----- OUTPUTS ---<br />
#FZ WHITE, BLACK ;String color<br />
#ZF CHICAGO14 ;String font<br />
xs=5<br />
y_title = 100<br />
#ZL xs,y_title, "OUTPUTS"<br />
ys=y_title+20<br />
y=ys<br />
pitch=50
110<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#ZL xs,y, "Port 1 (Pin 25):"<br />
y+=pitch<br />
#ZL xs,y, "Port 2 (Pin 26):"<br />
y+=pitch<br />
#ZL xs,y "All ports (Pin 25-32):"<br />
#FE BLUE, WHITE, BLUE, YELLOW, WHITE, YELLOW ; Define button colors<br />
#FA YELLOW, BLUE ; Define text colors<br />
#AF CHICAGO14 ; Touchfont<br />
x=xs<br />
bt_ypitch=18<br />
y=ys+bt_ypitch<br />
yh=20<br />
xw=60<br />
bt_xpitch = 10<br />
x=xs<br />
#AT x,y,x+xw,y+yh,PORT1TOG,0,"CToggle" ; Define Button with TouchMacro<br />
1<br />
; "C" means aligment centered<br />
y+=pitch<br />
#AT x,y,x+xw,y+yh,PORT2SET,0,"CSet" ; Define Button with TouchMacro<br />
2(down code) and 3 (up code)<br />
x+=bt_xpitch+xw<br />
#AT x,y,x+xw,y+yh,PORT2RES,0,"CReset" ; Define Button with TouchMacro<br />
2(down code) and 3 (up code)<br />
y+=pitch<br />
x=xs<br />
#AT x,y,x+xw,y+yh,PORTALLSET,0,"CSet" ; Define Button with<br />
TouchMacro 3<br />
x+=bt_xpitch+xw<br />
#AT x,y,x+xw,y+yh,PORTALLRES,0,"CReset" ; Define Button with TouchMacro<br />
4<br />
;---- INPUTS ---<br />
#FZ WHITE, BLACK ;String color<br />
#ZF CHICAGO14 ;String font<br />
#ZL XPIXEL/2+bt_xpitch,y_title, "INPUTS"<br />
#ZL XPIXEL/2+bt_xpitch, ys, "Port 0x" !HEXSTR(PATTERN1,2)! ':' ; use<br />
<strong>compiler</strong> funtion !HEXSTRING(value, digits)! to complete<br />
#ZL XPIXEL/2+bt_xpitch, ys+pitch, "Port 0x" !HEXSTR(PATTERN2, 2)! ':' ; the<br />
string, even if Bit-patterns are changed (transform constant as hexstring)<br />
;-------------------------------------------------------------------------------<br />
TouchMacro: PORT1TOG<br />
#YW 1, 2 ; Toggle port 1<br />
TouchMacro: PORT2SET<br />
#YW 2, 1 ; Set port 2<br />
TouchMacro: PORT2RES<br />
#YW 2, 0 ; Reset port 2<br />
TouchMacro: PORTALLSET<br />
#YW 0, $FF ; Set all ports<br />
TouchMacro: PORTALLRES<br />
#YW 0, 0 ; Reset all ports<br />
;-------------------------------------------------------------------------------<br />
PortMacro: PATTERN1<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL XPIXEL/2+bt_xpitch, ys+bt_ypitch, "Bit-pattern:|" !BINSTR(PATTERN1, 8)!<br />
PortMacro: PATTERN2<br />
#FZ YELLOW, BLACK ;String color<br />
#ZL XPIXEL/2+bt_xpitch, ys+bt_ypitch+pitch, "Bit-pattern:|" !BINSTR(PATTERN2, 8)!
9.25 Automatic Macro - EXPERT<br />
How-to-use 111<br />
A little animation with the <strong>help</strong> of automatic macros. TThere are further examples available, containig<br />
information about I/Os (see BEGINNER - Analog Macro.kmc 105 , BEGINNER – Bit Macro.kmc 107 ,<br />
EXPERT – Port Macro.kmc 109 ) and a ProcessMacro example (see BEGINNER -<br />
Prozess Macro.kmc 113<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Macro\<br />
File:<br />
EXPERT – Automatic Macro.kmc<br />
Commands:<br />
#MJ<br />
<strong>eDIPTFT43</strong>-A "Automatic Macro"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
LOGO = 1 ; using constants makes it easier<br />
Picture: LOGO ; double click to open Bitmap<br />
Editor<br />
;-------------------------------------------------------------------------------<br />
;define constants for normal macros<br />
Mn1 = 1<br />
Mn2 = MN1+1<br />
Mn3 = MN2+1<br />
Mn4 = MN3+1<br />
Mn5 = MN4+1<br />
Mn6 = MN5+1<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
yoff = 10<br />
#UI (XPIXEL-PICTURE_W(LOGO))/2,yoff,LOGO ; place Picture no. 1<br />
; draw a centered line directly beneath the picture:<br />
#GD (XPIXEL-PICTURE_W(LOGO))/2,yoff+PICTURE_H(LOGO),(XPIXEL-<br />
PICTURE_W(LOGO))/2+PICTURE_W(LOGO),yoff+PICTURE_H(LOGO)<br />
;---- Count up and down ----<br />
#FZ YELLOW,BLACK ; set text color and background color<br />
; YELLOW is defined as 7 (compare with line 12:<br />
"include "<br />
#ZF BIGZIF100 ; set font to no. 8 (Big Numbers)<br />
#MJ Mn1,Mn6,5 ; run macros 1..6 automatically<br />
; MJ = Ping Pong Mode<br />
;---- Place Digit -----<br />
X = XPIXEL/2 ; defining a constant makes it more easy to move the<br />
whole group later<br />
Y = 150<br />
Macro: Mn1<br />
#ZC X,Y "1"
112<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
Macro: Mn2<br />
#ZC X,Y "2"<br />
Macro: Mn3<br />
#ZC X,Y "3"<br />
Macro: Mn4<br />
#ZC X,Y "4"<br />
Macro: Mn5<br />
#ZC X,Y "5"<br />
Macro: Mn6<br />
#ZC X,Y "6"
9.26 Process Macro - BEGINNER<br />
How-to-use 113<br />
A little animation with the <strong>help</strong> of automatic macros. There are further examples available, containig<br />
information about I/Os (see BEGINNER - Analog Macro.kmc 105 , BEGINNER – Bit Macro.kmc 107 ,<br />
EXPERT – Port Macro.kmc 109 ) and an AutomaticMacro example (see<br />
EXPERT – Automatic Macro.kmc 111<br />
).<br />
Open file in KitEditor<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Macro\<br />
File:<br />
BEGINNER - Prozess Macro.kmc<br />
Commands:<br />
#MD<br />
<strong>eDIPTFT43</strong>-A "Prozess Macro"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
Path <br />
Picture 1 ; double click to open Bitmap Editor<br />
;-------------------------------------------------------------------------------<br />
Macro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,0,1 ; place Picture no. 1<br />
#GD 30,90,449,90 ; draw a Line<br />
;---- Count up and down ----<br />
#FZ YELLOW,BLACK ; set text color and background color<br />
; YELLOW is defined as 7 (compare with line 12:<br />
"include "<br />
#ZF 8 ; set font to no. 8 (Big Numbers)<br />
#MD 1,3, 1,6, 5 ; define macro process 1, pingpong mode, call<br />
automatic macro 1 to 6 delay 5/10s<br />
;---- Place Digit -----<br />
X = 240 ; defining a constant makes it more easy to move the whole<br />
group later<br />
Y = 150<br />
ProcessMacro: 1<br />
#ZC X,Y "1"<br />
ProcessMacro: 2<br />
#ZC X,Y "2"<br />
ProcessMacro: 3<br />
#ZC X,Y "3"<br />
ProcessMacro: 4<br />
#ZC X,Y "4"<br />
ProcessMacro: 5<br />
#ZC X,Y "5"
114<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
ProcessMacro: 6<br />
#ZC X,Y "6"
9.27 Change display orientation - BEGINNER<br />
Change the display orientation in every possible direction.<br />
Open file in KitEditor<br />
How-to-use 115<br />
Folder:<br />
\ELECTRONIC_ASSEMBLY_LCD-Tools-<br />
Portable\Data\eDIP - intelligent graphic<br />
displays\<strong>eDIPTFT43</strong>-A\How to use\Display orientation\<br />
File:<br />
BEGINNER – change displayorinetation.kmc<br />
Commands:<br />
#DO<br />
<strong>eDIPTFT43</strong>-A "Displayorientation"<br />
...<br />
...<br />
...<br />
;-------------------------------------------------------------------------------<br />
;Include Pictures<br />
Path <br />
Picture 1 ; double click to open<br />
;-------------------------------------------------------------------------------<br />
Makro: MnAutoStart<br />
;---- Place ELECTRONIC ASSEMBLY Logo ----<br />
#TC 0 ; Cursor invisible<br />
#UI 122,20,1 ; place Picture no. 1<br />
#GD 50,120,429,120 ; draw a Line<br />
;---- Place Button ----<br />
#AF CHICAGO14 ; define next buttons as radiogroup 1<br />
#AE 2, 0 ; slect touchframe<br />
#AT 170, 150, 310, 175, 1,0,"CChange orientation" ; place button to change<br />
orientation, 'C'=center aligned<br />
;-------------------------------------------------------------------------------<br />
TouchMacro: 1<br />
#DO 1 ; set displayorientation to 90°<br />
#AL 0,0; delete touchbuttons<br />
#DL ; clear display<br />
#UI 18,20,1 ; place logo<br />
#GD 10,120,262,120 ; draw a Line<br />
#AT 66, 150, 206, 175, 2,0,"CChange orientation" ; place button to change<br />
orientation, 'C'=center aligned<br />
TouchMacro: 2<br />
#DO 2 ; set displayorientation to 180°<br />
#AL 0,0; delete touchbuttons<br />
#DL ; clear display<br />
#UI 122,20,1 ; place Picture no. 1
116<br />
<strong>EA</strong> <strong>eDIPTFT43</strong>-A <strong>compiler</strong> <strong>help</strong><br />
#GD 50,120,429,120 ; draw a Line<br />
#AT 170, 150, 310, 175, 3,0,"CChange orientation" ; place button to change<br />
orientation, 'C'=center aligned<br />
TouchMacro: 3<br />
#DO 3 ; set displayorientation to 270°<br />
#AL 0,0; delete touchbuttons<br />
#DL ; clear display<br />
#UI 18,20,1 ; place logo<br />
#GD 10,120,262,120 ; draw a Line<br />
#AT 66, 150, 206, 175, 4,0,"CChange orientation" ; place button to change<br />
orientation, 'C'=center aligned<br />
TouchMacro: 4<br />
#DO 0 ; set displayorientation to 0°<br />
#AL 0,0; delete touchbuttons<br />
#DL ; clear display<br />
#MN 0 ; call Macro MnAutoStart