Download ACS Color 320 x 240 LCD Basic Programming

Transcript
ACS Color 320 x 240 LCD Basic Programming Manual
8 September 2014
Table of Contents
Welcome Newbies!....................................................................................................................... 11
… And Hello Programmers ....................................................................................................................11
To Get Started… ....................................................................................................................................11
Powering the Color LCD .................................................................................................................11
Via SERIAL Connector with ACS Power Injector ....................................................................11
Via USB DEVICE Connector with USB Cable ........................................................................12
Via ETHERNET Connector with Power Over Ethernet ...........................................................12
Communicating with the Color LCD ..............................................................................................13
Serial Connection via RS-232 ..................................................................................................13
Serial Connection via USB .......................................................................................................13
TCP/IP Raw Connection via Ethernet ......................................................................................13
Terminal Emulator Programs ............................................................................................14
PS/2 Keyboard .........................................................................................................................14
Pop-up Keypad .........................................................................................................................14
Configuring the Color LCD Display ...............................................................................................14
What the Color LCD Understands ..................................................................................................17
Talking to the Color LCD ...............................................................................................................17
There Are Rules… ..........................................................................................................................18
Remembering Numbers and Strings ................................................................................................19
Rules for Numeric Data ...........................................................................................................20
Rules for String Data ...............................................................................................................20
Variable Rules ..........................................................................................................................20
Remembering Commands ...............................................................................................................21
Changing your Program ..........................................................................................................23
Controlling the Program Execution .........................................................................................24
Program Rules .........................................................................................................................25
Learning How to Count ...................................................................................................................26
Counting Rules .........................................................................................................................29
Remembering your Programs ..........................................................................................................30
Saving Rules .............................................................................................................................31
Things to do with Numbers .............................................................................................................32
Only Whole Numbers Please ....................................................................................................32
The Size of Numbers .................................................................................................................32
Comparing Numbers ................................................................................................................33
Combining Numbers in Order ..................................................................................................33
Numeric Operator Rules ..........................................................................................................34
Things to do with Strings ................................................................................................................35
Comparing Strings ...................................................................................................................35
Now for Something at Random .......................................................................................................36
It’s a Function!.........................................................................................................................37
Function Rules .........................................................................................................................37
A Casual Remark......................................................................................................................37
Functions Returning a Number ................................................................................................38
Copyright©2010-2014 by ACS, Sarasota, Florida
ALL RIGHTS RESERVED