background image

e z L C D -­‐ 4 0 5

   |   

13   

   

   

Rev.   

©  2016    Earth  Computers  Tech.  Inc.

   

   

6.

  

You   will   need   to   generate   a   new   config   file   as   shown   

here

   and   save   it   onto   your   

microSD   card   

7.

  

Once   that   is   done,   put   the   microSD   card   back   into   your   ezLCD-­‐405   

8.

  

Make   sure   the   serial   port   is   open   as   shown   

here

   

9.

  

Go   to   “Position   Commands”   on   the   top   left   and   type   in   the   “X”   and   “Y”   
coordinates   you   want   the   image   to   start   displaying   at   

10.

  

Then   click   “Set   XY”      

   

11.

  

Now   go   the   “Image   Commands”   towards   the   center   of   the   window   and   type   in   
the   name   of   the   file   (   starting   with   “   /Images/   “)   

12.

  

Then   click   “   SD   Put   Icon   “   to   the   left   of   it   

   

Содержание ezLCD-405

Страница 1: ......

Страница 2: ...1 4 Firmware 29 1 4 1 Firmware Upgrade 29 1 4 2 Firmware Customization 29 1 5 Touch Screen 31 1 5 1 Introduction 31 1 5 2 Calibration Error Bookmark not defined 1 5 3 Data Protocols 33 1 6 SD Card Ope...

Страница 3: ...9 1 7 21 PLOT 80 1 7 22 PLOT_XHY 81 1 7 23 PRINT_CHAR 82 1 7 24 PRINT_CHAR_BG 83 1 7 25 PRINT_STRING 84 1 7 26 PRINT_STRING_BG 85 1 7 27 PUT_BITMAPH 87 1 7 28 PUT_SF_ICON 89 1 7 29 RESTORE_POSITION 90...

Страница 4: ...7 48 SD_PUT_ICON 129 1 7 49 SD_RAW_READ 130 1 7 50 SD_RAW_WRITE 132 1 7 51 SD_SCREEN_CAPTURE 134 1 7 52 SD_SIZE 136 1 7 53 SD_SPACE_INFO 138 1 7 54 SELECT_FONT 140 1 7 55 SET_BG_COLORH 141 1 7 56 SET_...

Страница 5: ...Change the line TestMode True to TestMode False 2 Save the file put it back in the ezLCD 405 and then reset it by pressing the reset button STEP 1 INSTALL DRIVER a Download all ezLCD 405 files from ht...

Страница 6: ...evice These updates help fix bugs and problems that may occur with the device a Install Unzip the Test Platform and run it b Before Updating set the ezLCD 405 to DFU Mode firmware upgrade mode by firs...

Страница 7: ...the latest firmware ex ezLCD405 Firmware x xx dfu which you have already downloaded from the website e Now click Update and it will say done parsing DfuSe file when finished f Now you are done with up...

Страница 8: ...s a Get Connected 1 Under the Serial Port select the COM__ port the ezLCD 405 is connected at You can check this by looking at Device Manager Ports 2 Then click Open Make sure you have Open the device...

Страница 9: ...ere you can specify the colors you want to use 1 Click Color Selector and choose a color 2 When you choose a color specify the intensity of the color on the right side by dragging the cursor the inten...

Страница 10: ...ed to the screen you must upload it to the microSD card 1 If you are not using a font already on the computer download and install one 2 Open the Font Editor and Select the font you want to use 3 Clic...

Страница 11: ...zf as well as one for reference 7 In the Test Platform go to the Fonts tab and Add the font the font ID will be displayed on the left side 8 Now you will need to generate the Config txt following thes...

Страница 12: ...tring you want to print and then click Print String d Images 1 Convert a 320x240 pixel image to a 24 bit bitmap with extension bmp 2 Connect your microSD card and load the image into the Images folder...

Страница 13: ...D card back into your ezLCD 405 8 Make sure the serial port is open as shown here 9 Go to Position Commands on the top left and type in the X and Y coordinates you want the image to start displaying a...

Страница 14: ...y default it is set to Serial which is used when the device is connected via USB 2 Backlight you can control the brightness of the screen or you can just turn off the light which makes the screen blac...

Страница 15: ...and images You can do this by either using the Test Platform program or creating a text file and then saving it on the microSD card 1 Using the Test Platform Program Make sure to have the microSD card...

Страница 16: ...e z L C D 4 0 5 16 Rev 2016 Earth Computers Tech Inc Eject the microSD card and put it back into the ezLCD 405 Then RESET the device 2 Creating a text file txt...

Страница 17: ...ers Tech Inc g FOR UNEXPECTED PROBLEMS BUGS ERRORS 1 Not Recognizing the Device If your computer is not recognizing the device and showing error in the Device Manager manually Update the driver Right...

Страница 18: ...in the directory names of the file path to dfu file Make sure the ezLCD 405 is in bootloader mode before open uploading a dfu file 3 ezLCD 405 If images are not displaying properly make sure the image...

Страница 19: ...by the logic and the display itself Touch screen Interface drivers and other circuitry The ezLCD 405 communicates with the outside world through several interfaces RS232 TTL USB SPI The ezLCD 405 is...

Страница 20: ...ontroller with the corresponding set of signals and instructions The commands are processed on a First In First Out principle Example The following commands will draw a green circle with a radius of 6...

