Home

128X64 Graphic LCD Module User`s Manual A129 Ver 0.3

image

Contents

1. 4 Code Set 1 ee ee eee See Mae i 5 o quoc ow prse dee eed Ws ee 592A e etr pue E s Pi t 5 Eg pog posed 5 ICP Electronics Inc Page 19 25 u P 2 2 2 2 2 5 RE Code Set 2
2. eed ERE ee ERR ERR is Oe Ene sis up o ICP Electronics Inc Page 20 25 Appendix D Demo Program 1 Title A129 Demo program Editor Davis Wang in ICP Electronic Compilier 2 0 OS DOS 6 22 or Above Execute C print String where String will display on LCD e g C print ICP Electronic include lt dos h gt include lt stdio h gt include lt conio h gt define COMI 0 3 8 define COM2 0x28 define IOBASE 1 void InitUART void outport IOBASE 3 0x80 Line Control Register outport IOBASE 0 0x60 Divisor Latch Low outport IOBASE 1 0x00 Divisor Latch High outport IOBASE 3 0x03 void SendByte char ch ICP Electronics Inc Page 21 25 sees while inport IOBASE 5 amp 0x20 outport IOBASE ch unsigned char GetByte void while inport IOBASE 5 amp 0x01 return inport IOBASE void SendString char 5 int i j i strlen s SendByte 0x4D prefix code SendByte 0x52 put string SendByte 0x00 normal mode for j 0 j lt i j SendByte s j SendByte 0x0a Line Feed void main int argc char argv InitUART SendString argv 1
3. Page 25 25
4. Demo Program 2 Title A129 Demo program Editor Davis Wang in ICP Electronic Compilier 2 0 ICP Electronics Inc Page 22 25 OS DOS 6 22 or Above Execute C rect xl yl x1 y2 Draw rectangle LCD where x1 y1 is left up corner and x2 y2 is the right bottom corner e g C rect 0 0 120 30 include lt dos h gt include lt stdio h gt include lt conio h gt define COMI 0x3f8 define COM2 0x28 define IOBASE COM1 void InitUART void outport IOBASE 3 0x80 Line Control Register outport IOBASE 0 0x60 Divisor Latch Low outport IOBASE 1 0x00 Divisor Latch High outport IOBASE 3 0x03 void SendByte char ch while inport IOBASE 5 amp 0x20 outport IOBASE ch unsigned char GetByte void while inport IOBASE 5 amp 0x01 return inport IOBASE ICP Electronics Inc Page 23 25 void DrawRect unsigned char x1 unsigned char yl unsigned char x2 unsigned char y2 SendByte 0x4D SendByte 0x62 SendByte x1 SendByte y1 SendByte x2 SendByte y2 SendByte 0x01 Display On void main int argc char argv InitUART DrawRect atoi argv 1 atoi argv 2 atoi argv 3 atoi argv 4 Demo Program 3 Title A129 Demo program Editor Davis Wang in ICP Electronic Compilier 2 0 DOS 6 22 or Abo
5. Direction A129 Content Report LED Status Command 0x53 0x04 0 OxYY Emphasis 0x53 Prefix Code 0x04 Report LED status Ox XXY Y LED on off XXYY lt 15 0 gt LED lt 15 0 gt 1 On 0 Off Response To Get LED Status 0x03 Example 0x53 0x04 0x00 OxOF LED lt 3 0 gt is On Acknowledge from Report Switches Status 0x05 Direction 129 Content Report Switches Status Command 0x53 0x05 OxXX OxYY Emphasis 0x53 Prefix code 0x05 Report Switches status OxXXXY Y Switches on off XXYY lt 15 0 gt Switch lt 15 0 gt 1 Pressed O Release Note This command will automatic report when the switch is pressed The Shift Encoder rotate CW CCW one step will be treat like switch 0 or 1 be pressed once and release Response To Auto Report or Receive Get Switches Status Command 0x06 Example 0x53 0x05 0x00 0x01 Sw0 is On Acknowledge from PC Get Switches Status 0x06 Direction PC 129 Content Get Switches Status Command 0 4 0x06 Emphasis 0x4D Prefix Code 0x06 Get Switches status Response To None Example 0x4D 0x06 Acknowledge 0 53 0x05 0x00 0x01 Report Switch Status Sw0 is from A129 Get Protocol version 0x07 Direction PC gt 129 Content Get Protocol version Command Ox4D 0x07 Emphasis 0x4D Prefix code 0x07 Get Protocol version Response To
6. Delete a Block from Flash ROM 0x57 Save a Block to Flash ROM 0x55 Display a Block to LCD 0x56 ICP Electronics Inc Page 7 25 Appendix A The Graphic LCD A129 Communication Protocol Version 0 2 128x64 dots Get ID 0x00 Direction PC gt A129 Content Get ID Command 0x4D 0x00 Emphasis 0x4D Prefix Code 0x00 Get ID Response To None Example 0x4D 0x00 Acknowledge 0 53 0x01 0x00 0x81 from A129 Report ID 0x01 Direction 129 gt Content Report ID Command 0x53 0x01 OxXX OxYY Emphasis 0x53 Prefix code 0x01 Report ID OxXXY Y ID Response To Get ID Example 0x53 0x01 0x00 0x81 Board 0 0081 129 Acknowledge from PC Set LED On Off 0x02 Direction PC A129 Content Set LED On Off Command Ox4D 0x02 OxXX OxYY Emphasis 0x4D Prefix 0x02 Set LED On Off 0OxXXY Y LED on off XXYY lt 15 0 gt LED lt 15 0 gt 1 On 0 off Response To None Example 0x4D 0x02 0x00 0x03 Set On Acknowledge from A129 Get LED Status 0x03 Direction PC 129 Content Get LED Status Command 0 4 0x03 Emphasis 0x4D Prefix code 0x03 Get LED Status Response To None Example Ox4D 0x03 Acknowledge 0 53 0x04 0x00 0x03 Report LED Status now LEDO LEDI is On from A129 ICP Electronics Inc Page 8 25 es Report LED Status 0x04
7. from A129 Rectangular 0x62 Draw a Rectangular start left upper corner at Y and stop at nght bottom corner at Ox4D Prefix code 0x62 Draw a Rectangular Command 0xXX left upper X Coordinate 0x00 to Ox 7F Ox Y Y left upper Y Coordinate 0x00 to Ox3F OxXX right bottom X Coordinate 0x00 to Ox7F OxY Y right bottom Y Coordinate 0x00 to 0x3F 0xDD Display On Off 0x01 Display On draw 0x00 Display Off erase 0x4D 0x62 0x00 0x00 0x7F 0x01 Draw a Rectangular from 0 0 to 127 63 0x4D 0x62 0x10 0x20 0x15 0x25 0x00 Erase a Rectangular from 16 32 to 21 Select Code Set 0x63 Direction PC A129 Content Select Code Set Command Ox4D 0x63 OxXX Emphasis 0x4D Prefix code 0x63 Select Code Set 0xXX Code Set Number from 0 to 2 Response To None Example Ox4D 0x63 0x01 Select Code Set 1 about the content of code set please see Appendix C Acknowledge from A129 Get Code Set 0x64 Direction PC 129 Content Get Code Set Number now be set Command 0 4 0x64 Emphasis 0x4D Prefix code 0x64 Get Code Set Number Response To None Example Ox4D 0x64 Acknowledge 0 53 0x65 0x01 Report Code Set Number Now be Set on Code Set 1 from a129 Report Code Set 0x65 Direction A129 PC Content Report The Code Set Number Now be Set Command 0x53 0x65 OxXX Emphasis 0x
8. 4 0x50 0x10 0x20 0x00 Will turn off or erase the point on 16 32 a white point instead the previous one B Line Send to 4129 0x4D 0x51 0x00 0x00 0x64 0x64 0 01 Will draw a Line from 0 0 to 100 100 Where 0x4D The prefix code 0x51 Drawing a line 0x00 0x00 The Start Point of line 0x64 0x64 The End Point of Line 0x01 Display on The Same you can use 0x00 to instead 0x01 to erase the whole line C Rectangle Send to A129 0x4D 0x62 0x00 0x00 Ox7F Ox3F 0 01 Will draw a Rectangular from 0 0 to 127 63 Page 4 25 Where 0x4D The prefix code 0x62 Drawing a Rectangle 0x00 0x00 Start point at 0 0 0x7F 0x3F End point at 127 63 0x01 Display On How to Turn Off the Back Light of LCD Sometime if you feel the back light of LCD is too bright or not necessary you can turn off it by this way Send to 4125 0x4D 0 5 0x00 Where 0x4D the same and OxSE is the command to turn on off the LCD back light and 0x00 instruct to turn off Also similarly Send to A125 0x4D Ox5E 0x01 Will turn on the back light of LCD How to store a block and display on the LCD A129 implement a 512K bytes of Flash ROM memory which could store approximately about 260 096 display points where one point will occupy 2 byte of memory and which could be separate into 8 big block set and one big block set own 256 block maximum each block will be assigned a block number from 0 to 255 and wil
9. Move Cursor to Text Position M N one character is a 8x6 dots square Command 0 4 0x54 0xMM OxNN Emphasis 0x4D Prefix code 0x54 Cursor Goto Command 0xMM Horizon Position relate to Left corner 0x00 to 0x14 OXNN Vertical Position relate to Upper corner 0x00 to 0x07 Note The text window only have 21 column width and 8 rows Response To None Example 0 0 4 0x54 0x04 0x05 Cursor move to Column 4 Row 5 Save a Block to Flash ROM 0x55 0x4D Prefix code 0x55 Save a Block OXMM Block Set 0x00 to 0x07 OxNN Block Number 0x00 to OxFF OxPP hi OxPP_lo Points in Block 0x0001 to OxFE00 X Coordinate of Point 1 0x00 to Ox7F Y Coordinate of Point 1 0x00 to Ox3F X Coordinate of Point 2 0x00 to 0x7F OxY Y Y Coordinate of Point 2 0x00 to Ox3F Coordinate relate to left upper corner of block Note if the Block Set Over 0x07 or there are no valid memory to save LCD will response a NAK to this command Ox4D 0x55 0x01 0x00 0x00 0x04 0x00 0x08 0x00 0x09 0x01 0x08 0x01 0x09 Save a Block to Flash ROM Block Set 0x01 Block Number 0x00 Total 4 points point are 0 8 0 9 1 8 1 9 ICP Electronics Inc Page 11 25 fromAI29 Display a Block from Flash ROM to LCD 0x56 0x4D Prefix code 0x56 Display the Block to LCD 0xMM The Block Set 0x00 to 0x07 OXNN Block Number 0x00 to OxFF 0xDD Display On Off 0x01 Display On Draw 0x00 Disp
10. 8 bit stop bit no parity check default 12V Signal Note If A129 want to be installed on a 5V signal transaction UART please refer to Appendix B for modification ICP Electronics Inc Page 2 25 Cable Transmit from PC to A129 Transmit from A129 to PC COM1 or COM2 How to Displaying Messages on LCD A129 is able to display most of the characters you can find in the ASCII codes Here is an example to display text messages on the LCD Send to 4129 0 40 052 0x00 0x48 0x65 Ox6c Ox6c Ox6f 0x0a Where 0x4D The prefix code 0x52 Put String on LCD 0x00 Normal Display 0x48 0x65 0 Ox6c Ox6f ASCII codes for Hello New line You can see the text Hello is display on the upper left corner of LCD like Hello And give you a new line below Cursor is un viewable Alternately if you use the control code 0x00 to instead of like Send to 129 0x4D 052 0x00 0x48 0x65 0 Ox6c 0x6f 0x00 where the last 0x00 illustrate the end of string And Send twice again you will get the display like below which will immediately follow last character of string HelloHello lt Certainly when text fill all the screen and cursor move to the bottom of screen then the screen will rolling up one line for new string to be put Another method to display string is like that Send to A129 0x4D 0x54 0x04 0x05 Where 0x4D The pre
11. 29 0x4D 0x55 0x00 0x00 0x00 0x04 0x00 0x08 0x00 0x09 0x01 0x08 0x01 0x09 Where 0x4D The prefix code 0x55 Save a Block to Flash ROM 0x00 Block Set assign to 0 0x00 Block number assign to 0 0x00 0x04 There are four points in this block 0x00 0x08 Point one 0 8 0x00 0x09 Point two 0 9 0x01 0x08 Point three 1 8 0x01 0x09 Point four 1 9 Where these four points will relate to a reference point to the left up corner of this block and which is un visible but later will be treat as the anchor point by command Display a Block from Flash ROM to LCD 0x56 ICP Electronics Inc Page 6 25 B Display a Block from Flash ROM to LCD Send to A129 0x4D 0x56 0x00 0x00 0x01 0x30 0x30 Will draw block 0 of block set 0 on start point 48 48 Where 0x4D The prefix code 0x56 Display a block from Flash ROM to LCD 0x00 Block Set 0 0x00 Block Number 0 0x01 Display On 0x30 0x30 The reference point or start point or anchor point at 48 48 A129 Support totally 8 command to manage the block memory and could be simply separated into three groups more detail description please reference to Appendix A Globally Memory Commands Reset OxFF Which will clear all block memory and set custom ID to 0x00 Block Set Related Commands How Many Flash ROM Available 0x58 Report How Many Flash ROM Available 0x59 Get Block Status 0x68 Report The Block Status 0x69 Unit Block Related Commands
12. 3 0x59 0x00 0x00 OxFE There are 254 pages 64516 bytes available in Flash ROM in Block Set 0 Acknowledge ICP Electronics Inc Page 12 25 from PC Write Custom ID 0x5B 1 PC A129 Write Custom ID to EEPROM Ox4D 0x5B OxID Ox4D Prefix code OxX5B Wirite Custom ID to EEPROM OxID Custom ID 0x00 to OxFF Custom ID is a free and special reserved byte for custom to make a mark on block ID memory Custom could use this byte to identify the history of programming of block memory Nowe 0x4D 0x5B Put a mark into block ID memory Acknowledge from A129 Get Custom ID 0x5C i mphasis 0x4D Prefix code 0x5C Get Custom ID xample 0x53 0 5 Report Custom ID m me Bass Se 6 BISIS amp 3 gt 5 S 15 Report Custom ID 0x5D i 129 Report Custom ID 0x53 0x5D OxID 0 53 code Ox5D Report Custom ID 0xID Custom ID which has been writen by Write Custom ID Command Get Custom ID 0x5C 0x53 0x5D Custom ID is gt e 02 1518 2 ale 5 13 Set Back Light On Off 0 5 i PC A129 0x4D Prefix code 0 5 5 Back Light On Off 0 0 0 00 Back Light off 0x01 Back Light On ICP Electronics Inc Page 13 25
13. 53 Prefix code 0x65 Report The Code Set Now be Set Ox XX The Code Set Now Be Set Response To Get Code Set 0x64 Example 0x53 0x65 0x01 Report Code Set Number Now be Set on Code Set 1 Acknowledge from PC None ICP Electronics Inc Page 14 25 Get Block Set Status 0x68 Direction PC gt A129 Content Get Block Set Status Get How many blocks are exist in the block set x and what is the block number be used Command 0 4 0x68 0xMM Emphasis 0x4D Prefix code 0x68 Get Block Set Status 0x MM Block Set 0x00 to 0x07 Response To None Example 0x4D 0x68 0x00 Get Block Set 0 Status Acknowledge 0 53 0x69 0x00 0x00 0x08 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Report from A129 Block Set 0 Status there are 8 block exist in block set 0 block number are 0 1 2 3 4 5 6 7 Report Block Set Status 0x69 Direction A129 Content Report The Block Set Status Command 0x53 0x69 OXMM OxBB OxNNo OxNN OxNN Emphasis 0x53 Prefix code 0x69 Report The Block Set Status OX MM The Block Set to be Report OXAABB The Number of Block exist in the Block Set 0 0xNNx The Block Number exist has been registered in this Block Set Response To Get Block Status 0x68 Example 0x53 0x69 0x00 0x00 0x04 0x00 0x01 0x07 Ox08 There are 4 block in Block Set 0 wh
14. ART 5 To switch between UART 5V and RS232 12V signal interfaces please refer to the table below UART 0 ohm or RS232 RS232 ine like 7 T N A LT1381CS ICP Electronics Inc Page 17 25 Appendix C LCD Module supported ASCII codes and Symbol codes Code Set 0 Ped d cde ee ee eee e _ ees et D E F G H I J K L M N Q R S T U V w xX Y Z qe redes sg Spe sig pw rose op s gt PT AT te qo sip ee ee ea ae cep E ge qox NENHETEZZEBMEEZEEEREEZZLINMEZEENEGS ICP Electronics Inc Page 18 25 EET paf a p eoe
15. ICP Electronics Inc Page 1 25 128X64 Graphic LCD Module User s Manual A129 Ver 0 3 Author Davis Wang ICP Electronics Inc Introduction A129 15 an 128X64 dots Graphic LCD Module designed for system to display messages The maximum allowed 8 lines and 21 columns characters to be shown in one screen The device is easy to install because it uses only a 2 wire RS232 Transmit and Receive interface to communicate with system and another 2 wires for 5V power supply and ground connectivity Based on ICP Peripheral Communication Protocol in Appendix A A129 also provide two readable buttons and one shift encoder roller switch for system to access external information three basic graphic elements like point line and rectangle for user easy to construct their own display background and block function supported which can save graphic patterns in memory and be call out to display on the LCD Features 128 64 B W dots 8 lines and 21 columns text mode Build in Over 512 symbols and characters Support point line and rectangle drawing functions Support block save 512KB volatile memory and block recall functions Implementation The device consist of two major components a One A129 board b UART Cable Pin definition Yee Power 5V RS232 ane From 5V power in RS232 Das Output mm ow 4 GND Power Ground The RS232 uses fixed 1200 Baud Rate
16. None Example 0 4 0x07 Acknowledge 0 53 0x08 00 0x02 Report Protocol version is 0 2 from A129 Report Protocol Version 0x08 Direction A129 Content Report Protocol version Command 0x53 0x08 OxXX OxYY ICP Electronics Inc Page 9 25 OO 0x53 Prefix code 0x08 Report Protocol version 0xXX Class 0x00 OxFF OxY Y version 00 FF Get Protocol Version 0x07 Emphasis Response To Example 0x53 0x08 0x00 0x02 Version 0 2 Acknowledge from Display Character On 0x0C PC A129 Display Character on LCD x4D OxOL OxON OxCC 0xCCi5 0x4D Prefix Code 0x0C Display Character On LCD 0x0L 0x00 Line 0 0x07 Line 7 OxON N Character 1 21 no more than 21 characters OxCCn Code of Characters Pls Reference Appendix C Code Set Table 0x4D 0x0C 0x01 0x03 0x49 0x43 0x50 Line 1 3 Characters Clear LCD 0x0D Direction PC 129 Content Clear LCD Command 0 4 0x0D Emphasis Ox4D Prefix code 0x0D Clear LCD Response To None Example 0 4 0x0D Acknowledge from A129 Point 0x50 Direction PC gt 129 Content Draw a Point on X Y Command 0 4 0x50 OxDD Emphasis Ox4D Prefix Code 0x50 Draw a Point Command 0xXX X coordinate 0x00 to Ox7F OxY Y Y Coordinate 0x00 t0 Ox3F OXDD Display On Off 0x01 Display On d
17. fix code 0x54 Cursor Move to 0x04 0x05 Column 4 Row 5 Where the direction of Column and row can be point like ICP Electronics Inc Column And then Send to 129 0x4D 052 0x00 0x48 0x65 0 Ox6f 0x00 Hello Which will display Hello start on column 4 row 5 Also if the display mode be changed to 0x01 the inverse mode where will inverse the string display on the screen Like Send to A129 0x4D 052 0x01 0x48 0x65 Ox6c Ox6c Ox6f 0x0a Hello lt Page 3 25 Please reference the Appendix C to see the content of three code sets that A129 provide and reference the Select Code Set Command 0x63 Appendix A and select properly code set to be used Example Send to A129 0x4D 0x63 0x01 Which will select Code Set 1 Note A129 is default set to use code set 0 when power on How to draw a point line and rectangle LCD A129 is easy to let you display the basic drawing elements on the LCD below is some example show to you A Point Send to 4129 0x4D 0x50 0x10 0x20 0x01 Where 0x4D The prefix code 0x50 Drawing a Point 0x10 0x20 On Point 16 32 0x01 Display On Which will draw a point at vector 16 32 The last byte 0x01 illustrate the point is turn on and can be seen a black point on the LCD Where the coordinate on the screen can be show like ICP Electronics Inc Alternately if use the 0x00 to instead 0 01 which like Send to A129 0
18. ich are Block Number 0 Block Number 1 Block Number 7 and Block Number 8 Acknowledge from PC Ack Direction 129 Content Simple Ack Command OxFA Emphasis OxFA Ack Response To Save a Block to Flash ROM 0x55 Delete a Block in the Flash ROM 0x57 Example OxFA Acknowledge from PC 0xFB Direction A129 PC Content Negative Ack Command 0x53 OxFB 0xCC Emphasis 0x53 Prefix code OxFB Negative Ack 0xCC Command Response To Ack No Support this command 0xCC Example 0x53 OxFB Command Acknowledge from Reset ICP Electronics Inc Page 15 25 SS EEO Direction PC 129 Content Reset this command will clear all contents in block memory and set custom ID to 0x00 This command will take about 60 sec to finish Command 0 4 OxFF Emphasis 0x4D Prefix code Command Response To None Example 0 4 OxFF Acknowledge 0x53 from A129 Reset OK 0xAA Direction A129 gt Content Reset OK Command 0x53 OxAA Emphasis 0x53 Prefix code OXAA Reset Response To Reset OxFF Example 0x53 Acknowledge from ICP Electronics Inc Page 16 25 Appendix B Modifying A129 to UART 5V Signal or RS232 12V Signal The internal signal from the micro processor of A129 is U
19. l ICP Electronics Inc Page 5 25 share memory maximum 64K bytes user could polling the memory are left in by How Many Flash ROM available 0x58 estimate the memory will used before to write into else if A129 find there is not enough memory during writing A129 will NAK the writing and delete the contents be written concurrently The estimate method is quite easy if the block has 230 black points where will use up 230 x 2 640 bytes memory to store second polling the A129 use Send to 4129 0x4D 0x58 0x00 Where 0x4D The prefix code 0x58 How Many Flash ROM are available 0x00 Assign Block Set 0 to be questioned And receive the answer from A129 Receive from A129 0x53 0x59 0x00 0x01 0x00 Wher 0x53 The prefix code 0x59 Report How Many Flash ROM are available 0x00 Block Set 0 0x01 Hi Byte of pages 0x00 Lo Byte of pages So there 1s 0x0100 256 pages 256 x 254 bytes 1 page 254 bytes vacuous memory in block set 0 which could allow you to save about 256 x 254 2232512 points in This mean the block is safe to store into the block set 0 memory if the memory required does not exceed over 32512 points Certainly 129 provide a reserve byte for custom to program to identify or mark the writing history of memory detail please see the three command of Appendix A Write Custom ID 0x5B Get Custom ID 0x5C Report Custom ID 0x5D A Savethe block into memory example Send to 41
20. lay Off Erase 0xXX Start at Point X Coordinate 0x00 to 0 7 and OxYY Start at Y Coordinate 0x00 to 0x3F relate to left upper corner of block 0x4D 0x56 0x00 0x00 0x01 0x30 0x30 Display the Block Set Block Num 0x00 0x00 at 48 48 Display Mode On Acknowledge from A129 Delete a Block in the Flash ROM 0x57 Direction PC gt 129 Delete the Block which has saved in Flash Rom Command 0 4 0x57 0xMM OxNN Emphasis 0x4D Prefix code 0x57 Delete a Block OxMM The Block Set 0x00 to 0x07 OxNN Block Number 0x00 to OxFF Response To None Example 0x4D 0x57 0x00 0x00 Delete the Block Num 0 in Block Set 0 Acknowledge 0 from A129 How many Flash ROM are available in the Block Set 0x58 Direction PC A129 Content Ask How many Flash ROM are available in the Block Set Command 0 4 0x58 0x4D Prefix code 0x58 Ask how many Flash ROM available Ox MM The Block Set From 0x00 to 0x07 Note A129 will response number of pages that available in memory one page equal to 254 bytes which could use to save 127 points of data 0x53 0x59 0x07 0x01 0x00 Report How many Flash ROM are Available in Block Set 7 0x0100 256 pages 256 x 254 bytes 65024 bytes 32512 points free Emphasis 0x53 Prefix code 0x59 Report how many Flash ROM are available Ox MM The pees Ps Set to be Report OXAABB pages are available in Flash ROM 1 page 254 bytes Example 0x5
21. raw 0x00 Display Off erase Example 0 4 0x50 0x10 0x20 0x01 will draw a point at vector 16 32 pons Acknowledge from A129 Line 0x51 Content Draw a Line from Xj Y1 to Y2 Emphasis 0x4D Prefix code 0x51 Draw a Line Command 0xXX X Coordinate 0x00 to 0 7 OxYY Y Coordinate 0x00 to 0x3F Coordinate 0x00 to OxY Y Z Y Coordinate 0x00 to 0x3F OXDD Display On Off 0x01 Display On draw 0x00 Display Off erase ICP Electronics Inc Page 10 25 Example 0x4D 0x51 0x00 0x00 0x64 0x64 0x01 Draw a Line from 0 0 to 100 100 0x4D 0x51 0x00 0x00 0x64 0x64 0x00 Erase a Line from 0 0 to 100 100 Acknowledge from A129 Put String 0x52 Direction PC 129 Content Put a string on LCD if at the bottom line then scrolling the text windows up String terminate by 0x00 end of string or 0x0a new line Emphasis 0x4D M 0x52 Put String Command 0xCC 0xCC Display characters OxMM mode of Character 0x00 Normal Display 0x01 Inverse Display 0xDD Control character where 0xDD 0x00 End of String or OXDD 0x0a End of String and add feed line and carriage return Example Ox4D 0x52 0x00 0x48 0x65 Ox6f 0x0a put a string Hello on LCD Ox4D 0x52 0x01 0x48 0x65 Ox6c Ox6f 0x0a put a string Hello on LCD but inverse Acknowledge from A129 Cursor goto 0x54 Direction C gt AI Content
22. ve Execute C getsts x getsts will be polling the block status of A129 where x is interest block set of e g C getsts 0 which will polling Block Set 0 ICP Electronics Inc Page 24 25 eT include lt dos h gt include lt stdio h gt include lt conio h gt define COMI 0x3f8 define COM2 0x28 define IOBASE 1 void InitUART void outport IOBASE 3 0x80 Line Control Register outport IOBASE 0 0x60 Divisor Latch Low outport IOBASE 1 0x00 Divisor Latch High outport IOBASE 3 0x03 void SendByte char ch while inport IOBASE 5 amp 0x20 outport IOBASE ch unsigned char GetByte void while inport IOBASE 5 amp 0x01 return inport IOBASE unsigned char Rs232Avail void return inport IOBASE 5 amp 0x01 void main int argc char argv unsigned int i j unsigned int blocks ICP Electronics Inc oo M A M1 InitUART while Rs232Avail GetByte Clear the Rs232 Recv Buffer SendByte 0x4D the prefix code SendByte 0x68 the Get Block Status command SendByte atoi argv 1 polling Block Set GetByte skip prefix code 0x53 GetByte skip Report block status command 0x69 blocks GetByte i GetByte i i 256 GetByte printf There are 4d blocks in block set 9044 it is n i blocks 0 lt 1 printf 964d GetByte

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書 - Clarion  蟻取扱上注意  VOTRE MOULIN A CAFE N° 4 et 4D  AutoDome® and EnviroDome    JVC KD-G431 User's Manual  Service Manual  LifeSize PassportTM User Guide    

Copyright © All rights reserved.
Failed to retrieve file