n
P! " # $ % & % & ' ( ) * + % $, $ -. $ -..! " # ) & % $/ $ - 0 1 2 3 4 5 6 7 3 8 7 9 9 : 3 ; 1 7 < 9 : 5 = > : 9? @ A B C D E F G HI J G H K D L M N O P Q R S T U V M Q P W X X Y W X X Z [ Y \ ] M ^ O ^ T S M T _ Q ` a b ` X c d ^ e ^ b ` Y ` a b ` X c f g g f g g h g i f Z [ Y j k P l S S [ T N _ N M ` X b d ^ e ^ d Q e Q ` Y ` X b g g f g g f g g i f Z [ Y h k P ` _ Q ^ M P T M Q Q [ ` X m ` Y ` X m i f Z [ Y n o k P ` V U ^ p S T U V M Q ` q r R [ d ^ e ^ d s e s d P e P Y ` q r f i g i g g g f g g f g g Z [ Y n g k P ] M ^ O ^ t N U ] u r d ^ e ^ ` Y ] u r f g g f g g i f Z [ Y g v f n k P ] M ^ O ^ w M ^ k Q O S U x _ S [ Q U y p Q ^ [ t T x ^ k w Q M l b W z c d ^ e ^ d Q e Q ] P ] N ` Y l b W z c f g f g n g g j g n i i f Z [ Y ] M ^ O ^ _ S [ Q X a { c d ^ e ^ d Q e Q ` Y X a { c f g f g h g h g i f Z [ Y g v k P L ^ T } _ S ~ x U N [ X c ] u { Y X c ] u { Z [ Y j V P L ^ T } _ S ~ x U N w w X c ] u l l Y X c ] u l l Z [ Y j V P W [ S k ^ U S N [ z u r d ^ e ^ R P R Q R U Y z u r g g f g f j f g g Z [ Y g v f h k P W [ S k ^ U S N [ N w w z u l l Y z u l l Z [ Y j V P ` ^ N [ R a ` R a ` R [ d ^ e ^ Y R a ` f i g i g Z [ Y f n h k P ] M ^ O ^ M Q T U ^ [ ~ _ Q b c ` r d ^ e ^ d Q e Q ` Y b c ` r f g f g f g g f g g i f Z [ Y h k P Q U P T M Q Q [ P S Q m a c Y m a c Z [ Y f i k P ] S P p _ ^ y ^ _ p x ^ s Q U S T m r b d ^ e ^ ` m U M Y m r b g g i f W L ` ] c l Z [ Y g v o k P ƒ ` x ^ M P U M S [ ~ ] S P p _ ^ y ^ _ p x ^ s Q U S T P U M S [ ~ O S U x m r L d ^ e ^ ` ` s m U M Y m r L g n g h h i h i f W L ` Z [ Y i g V P ƒ ` x ^ M s ^ T } ~ M N V [ t T N _ N M 7 5 A d ^ e ^ P U ^ M U ˆ y T N N M t S [ ^ U Q P d Q e Q c [ t ˆ y T N N M t S [ ^ U Q P ` T N _ N M f s S U P Š b L h h ` s L ^ T } ~ M N V [ t T N _ N M d s e s P U ^ M U Q [ t d e T N N M t S [ ^ U Q P S [ _ S Œ Q _ N [ ~ R a ` d P e P { Q Q t U N S [ U Q M T Q p U U x Q P S Q w M N k _ S Œ Q _ N [ ~ p S T U V M Q Ž š š œ š m U M ^ _ p x ^ s Q U S T P U M S [ ~ o ˆ f š ž Ÿ Ž Ž š Ÿ b š Ÿ Ž R P m U ^ M U ^ [ S k ^ U S N [ p S T U V M Q [ V k s Q M R Q c [ t ^ [ S k ^ U S N [ p S T U V M Q [ V k s Q M R U m p ^ T S [ ~ U S k Q P U Q p f g g k P q P S [ ~ U x Q T N k k ^ [ t Š U x Q M Q O S s Q ^ M Q U V M [ Œ ^ _ V Q w N M k ^ U S P ^ Y m d e d P S Q e P S Q Z [ Y j k 8 7 3 ª 6 «2 < A 8 7 9 9 : 3 ; 1 2 3 4 5 6 7 3 8 7 9 9 : 3 ; 1 7 < 9 : 5 = > : 9? @ A 6 9 A m Q U s ^ V t M ^ U Q L W q ] s f s n Y L W q ] g g g g Z [ Y n g k P
Configure Commands Function Command Format Set baud rate BAUD b1 b2 "BAUD 9600 9600\n" 20ms Demonstrate PIC DEMO Dt Xa Ya "DEMO 1000 0 0\n" 20ms Off demonstrate DMOFF Example "DMOFF\n" 20ms Change direction Display of panel TURN Tn "TURN 90\n" 140ms Note: b1 b2 denote baud tate (range:2400,4800,9600,19200,38400,56000,57600,115200) Dt denote DEMO interval(step 100ms) Tn Rotation angle (0 90 ) Time - 6 -
w!! " # $ % & ' ( ) ) * +, -. + / 0 / 1 ( 2 3 4 5 5 1 / 6, * - 7 7 + 1 8 + 0 9 ) +,. : 6 ; 7 U V W X Y Y Z [ \ ] ^ \ Z _ ` ^ Y a b X _ c a Z ` d \ X \ e Z b X Y f Z _ X b g h i j k l m n o ^ \ \ e Z p Z q ` d d ` d q r \ e Z s ` [ \ c _ Z a ] ^ t p Z f ` a X _ f Z _ Z f ^ d f \ e Z s _ X [ Z a a ` d q X b b X Y Y X u ` d q a \ Z s a ` a d Z Z f Z f \ X ] ^ v Z \ e Z ] ` d s _ X s Z _ X _ f Z _ b X _ X s Z _ ^ \ ` X d x w W X d y Z _ \ ^ Y Y b ` Y Z a ` d \ X g h i b X _ ] ^ \ w z w { X _ \ \ e Z s ` [ \ c _ Z a a c [ [ Z a a ` y Z Y t p Z q ` d d ` d q u ` \ e w } w ~ Z X _ f Z _ \ e Z a s Z [ ` ^ Y s ` [ \ c _ Z a Z c Z d [ Z r b X _ ` d a \ ^ d [ Z r \ e Z ^ d ` ] ^ \ ` X d s ^ _ \ ^ d f a s Z [ ` ^ Y b X d \ s ^ _ \ ] c a \ p Z [ X d \ ` d c X c a w < = 5 > ;, :. ;.? ; @ -.,? 1 + * ; / 1 A - B ; 3 ( C = @ -. D E ( 1. ; 6 ; > ;, :. + / 0 F.? ; 6 ; - 6 ;.? 6 ; ; 1 + * ; 7 9 ; 0 ; 6 -. ; G + 0 H A I J 3 ( C ( F K? ; 6 ; + 0 H A I 3 ( C ( = H L M + 7 G -. - 1 + * ; + 0 K? +,? - * * ) +,. : 6 ; G -. - - 6 ; ) :. + 0 7 + G ; + 0 / 6 G ; 6 N C ( H O 5 = H L M + 7. - @ * ; 1 + * ; ; P : + Q - * ; 0.. / + 0 G ; > 1 + * ; = 2 / ) 8.? ; 7 ;. K / 1 + * ; 7 + 0. /.? ; 1 / * G ; 6 Q + 6. : - * + R ; G.? ; S / G : * ; - 0 G.? ; 0.? ; 8-6 ; - Q - + * - @ * ; 1 / 6 : 7 ; = C? ; 6 ; - 6 ; ) +,. : 6 ; 7 ; 6 + - * 0 : S @ ; 6 7 + 0.? ; 1 + * ; / 1 H S ) 3 -. - H + 0 =?, / 6 6 ; 7 ) / 0 G + 0 9. / ) +,. : 6 ; 7 + R ; + 0 1 / 6 S -. + / 0-7 - 6 ; 1 ; 6 ; 0, ; ) 6 / Q + G ; G. / : 7 ; 6 K? +,? + 7 : 0 0 ;, ; 7 7-6 8. / @ ;, / ) + ; G + 0. / T 4 H 1 * - 7? G + 7 B =
± ² ³ µ ² ¹ º» ² ² ¼ œ ½ ¾ À š Á š ¾ Â Ã Ä Å Æ ½ Â Ç È ª À š Á š ¾ Ã Ä Å Æ ½ Â É ½ ¾ ½ ž š Ê Æ Ã Ä Å Ã Ë Ì ½ Ä Å Æ ½ Â Í ½ ¾ À š Î š ¾ Ï Ã Ä Å Æ ½ Â Â È ª À š Î š ¾ Ð Í Ã Ä Å Æ ½ Â Æ À Ñ Ð Ç Ã Ä É Ã Ò Ó Ã Ä É Ã Ä Ç Ã Ê Â š œ ž Ÿ š š ž š Ÿ š ª «
Specification Issue 1 28/8/2012 SERIAL TFT MODULE APPLICATION NOTE 1 Compiling and transferring image files via the USB interface. Date Description of change 26/6/12 Initial creation 28/8/12 Updated Procedure section 7 11
Overview The Midas range of serial TFT modules offer the ability to store images which are then selected for display using serial commands. This overcomes the need to transfer large amounts of data over the serial interface. The following application note describes how to prepare image files and transfer them to the display module flash memory drive via the USB interface. Hardware/Software Required Midas Serial TFT display module. USB cable type A to mini B. BmpToBin application software (see link below) http://bit.ly/11k8dal Important Note: Please be aware that when using this link a warning page will appear, please ignore this and continue by clicking on the link below the 'continue at your own risk' notification. Procedure 1) Create two directories one called BMP_DATA and the other BMP_FILE. 2) Place all the bitmap files you require for your project in the BMP_FILE directory. Note that the files must be 24-bit bitmap type. Note that the size of the combined images must not be greater than 2M bytes. This is the sum of x*y*2 for each image. Ie. For the above (240*320*2)+ (240*320*2)+ (240*320*2)+ (240*320*2)+ (240*320*2)+ (240*320*2)+ (240*320*2)+ (1315*32*2)=1159360 12
3) Re-name each image numerically in the sequence required bearing in mind that any short animation sequences need to be in sequential order. i.e: 4) Exit this directory and place the BmpToBin application file in the parent directory i.e 5) Run the BmpToBinForM.exe application by double clicking the icon. This will then create two files within the BMP_DATA directory. 6) Plug the TFT module into your PC using a USB A to mini B cable. The module should then appear on your PC as a flash memory device. 13
7) Simply Copy the two files BMPDATA.BIN and TABLE.BIN created earlier to the module flash drive. These images are then available to be displayed via serial command. If there are already files on the module flash drive you may want to back them up to your PC. You can now via the serial interface view the images on the display module using commands such as: Browse Pictures, Cut a Picture, Animation, Call on PIC and Run Demo. Notes: a) If a demo is already running, delete the files and power off and on before loading new files. b) After loading new files wait approximately 1 minute for the unit to program the flash memory before disconnecting power. Command Summary Commands are sent to the board via the Serial UART (TTL levels) on J1. The default serial format is 9600,N,8,1. All commands are ASCII characters followed by CR LF (0D0A hex). Function Command Format Example Busy Low time Browse Pictures ALL ALL\n - Draw a circle CIRCLE Xa Ya R C CIRCLE 100 100 50 31\n 4ms Fill in colour CLR Xa Ya Xe Ye C CLR 0 0 100 100 31\n 5ms Clear Screen CLS C CLS 31\n 28ms Cut a picture CUT Pn Xa Ya Xb Yb Xs Ys CUT 1 30 30 0 0 100 100 \n 20ms Draw a dot DOT Xa Ya C DOT 100 100 31\n 0.12ms Draw a frame FRAME Xa Ya Xe Ye Ds Do C FRAME 10 10 200 40 2 3 31\n 4ms with line type and chamfer Draw a line LINE Xa Ya Xe Ye C LINE 10 10 50 50 31\n 0.7ms Backlight on LEDON LEDON\n 4us Backlight off LEDOFF LEDOFF\n 4us Animation MOT Xa Ya Ps Pe Pt MOT 0 0 10 14 100\n 0.15ms Animation off MOFF MOFF\n 4us Call on PIC PIC Pn Xa Ya PIC 1 30 30\n 125ms Draw a rectangle RECT Xa Ya Xe Ye C RECT 10 10 100 100 31\n 5ms Get screen size * SIZE SIZE\n 13ms Display STR Xa Ya C Str STR 0 0 31 Hello World\n 0.8ms / alphabetic string Display alphabetic string with background colour STR Xa Ya C Cb Str STR 0 20 65535 31 Hello World\n char 30us / char Set baud rate BAUD b1 b2 BAUD 9600 9600\n 20ms Run demo DEMO Dt Xa Ya DEMO 1000 0 0\n 20ms Stop demo DMOFF DMOFF\n 20ms Change orientation TURN Tn TURN 90\n 140ms 14
Notes: Xa Ya :Start x y coordinates. Xe Ye :End x y coordinates. C :Colour (16 bits,rgb 565). Xb Yb :Start x y coordinates in flash image. Xs ys :Size of flash image block. Ds Do :Length of solid line / dotted line. Str :ASCII String (8x16). Pn :Picture number in flash 000-999. R :Radius in pixels. Ps :Start Picture number. Pe :End picture number. Pt :Time between pictures (step:100ms). * :Returned on RX STY Xsize Ysize\n b1 b2 :Baud rate (2400,4800,9600,19200,38400,56000,57600,115200) Dt :Time between pictures (step:100ms). Tn :Rotation angle (0,90) Notes: Anti-static precautions should be observed whilst handling this product. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MIDAS MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Midas disclaims all liability arising from this information and its use. Use of Midas s products as critical components in life support systems is not authorized except with express written approval by Midas. No licenses are conveyed, implicitly or otherwise, under any Midas intellectual property rights. 15