Страница 21: ...0 TBD A Vcc 5V Hi Level Logical Input Voltage VIH 2 2 3 3 3 6 V Some pins are 5V tolerant Please refer to Pin Configuration Lo Level Logical Input Voltage VIL 0 3 0 1 V Operating Temperature Topa 0 60...

Страница 22: ...e z L C D 4 0 5 22 Rev 2016 Earth Computers Tech Inc Figure 2 ezLCD 405 Schematic...

Страница 23: ...e z L C D 4 0 5 23 Rev 2016 Earth Computers Tech Inc 1 3 2 Pin Configuration Figure 3 ezLCD 405 Connectors...

Страница 24: ...ignal The same function as SW1 ON switch 3 6 to 7V turns ON the ezLCD 405 power 0 to 1V turns OFF the ezLCD 405 power Rin 10 kOhm PROG CN1 input Firmware download signal The same function as SW2 PROG...

Страница 25: ...ent USB Cable so it will supply both power and USB signals to the ezLCD 405 Connect 5V from the USB cable to the following ezLCD pins 5V ext VBUS Connect GND from the USB cable to the following ezLCD...

Страница 26: ...ters Tech Inc 1 3 4 RS232 TTL Default Communication Parameters Baud rate 115200 bps No of Data Bits 8 No of Stop Bits 1 Parity Off Handshake None Pin Name Connector Type Description RS2323 TTL TX CN1...

Страница 27: ...CD 405 sends EZLCD_READY byte EA hex 234dec The EZLCD_READY byte is sent one time only upon the power up when the ezLCD 405 RS232 TTL interface is ready to receive the commands The Default Transmitter...

Страница 28: ...SPI interface have to be initiated by the Master it is the user responsibility to query the ezLCD for any new data like for example touch screen coordinates Each time the byte is send through the SPI...

Страница 29: ...ange in the future The latest pre release version of the ezLCDconfig utility is available for download at http www ezlcd com As it is shown on the picture above the ezLCDconfig allows the user to 1 Re...

Страница 30: ...mand Execution in Progress When it is selected for the particular pin that pin outputs Hi 2 3 to 3 3V when the command is executed and Lo 0 to 1V between commands The pin switches to Hi on the first b...

Страница 31: ...ate on the powered plane For example in case of the X coordinate measurement the X plane is powered as shown on the drawing below The Y plane is used to sense where the pen is located on the powered p...

Страница 32: ...e z L C D 4 0 5 32 Rev 2016 Earth Computers Tech Inc...

Страница 33: ...imes per second 3 CalibratedXY ezLCD sends TOUCH_X and TOUCH_Y packets X and Y coordinates when the screen is pressed ezLCD sends PEN_UP packets when the touch screen is not pressed Multi byte packed...

Страница 34: ...the buttons using BUTTON_DEF command Send BUTTON_DEF command for each of the buttons that you want to use The BUTTON_DEF command specifies Button Number ID Initial state of the button Bitmaps for eac...

Страница 35: ...e cuButton protocol instead The button cannot be pressed just by sliding the finger onto the button touch zone The ezLCD sends the Button Down Event only if the button is directly pressed When the but...

Страница 36: ...ezLCD 405 Sends Nothing because no button has been pressed 7 Touch Screen Not pressed ezLCD 405 Sends 44hex only 1 time in the moment when the button 4 become pressed 8 Touch Screen Not pressed ezLCD...

Страница 37: ...uttons using BUTTON_DEF command Send BUTTON_DEF command for each of the buttons that you want to use The BUTTON_DEF command specifies Button Number ID Initial state of the button Bitmaps for each of t...

Страница 38: ...the button state only once per event please use the ezButton protocol instead The button cannot be pressed just by sliding the finger onto the button touch zone The ezLCD sends the Button Down state o...

Страница 39: ...ch zone ezLCD 405 Sends FFhex continuously 5 to 20 times per second 6 Touch Screen Finger is removed from the touch screen ezLCD 405 Sends FFhex continuously 5 to 20 times per second 7 Touch Screen Pr...

Страница 40: ...OL 64 to the ezLCD Sending of the touch screen coordinates by the ezLCD The touch screen coordinates are sent by the ezLCD only when the CalibratedXY protocol is selected For ezLCD 405 Xmax 319 Ymax 2...

Страница 41: ...It is sent only if the touch screen pressed Length 3 bytes including the Packet ID Code 81hex 129dec TOUCH_Y Packet Description The TOUCH_Y packet represents the touch screen X coordinate It is sent...

Страница 42: ...e z L C D 4 0 5 42 Rev 2016 Earth Computers Tech Inc Example The drawing below shows an example of the data sent by the ezLCD when the CalibratedXY protocol is selected...

Страница 43: ...nores the position of the SD CardWrite Protect Switch The SD Card Size can be read by using the SD_SIZE command The ezLCD firmware supports 2 types of SD Card operations 1 File Operations The SD card...

Страница 44: ...upported file systems FAT12 FAT16 FAT16 Full Name File Allocation Table 12 bit version 16 bit version 32 bit version Introduced 1977 July 1988 August 1996 Max file size 32 MB 2 GB 4 GB Max number of f...

Страница 45: ...ened SD Flash file SD_FILE_DELETE Deletes the SD file SD_FOLDER_CREATE Creates a new folder directory on the SD SD_FOLDER_DELETE Deletes an empty folder directory on the SD SD_SPACE_INFO Gets the info...

Страница 46: ...e sensitive The drive and root directory do not have to be indicated for example A Cat Jumped Over CAT juMped OvEr and cat jumped over specify the same Long directory names are supported however the D...

Страница 47: ...dressed memory locations Obviously the SD Card does not have to be formatted Summary of the SD Raw Operations commands SD_SIZE Gets the physical size in bytes of the SD Card SD_RAW_READ Reads the data...

Страница 48: ...rer com cpp Directories Exe build executables Sources C sources VisualC MS Visual C 6 0 projects Borland Borland C Builder 6 0 projects Common Files ezLCDdll c This file is used to dynamically load th...

Страница 49: ...om formatted SD card fsize c ezLCDio c ezLCDdll c mytypes h ezLCDio h ezLCDdll h CmdCodes h SDfget Copies the file from SD Card to the PC fget c ezLCDio c ezLCDdll c mytypes h ezLCDio h ezLCDdll h Cmd...

Страница 50: ...XHY SET_Y iii Backlight LIGHT_BRIGHT LIGHT_ON LIGHT_OFF iv Points PLOT PLOT_XHY v Lines H_LINH V_LINE LINE_TO_XHY vi Figures ARCH PIEH CIRCLE_RH CIRCLE_FH_FILL BOXH BOXH_FILL vii Bitmaps PUT_BITMAP PU...

Страница 51: ...ZE SD_FILE_LIST SD_FILE_OPEN SD_FILE_READ SD_FILE_REWIND SD_FILE_SEEK SD_FILE_TELL SD_FILE_WRITE SD_FIND_FIRST and SD_FIND_NEXT SD_FOLDER_CREATE SD_FOLDER_DELETE SD_FORMAT SD_INSERTED SD_PUT_ICON SD_S...

Страница 52: ...e z L C D 4 0 5 52 Rev 2016 Earth Computers Tech Inc SET_COLOR SET_XY...

Страница 53: ...Byte 3 Arc Begin Angle MSB Byte 4 Arc Begin Angle LSB Byte 5 Arc End Angle MSB Byte 6 Arc End Angle LSB See Also PIEH SET_XHY SET_COLORH CIRCLE_RH Angle Coding The full angle 360 is equal to 4000hex...

Страница 54: ...green arc from 45 to 225 degrees with the center positioned at 160 117 and a radius of 80 225 x 2048 45 10240 2800hex SET_COLORH 84 hex GREEN_LSB 11100000 bin GREEN_MSB 00000111 bin SET_XHY 85 hex 0...

Страница 55: ...x10 x9 x8 Byte 1 x2 MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x2 LSB y15 y14 y13 y12 y11 y10 y9 y8 Byte 3 y2 MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y2 LSB See Also SET_XHY BOXH_FILL Example Example The following...

Страница 56: ...D 4 0 5 56 Rev 2016 Earth Computers Tech Inc RED_MSB 11111000 bin SET_XHY 85 hex 0 0 dec x MSB 95 95 dec x LSB 0 0 dec y MSB 10 10 dec y LSB BOXH A2 hex 180 0 dec X_2 MSB 180 180 dec X_2 LSB 120 120...

Страница 57: ...e 1 x2 MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x2 LSB y15 y14 y13 y12 y11 y10 y9 y8 Byte 3 y2 MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y2 LSB See Also SET_XHY BOXH Exam Example The following sequence will draw a...

Страница 58: ...e z L C D 4 0 5 58 Rev 2016 Earth Computers Tech Inc 95 95 dec x LSB 0 0 dec y MSB 10 10 dec y LSB BOXH_FILL A3 hex 180 0 dec X_2 MSB 180 180 dec X_2 LSB 120 0 dec Y_2 MSB 120 120 dec Y_2...

Страница 59: ...e 7 Button upper left corner x coordinate LSB y15 y14 y13 y12 y11 y10 y9 y8 Byte 8 Button upper left corner y coordinate MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 9 Button upper left corner x coordinate LSB By...

Страница 60: ...The following sequence will define the Button No 4 with the following bitmaps Button Up Icon in serial flash 8 Button Down Icon in serial flash 9 No Icon for Button Disabled state The button will be...

Страница 61: ...9 9 dec Button Down Icon No in the serial flash 255 255 dec No Icon for Button Disabled 1 1 dec Upper left corner X MSB 4 4 dec Upper left corner X LSB 170 170 dec Upper left corner Y 40 40 dec Width...

Страница 62: ...ed button events Changing the button state to Non Visible Byte 2 4 will also not erase the button image from the screen The Non Visible Byte 2 4 state should mainly be used with the BUTTON_DEF command...

Страница 63: ...utton will be automatically redrawn if the icon for the Button Up has been defined by the BUTTON_DEF command See Also BUTTON_DEF BUTTON_STATE BUTTONS_DELETE_ALL TOUCH_PROTOCOL Important Before using t...

Страница 64: ...ttons will not erase their image from the screen The ezLCD will just stop reacting to the button events See Also BUTTON_DEF BUTTON_STATE BUTTONS_ALL_UP TOUCH_PROTOCOL Important Before using this comma...

Страница 65: ...r11 r10 r9 r8 Byte 1 radius MSB r7 r6 r5 r4 r3 r2 r1 r0 Byte 2 radius LSB See Also SET_XHY SET_COLORH Example The following sequence will draw a green circle with the center positioned at 160 117 SET...

Страница 66: ...13 r12 r11 r10 r9 r8 Byte 1 radius MSB r7 r6 r5 r4 r3 r2 r1 r0 Byte 2 radius LSB See Also SET_XHY SET_COLORH Example Example The following sequence will draw a red filled circle with the center positi...

Страница 67: ...s the screen by filling it with the Current Color Code 21hex 33dec 7 6 5 4 3 2 1 0 Byte 0 Command See Also SET_COLORH Example Example The following sequence will clear the screen and fill it with whit...

Страница 68: ...is command is ineffective when the buzzer has already been turned on by the EZNOW_BUZZER_ON command About the ezNow Board The ezNow is a bare printed circuit board which expands the capabilities of th...

Страница 69: ...ilities of the ezLCD 405 It is user configurable When assembled it can be attached to the back of the ezLCD 405 and used for the development purposes or as a finished product The ezNow board is availa...

Страница 70: ...ware Customization About the ezNow Board The ezNow is a bare printed circuit board which expands the capabilities of the ezLCD 405 It is user configurable When assembled it can be attached to the back...

Страница 71: ...160dec 7 6 5 4 3 2 1 0 Byte 0 Command x15 x14 x13 x12 x11 x10 x9 x8 Byte 1 x MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x LSB See Also V_LINE SET_XHY Example The following sequence will draw a green horizonta...

Страница 72: ...the brightness of the screen backlight Code 80hex 128dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 brightness 0 to 255 Note The default brightness is 255 See Also LIGHT_ON LIGHT_OFF E Example ample The fo...

Страница 73: ...ch Inc 1 7 16 LIGHT_OFF Description Turns off the screen backlight Code 23hex 35dec 7 6 5 4 3 2 1 0 Byte 0 Command See Also LIGHT_ON LIGHT_BRIGHT Example Example The following sequence will turn off t...

Страница 74: ...Tech Inc 1 7 17 LIGHT_ON Description Turns on the screen backlight Code 22hex 34dec 7 6 5 4 3 2 1 0 Byte 0 Command See Also LIGHT_OFF LIGHT_BRIGHT Example Example The following sequence will turn on t...

Страница 75: ...e 0 Command x15 x14 x13 x12 x11 x10 x9 x8 Byte 1 x MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x LSB y15 y14 y13 y12 y11 y10 y9 y8 Byte 3 y MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y LSB See Also SET_XHY SET_COLORH...

Страница 76: ...e z L C D 4 0 5 76 Rev 2016 Earth Computers Tech Inc 0 0 dec x0 MSB 0 0 dec y0 LSB LINE_TO_XHY 88 hex 1 1 dec x1 MSB 63 63 dec x1 LSB 1 1 dec y1 MSB 233 233 dec y1 LSB...

Страница 77: ...Pie End Angle MSB Byte 6 Pie End Angle LSB See Also ARCH SET_XHY SET_COLORH CIRCLE_RH Angle Coding The full angle 360 is equal to 4000hex 16384dec To transform degrees to ARC angle units Angle_lcd An...

Страница 78: ...d at 160 117 and a radius of 80 225 x 2048 45 10240 2800hex SET_COLORH 84 hex GREEN_LSB 11100000 bin GREEN_MSB 00000111 bin SET_XHY 85 hex 0 0 dec x MSB 160 160 dec x LSB 0 0 dec y MSB 117 117 dec y L...

Страница 79: ...sponse After receiving the PING command the ezLCD responds with the PONG 38hex 56dec byte 7 6 5 4 3 2 1 0 0 0 1 1 1 0 0 0 Byte 0 38hex 56dec PONG The ezLCD response is sent through the same interface...

Страница 80: ...Current Color Code 26hex 38dec 7 6 5 4 3 2 1 0 Byte 0 Command See Also SET_XHY SET_COLORH Example The following sequence will put a blue point at 160 117 SET_COLORH 84 hex BLUE_LSB 00011111 bin BLUE_...

Страница 81: ...x10 x9 x8 Byte 1 x MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x LSB y15 y14 y13 y12 y11 y10 y9 y8 Byte 3 y MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y LSB See Also SET_XHY SET_COLORH PLOT Example Example The follow...

Страница 82: ...Code 2Chex 44dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 ASCII Character See Also SELECT_FONT PRINT_STRING Example Example The following sequence will print a black character M using Font 2 SELECT_FONT...

Страница 83: ...1 0 Byte 0 Command Byte 1 ASCII Character See Also SELECT_FONT SET_BG_COLORH PRINT_STRING_BG Example Example The following sequence will print the character M in white on a black background using Font...

Страница 84: ...st Character See Also SELECT_FONT PRINT_CHAR Example le The following sequence will print LCD in purple using Font 1 at 160 117 SELECT_FONT 2B hex 1 1 dec SET_COLORH 84 hex PURPLE_LSB 00010000 bin PUR...

Страница 85: ...First Character Byte n Last Character Byte n 1 NULL See Also SELECT_FONT SET_BG_COLORH PRINT_CHAR_BG Example Example The following sequence print LCD in yellow on a navy background in the middle of t...

Страница 86: ...e z L C D 4 0 5 86 Rev 2016 Earth Computers Tech Inc PRINT_STRING_BG 3D hex L 4C hex C 43 hex D 44 hex NULL 0 hex...

Страница 87: ...red when Byte 4 is not 0 R4 R3 R2 R1 R0 G5 G4 G3 Byte 7 Transparent Color MSB ignored when Byte 4 is not 0 G2 G1 G0 B4 B3 B2 B1 B0 Byte 8 Pixel1 at X Y R4 R3 R2 R1 R0 G5 G4 G3 Byte 9 Pixel1 at X Y G2...

Страница 88: ...es 1 The total number of bytes is 2 x width x height 7 2 When Byte 4 0 Bytes 5 and 6 specify the Transparent Color Pixels equal to the Transparent Color are ignored during bitmap drawing All pixels ar...

Страница 89: ...Serial Flash Use the ezLCD flash utility to store icons in the ezLCD Serial Flash Code 58hex 88dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 ICON ID 0 to 254 Note Maximum number of icons is 255 IDs 0 to...

Страница 90: ...e Also SAVE_POSITION SET_XHY Example Example The following sequence will draw 3 lines with the common starting point 160 117 SET_XHY 85 hex 0 0 dec x MSB 160 160 dec x LSB 0 0 dec y MSB 117 117 dec y...

Страница 91: ...e z L C D 4 0 5 91 Rev 2016 Earth Computers Tech Inc RESTORE_POSITION 36 hex 12 12 dec Position ID V_LINE 41 hex 217 217 dec...

Страница 92: ...Example The following sequence will draw 3 lines with the common starting point 160 117 SET_XHY 85 hex 0 0 dec x MSB 160 160 dec x LSB 0 0 dec y MSB 117 117 dec y LSB SAVE_POSITION 35 hex 12 12 dec P...

Страница 93: ...be formatted in the supported file system See Also SD_FILE_OPEN SD_FILE_CREATE SD_FILE_CLOSE_ALL About the File ID File ID is returned in the response to the SD_FILE_OPEN command It identifies the fi...

Страница 94: ...een Supported file systems FAT12 FAT16 FAT32 Code 73hex 115dec 7 6 5 4 3 2 1 0 Byte 0 Command Notes SD card has to be formatted in the supported file system See Also SD_FILE_OPEN SD_FILE_CREATE SD_FIL...

Страница 95: ...d Since maximum 2 files may be concurrently opened the File ID should be 1 or 2 Values higher than 2 are interpreted as 2 and 0 is interpreted as 1 About the File Path File Path specifies the full pat...

Страница 96: ...sables the touch screen The touch screen will be automatically re enabled when all files are closed This can be done by issuing the SD_FILE_CLOSE or SD_FILE_CLOSE_ALL command Note The touch screen is...

Страница 97: ...7 Rev 2016 Earth Computers Tech Inc If the file has successfully been created the ezLCD responds with the following sequence 3F hex 1 dec In case of the failure the following sequence will be sent by...

Страница 98: ...l path to the file on SD including directory filename and extension Directories should be separated by not by like in Windows and DOS File Path is not case sensitive The drive and root directory do no...

Страница 99: ...e interface which received the SD_FILE_DELETE command Example Example The following sequence will delete file MyFile dat SD_FILE_DELETE 7D hex M 4D hex y 79 hex F 46 hex i 69 hex l 6C hex e 65 hex 2E...

Страница 100: ...LE_CLOSE SD_FILE_CLOSE_ALL About the File ID File ID is returned in the response to the SD_FILE_OPEN command It identifies the file after it has been opened Since maximum 2 files may be concurrently o...

Страница 101: ...n error The ezLCD response is sent through the same interface which received the SD_FILE_GET_SIZE command Example The following flow chart on the next page shows an example of getting the size of the...

Страница 102: ...e z L C D 4 0 5 102 Rev 2016 Earth Computers Tech Inc...

Страница 103: ...o the SD directory SD file or group of files and sub directories Wildcards and are supported Directories should be separated by not by like in Windows and DOS Directory Path is not case sensitive The...

Страница 104: ...heir last character For example 3Ahex Start whatever txt file Pictures directory Cat doc file ezLCD bin file SOURCES directory 0 End NULL In case of an error 7 6 5 4 3 2 1 0 0 0 1 1 1 1 1 0 Byte 0 3Eh...

Страница 105: ...About the File ID File ID identifies the file after it has been opened Since maximum 2 files may be concurrently opened the File ID should be 1 or 2 Values higher than 2 are interpreted as 2 and 0 is...

Страница 106: ...porary disables the touch screen The touch screen will be automatically re enabled when all files are closed This can be done by issuing the SD_FILE_CLOSE or SD_FILE_CLOSE_ALL command Note The touch s...

Страница 107: ...d however it will not exceed file_size 1 Supported file systems FAT12 FAT16 FAT32 Code 75hex 117dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 File ID Byte 2 Number of Bytes to Read 0 LSB Byte 3 Number of...

Страница 108: ...ase of the success 7 6 5 4 3 2 1 0 Byte 0 Command Byte 2 First Character of the file path Byte 3 Second Character of the file path Byte n 1 Data Byte n Note If the Number of Bytes to Read is greater t...

Страница 109: ...e z L C D 4 0 5 109 Rev 2016 Earth Computers Tech Inc...

Страница 110: ...e ID File ID is returned in the response to the SD_FILE_OPEN command It identifies the file after it has been opened Since maximum 2 files may be concurrently opened the File ID should be 1 or 2 Value...

Страница 111: ...ple Example The following sequence will set the File Position Index at the beginning of the file SD_FILE_REWIND 7A hex 1 1 dec File ID If the File Position Index has successfully been moved the ezLCD...

Страница 112: ...rted file system This command works only if the file is already opened by the SD_FILE_OPEN command or created and opened by the SD_FILE_CREATE command See Also SD_FILE_OPEN SD_FILE_REWIND SD_FILE_READ...

Страница 113: ...case of the success In case of an error The ezLCD response is sent through the same interface which received the SD_FILE_SEEK command Example The following sequence will advance the File Position Ind...

Страница 114: ...L About the File ID File ID is returned in the response to the SD_FILE_OPEN command It identifies the file after it has been opened Since maximum 2 files may be concurrently opened the File ID should...

Страница 115: ...te 4 File Position Index 3 MSB In case of an error 7 6 5 4 3 2 1 0 0 0 1 1 1 1 1 0 Byte 0 3Ehex 62dec The ezLCD response is sent through the same interface which received the SD_FILE_TELL command Exam...

Страница 116: ...acter of the file path Byte 3 Second Character of the file path Byte n 1 Data Byte n Notes SD card has to be formatted in the supported file system This command works only if the file is already opene...

Страница 117: ...reted as 2 and 0 is interpreted as 1 ezLCD Response After receiving the SD_FILE_WRITE command the ezLCD responds with either of the following sequences In case of the success 7 6 5 4 3 2 1 0 0 0 1 1 1...

Страница 118: ...e z L C D 4 0 5 118 Rev 2016 Earth Computers Tech Inc...

Страница 119: ...Byte 0 Command SD_FIND_FIRST gets only the first found file or directory which matches the search pattern Each time the SD_FIND_NEXT is issued it finds the next file or directory which matches the se...

Страница 120: ...xceed 64 bytes See Also SD_FILE_LIST ezLCD Response After receiving any of the described commands the ezLCD responds with either of the following sequences In case of the success 3Ahex 58dec followed...

Страница 121: ...e z L C D 4 0 5 121 Rev 2016 Earth Computers Tech Inc Example The following flow chart shows an example of reading the file list from the directory My Pictures...

Страница 122: ...otes SD card has to be formatted in the supported file system Parent directory folder has to exist About the Folder Path Folder Path specifies the full path to the directory on the SD Directories fold...

Страница 123: ...h received the SD_FOLDER_CREATE command Example Example The following sequence will create folder MyDir in the root directory SD_FOLDER_CREATE 46 hex M 4D hex y 79 hex D 44 hex i 69 hex r 72 hex NULL...

Страница 124: ...ard has to be formatted in the supported file system Folder directory has to be empty About the Folder Path Folder Path specifies the full path to the directory on the SD Directories folders should be...

Страница 125: ...hich received the SD_FOLDER_DELETE command Example The following sequence will delete folder MyDir from the root directory SD_FOLDER_DELETE 4D hex M 4D hex y 79 hex D 44 hex i 69 hex r 72 hex NULL 0 h...

Страница 126: ...This command will erase all files on the SD About the File System Specification Sets the file system in which the SD will be formatted 5 ASCII characters ASCII characters only For example the code of...

Страница 127: ...The ezLCD response is sent through the same interface which received the SD_FORMAT command Example The following sequence will format the SD in FAT16 SD_FORMAT 4F hex F 46 hex A 41 hex T 54 hex 1 31...

Страница 128: ...d in the SD slot If there is no card inserted in the SD slot 7 6 5 4 3 2 1 0 0 0 1 1 1 1 1 0 Byte 0 3Ehex 62dec SD not inserted error The ezLCD response is sent through the same interface which receiv...

Страница 129: ...ve The drive and root directory do not have to be indicated for example both A Cat Jumped Over txt and cat jumped over TXT specify the same file Long file names are supported however the File Path dir...

Страница 130: ...ddress 1 Byte 4 Address 2 Byte 5 Address 3 MSB Byte 6 Number of Bytes to Read 0 LSB Byte 7 Number of Bytes to Read 1 Byte 8 Number of Bytes to Read 2 Byte 9 Number of Bytes to Read 3 MSB See Also SD_R...

Страница 131: ...command Example The following flow chart shows an example of reading 34 bytes starting from the SD address 000001BEhex 7 6 5 4 3 2 1 0 0 0 1 1 1 1 0 0 Byte 0 Command Byte 1 Data Byte 0 Byte 2 Data By...

Страница 132: ...SB Byte 7 Number of Bytes to Write Byte 8 Number of Bytes to Write Byte 9 Number of Bytes to Write LSB Byte 10 Data Byte 0 Byte 11 Data Byte 1 Byte n 1 Data Byte n n Number of Bytes to Write 1 Warning...

Страница 133: ...equences In case of the success 7 6 5 4 3 2 1 0 0 0 1 1 1 0 1 1 Byte 0 3Bhex 59dec In case of an error 7 6 5 4 3 2 1 0 0 0 1 1 1 1 1 0 Byte 0 3Ehex 62dec The ezLCD response is sent through the same in...

Страница 134: ...ample Scr_0001 bmp Scr_0002 bmp etc The files are created in the Scr_Cap SD folder If the SD does not have the Scr_Cap folder it will be created automatically Notes SD card has to be formatted in the...

Страница 135: ...e following sequence will save the image of the displayed screen to the SD file SD_SCREEN_CAPTURE 44 hex If the screen image has been written to the bmp file the ezLCD responds with 3B hex In case of...

Страница 136: ...th either of the following sequences In case of the success 7 6 5 4 3 2 1 0 0 0 1 1 1 1 0 1 Byte 0 Command Byte 1 SD Card Size 0 LSB Byte 2 SD Card Size 1 Byte 3 SD Card Size 2 Byte 4 SD Card Size 3 I...

Страница 137: ...e z L C D 4 0 5 137 Rev 2016 Earth Computers Tech Inc Example le The following flow chart shows an example of getting the size of the SD Card...

Страница 138: ...Space Any Other No Get Total Formatted Space Notes SD card has to be formatted in the supported file system ezLCD Response After receiving the SD_SPACE_INFO command the ezLCD responds with either of...

Страница 139: ...Computers Tech Inc The ezLCD response is sent through the same interface which received the SD_SPACE_INFO command Example The following flow chart shows an example of getting the number of the availa...

Страница 140: ...and Byte 1 Font Number Note The following fonts are implemented See Also PRINT_STRING PRINT_CHAR Exam Example ple The following sequence will print a black character M in the middle of the screen usin...

Страница 141: ...1 R0 G5 G4 G3 Byte 2 Color MSB See Also PRINT_CHAR_BG PRINT_STRING_BG E Example The following sequence will print LCD in yellow on a navy background using Font 0 SET_BG_COLORH 94 hex NAVY_LSB 00010000...

Страница 142: ...de 84hex 132dec 7 6 5 4 3 2 1 0 Byte 0 Command G2 G1 G0 B4 B3 B2 B1 B0 Byte 1 Color LSB R4 R3 R2 R1 R0 G5 G4 G3 Byte 2 Color MSB See Also CLS PLOT Example Example The following sequence will fill the...

Страница 143: ...SET_Y SET_XHY Example Example The following sequence will put a 2 blue points in the same row SET_COLORH 84 hex BLUE_LSB 00011111 bin BLUE_MSB 00000000 bin SET_XH 6E hex 0 0 dec x MSB 160 160 dec x LS...

Страница 144: ...d x15 x14 x13 x12 x11 x10 x9 x8 Byte 1 x MSB x7 x6 x5 x4 x3 x2 x1 x0 Byte 2 x LSB y15 y14 y13 y12 y11 x10 y9 y8 Byte 3 y MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y LSB See Also PLOT LINE_TO_XHY CIRCLE_RH Ex...

Страница 145: ...e z L C D 4 0 5 145 Rev 2016 Earth Computers Tech Inc 0 0 dec x MSB 160 160 dec x LSB 0 0 dec x MSB 117 117 dec y LSB PLOT 26 hex...

Страница 146: ...hex 95dec 7 6 5 4 3 2 1 0 Byte 0 Command y15 y14 y13 y12 y11 x10 y9 y8 Byte 3 y MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y LSB See Also SET_XH SET_XHY Example Example The following sequence will put a 2 blu...

Страница 147: ...TEXT_NORTH 60hex 96dec TEXT_EAST 61hex 97dec TEXT_SOUTH 62hex 98dec TEXT_WEST 2Fhex 99dec 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0...

Страница 148: ...d above SET_XHY 85 hex 0 0 dec x MSB 60 60 dec x LSB 0 0 dec y MSB 10 10 dec y LSB SELECT_FONT 2B hex 0 0 dec TEXT_NORTH 60 hex PRINT_STRING 2D hex Text North NULL 0 hex TEXT_EAST 61 hex PRINT_STRING...

Страница 149: ...e TEXT_NORTH 60hex 96dec TEXT_EAST 61hex 97dec TEXT_SOUTH 62hex 98dec TEXT_WEST 2Fhex 99dec 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0...

Страница 150: ...ove SET_XHY 85 hex 0 0 dec x MSB 60 60 dec x LSB 0 0 dec y MSB 10 10 dec y LSB SELECT_FONT 2B hex 0 0 dec TEXT_NORTH 60 hex PRINT_STRING 2D hex Text North NULL 0 hex TEXT_EAST 61 hex PRINT_STRING 2D h...

Страница 151: ...e TEXT_NORTH 60hex 96dec TEXT_EAST 61hex 97dec TEXT_SOUTH 62hex 98dec TEXT_WEST 2Fhex 99dec 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0...

Страница 152: ...d above SET_XHY 85 hex 0 0 dec x MSB 60 60 dec x LSB 0 0 dec y MSB 10 10 dec y LSB SELECT_FONT 2B hex 0 0 dec TEXT_NORTH 60 hex PRINT_STRING 2D hex Text North NULL 0 hex TEXT_EAST 61 hex PRINT_STRING...

Страница 153: ...EXT_NORTH 60hex 96dec TEXT_EAST 61hex 97dec TEXT_SOUTH 62hex 98dec TEXT_WEST 2Fhex 99dec 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 Byte 0 Command 7 6 5 4 3 2 1 0 By...

Страница 154: ...ove SET_XHY 85 hex 0 0 dec x MSB 60 60 dec x LSB 0 0 dec y MSB 10 10 dec y LSB SELECT_FONT 2B hex 0 0 dec TEXT_NORTH 60 hex PRINT_STRING 2D hex Text North NULL 0 hex TEXT_EAST 61 hex PRINT_STRING 2D h...

Страница 155: ...s are sent only once per button state change 2 cuButton Similar to the ezButton however the button states are sent continuously 5 to 20 times per second 3 CalibratedXY ezLCD sends TOUCH_X and TOUCH_Y...

Страница 156: ...e z L C D 4 0 5 156 Rev 2016 Earth Computers Tech Inc Example The following sequence will change the Touch Protocol to ezButton TOUCH_PROTOCOL B2 hex Command 1 1 dec ezButton Protocol...

Страница 157: ...ode 41hex 65dec 7 6 5 4 3 2 1 0 Byte 0 Command y15 y14 y13 y12 y11 x10 y9 y8 Byte 3 y MSB y7 y6 y5 y4 y3 y2 y1 y0 Byte 4 y LSB See Also H_LINEH SET_XHY Example Example The following sequence will draw...

Страница 158: ...e z L C D 4 0 5 158 Rev 2016 Earth Computers Tech Inc 10 10 dec y LSB V_LINE 41 hex 110 110 dec...

Страница 159: ...can interpret the commands used by the smaller ezLCD displays Those displays ezLCD 001 and ezLCD 002 have maximum resolution of 240x160 and are capable of displaying maximum 256 colors ARC BOX BOX_FIL...

Страница 160: ...2 1 0 Byte 0 Command Byte 1 Radius Byte 2 Arc Begin Angle Byte 3 Arc End Angle See Also SET_XY SET_COLOR CIRCLE_R Angle Coding The angle range is from 0 to 255 To transform degrees to ARC angle units...

Страница 161: ...wing sequence will draw a green arc from 45 to 225 degrees with the center positioned in the middle of a screen SET_COLOR 24 hex GREEN 00111000 bin SET_XY 25 hex 120 120 dec 80 80 dec ARC 2F hex 60 60...

Страница 162: ...de 42hex 66dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Corner Column Byte 2 Corner Row See Also SET_XY BOX_FILL Example Example The following sequence will draw the red rectangle SET_COLOR 24 hex RED 00...

Страница 163: ...Code 43hex 67dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Corner Column Byte 2 Corner Row See Also SET_XY BOX Example Example The following sequence will draw the rectangle filled with blue color SET_CO...

Страница 164: ...at Current Position Code 29hex 41dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Radius See Also SET_XY SET_COLOR Example Example The following sequence will draw a green circle in the middle of the screen...

Страница 165: ...ion filled with Current Color Code 39hex 57dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Radius See Also SET_XY SET_COLOR Example Example The following sequence will draw a red filled circle in the middle...

Страница 166: ...fied position Code 28hex 40dec 7 6 5 4 3 2 1 0 Byte 0 Command x7 x6 x5 x4 x3 x2 x1 x0 Byte 1 x y7 y6 y5 y4 y3 y2 y1 y0 Byte 2 y See Also SET_XY SET_COLOR PLOT Example Example The following sequence wi...

Страница 167: ...d position Code 27hex 39dec 7 6 5 4 3 2 1 0 Byte 0 Command x7 x6 x5 x4 x3 x2 x1 x0 Byte 1 x y7 y6 y5 y4 y3 y2 y1 y0 Byte 2 y See Also SET_XY SET_COLOR PLOT Example Example The following sequence will...

Страница 168: ...en UP and RIGHT Code 2Ehex 46dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Bitmap Width Byte 2 Bitmap Height Byte 3 Pixel at X Y Byte 4 Pixel at X 1 Y Byte width 2 Pixel at X width 1 Y Byte width 3 Pixelw...

Страница 169: ...following sequence will put 4x3 bitmap at x 60 y 80 pixel total 4x3 3 15 bytes SET_XY 25 hex x 60 dec y 80 dec PUT_BITMAP 2E hex width 4 dec height 3 dec pixel x 60 y 80 pixel x 61 y 80 pixel x 62 y 8...

Страница 170: ...color palette has the following color coding 7 6 5 4 3 2 1 0 b1 b0 g2 g1 g0 r2 r1 r0 See Also PRINT_CHAR_BG PRINT_STRING_BG Example Example The following sequence print Yellow LCD on the Navy backgro...

Страница 171: ...or Code 24hex 36dec 7 6 5 4 3 2 1 0 Byte 0 Command Byte 1 Color Code Note The 256 color palette has the following color coding 7 6 5 4 3 2 1 0 b1 b0 g2 g1 g0 r2 r1 r0 See Also CLS PLOT Example The fol...

Страница 172: ...remains unchanged Code 5Ehex 94dec 7 6 5 4 3 2 1 0 Byte 0 Command x7 x6 x5 x4 x3 x2 x1 x0 Byte 1 x See Also SET_Y SET_XY Example Example The following sequence will put a 2 blue points in the same row...

Страница 173: ...37dec 7 6 5 4 3 2 1 0 Byte 0 Command x7 x6 x5 x4 x3 x2 x1 x0 Byte 1 x y7 y6 y5 y4 y3 y2 y1 y0 Byte 2 y See Also PLOT LINE_TO_XY CIRCLE_R Example Example The following sequence will put the blue point...

Отзывы: