Home

2. Features - Thaieasyelec.net

image

Contents

1. UART 1 UART 2 VS1011E TOUCH SCREEN CONNECTOR LCD SOCKET POWER LED Full option version Top side SDRAM micro SD CARD SOCKET Full option version Bottom side Venus Supply Co Ltd Page 7 ThaiEasyElec com Mi On line Electronics Shop for Embedded System GPIOs CAN CONNECTOR SERIAL PORT 0 RS232 mini JTAG CONNECTOR RESET SWITCH UART 3 UART 0 BATTERY HOLDER FOR RTC sees DC CONNECTOR TI I1 RS485 CONNECTOR ML PA REOR titer cPios el ESPECIE i lec omilli E GPIOs ada et M nO m USB HOST CONNECTOR DE NTOSM H FOR P E STATUS LED gE ya USB DEVICE HEADPHONE JACK 3 5mm ime t a E gu 2r ABRE s EE E mi ni SUN mH i UART 1 rios eoe 7i a UART 2 VS1011E LCD SOCKET TOUCH SCREEN CONNECTOR POWER LED Low cost version Top side R40 a ci czs BET mc 5 C29 GE x mE E E E ES p E gt ES E E EM o E ED ES E E EM v R27 a Lo Aa B X r gt d 135 O8 J ons Mi a Ie d 6 j t 88 us m S F E aA Ss cS D micro SD CARD SOCKET Low cost version Bottom side Venus Supply Co Ltd Page 8 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System GPIOs CAN CONNECTOR SERIAL PORT 0 RS232 mini JTAG CONNECTOR RESET SWITCH UART 3 UART 0 yovv v qun BATTERY HO
2. development Venus Supply Co Ltd Page 19 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde 6 Example Code Descriptions Contents below are referenced to graphic library example there may be some differences in other examples 6 1 Files amp Folders In latest generation of our example code source files are separated to folders for clarity This section tells you which one you should look for 1f you re finding something and tell you what is contained in files root contains necessary files startup LPC17xx s start up file for LPC1788 main cm3 c contains necessary hardware start up functions for example SDRAM timers hw mini sun7 h contains ports and devices definition for mini SUNT app config h includes all header files and has many configurations that can be modified for each application this file is included on the top of every source files drv_Ipce24xx contains driver files for LPC1788 including SPI I2C PWM serial port RTC and LCD controller drv onb contains driver for devices on the board including EEPROM touch screen controller STMPE610 drv_xdey contains driver for external module including VS1011E module and C328 camera sw_mod contains software modules or middleware console c receives characters from console port and provides echo then check 1f characters match command created in app_console c font engine c prepare buffer to be printed on
3. MHz crystal Maximum of 64 MB memory with 2 of 16 bit EtronTech s EM63A165TS 5G SDRAM 32 bit Connector for 800x480 pixels wide screen 7 TFT LCD and 4 wire resistive touch screen panel Touch screen controller IC STMPE610 Micro SD card socket SPI interface supports SDHC high capacity type On board 8KB EEPROM the last 128 bytes are reserved for screen calibrated parameters There 1s also on chip 4KB EEPROM in LPC1788 Selectable UARTO with LVTTL level 3 3V with 5V tolerant or RS232 level for command line interface and in system programming Connectors for LVTTL level UARTI UART2 and UART3 RS485 interface using 5N75176 and 4 pin 2 54 mm connector port ThaiEasyElec s module connector consisting of SPI and UART signals from MCU can be configured as 7 GPIO ports this UART port is shared with RS485 interface 22 GPIOs One USB host interface with USB type A connector and power switch IC LM3526M L One USB device interface with mini USB type B connector Built in DP83848 Ethernet and RJ45 connector full option only Built in V8 101 TE MP3 decoder with 3 5 mm headphone jack full option and low cost only Mini JTAG connector for programming and debugging 5VDC power supply terminal Footprint for CAN PHY TJA10xx not installed Footprint for SPI FLASH AT45DBxx not installed Venus Supply Co Ltd Page 5 Enable Your Design INGIEGSYEIec com LU Shop fo Embedd Hardware compa
4. amp time Venus Supply Co Ltd Page 29 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde Camera command C328 or compatible camera needed CAPTURE output_jpeg_file_name lt enter gt Capture image from camera and save to SD card in JPEG format By default using 4 3 inch LCD will set capture resolution to 320x240 and 640x480 for 7 inch so captured image can be displayed on LCD Showing images commands SHOWJPEG jpeg_file_name lt enter gt Show a JPEG file from SD card on LCD Now the command supports only files with 8 m x 8 n size For example 320x240 640x480 Files which are bigger than LCD resolution can not be shown SHOWBMP bmp file name enter Show a BMP file from SD card Files which are bigger than LCD resolution can not be shown Logging command WRLOG text lt enter gt Write a line of text into current log file Miscellaneous IO port O l lt enter gt Drive IO port to 0 or 1 the port number can be 0 16 These ports are in GPIO connector P6 and P17 DELAY n lt enter gt Delay n time of 100 ms This command is useful when used in extension script BAUDRATE I rate enter Set baud rate of serial port 1 The rate value can be for example 115200 57600 9600 This command might be set only once and can be placed in the main script file SERI text lt enter gt Print out text from serial port 1 Venus Supply Co Ltd Page 30 Enable Your Des
5. cO e o MOM 0000000 Io z 1n0 000000 O H o zin B m m mini JTAG DF amp m ost u ii D cn Bo m cM ThaiEasyElec comi us serment ool lloo PS WARTA y ta oojJ oo EON o O Oo O Oo atatum Mamma E ES m m oo OO LL ool l loo SE adi Vala Einin z E jo PE Pe GPTO xa a a ay cu w O IU THT ES Ne fll AJE eu cre C3 S5 SUN7 Rev C cr Te a na y Jeon 5 B TT Bm mini i a N z 1 ERIS Em P e Jee HN 25 50 30 00 Top side Venus Supply Co Ltd Page 38 31 50 64 00 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde Appendix 1 TS MODE refers to lcd ctrl h TS MODE is display mode used in functions start with TSLCD Now there are 3 modes available T8 MODE NORMAL TS MODE INVERSE and TS MODE FULL TS MODE NORMAL To displaying a circle or some images having white background user may want this white background to be transparent Using this mode all pixel having value OXFFFF will considered as background and it will be display as read back color The example of this mode displaying 1s the volume bar There you can see blue background instead of white TS MODE INVERSE As it s name inverse The circle or rectangular drawn will have inverse color to the old color Color parameter sent to the function will be 1gnored TS MODE FULL In case of showing a text message again and again in the same
6. no protection so please check input voltage and polarity carefully The on board firmware from our store 1s for 7 LCD If it is used with 4 3 LCD firmware should be compiled and programmed to the board first Powering up the LCD shows Press the screen to recalibrate within 1 second At this state if you want to recalibrate the screen press on it Anyway the board is pre calibrated so users don t need to do it again Calibration is needed when LCD size 1s changed or touch panel connector is not connected in the same way when the board was calibrated Without recalibration calibrated parameters are read from last 128 bytes of EEPROM These parameters are used to calculate which point the screen is pressed After that the example application starts In order to recalibrate the screen there would be 5 points on the screen to be pressed For accuracy please touch it slowly and a stylus should be used Using 5 points for calibration the user must press the points accurately until the error is acceptable Then the board needs to be reset There are example projects provided on our websites www thaieasyelec com and www thaieasyelec net They contain many files so please take a look at section 6 Example code descriptions to understand source code structure and to have the project set correctly And then to download firmware to the board see section 7 Programming Debugging and Command line interface about how to set tools for
7. the designer doesn t need knowledge on C language or even programming He or she can build up the demo on the hardware not just on a PC or notebook This can make the demonstration more realistic and after that you don t have to do the GUI twice Here the software engineer 2 person may have to do little jobs for interfacing with some input sensor in the demo state Even in final less code needed to be written Venus Supply Co Ltd Page 32 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System m SUN STUDIO 1 0 El x Function 50 H Background BG ome home LBLO language BT10 button BT12 textbox BT13 image Font BT14 table BT15 bar BT16 popup BT17 1294 free style BT18 op SCS SCs8 Image Font Textbox Image Button h Color Button ae C Background color 255 255 255 Percent Bar Popup Free Style Object Position gt x 0 Y 0 Name and ID r Show Time General Purpose Variables Keypad and Sound r Char Type Long Type Dogs scso xl Screen D E Sec Popup 0 Sec Language 255 Indexo Indexo ID 0 Wext screen C Custom screen 5 50 Indexi Keypad Defaut Del SCR Edit Index2 Indexi Path Seo pati Index3 Sound jo Check up our website to download S
8. the LCD font thai plugin c same with font engine c but with extra language in the project other language font engine can be adapted from this one obj lib c manages standard objects such as check boxes buttons keypads textboxes and etc Venus Supply Co Ltd Page 20 Enable Your Design ThaiEasyElec com Bil On line Electronics Shop for Embedded System screen obj c manages objects on the screen find which one is pressed or released can call associated functions script reader c manages reading script from SD card characters are then sent to console so any console command can be put in the script touch engine c manages calibration and calculate point from data read from touch screen controller utils custom c contains useful general functions being used in many other source files jpeg_decoder c manages jpeg decoding log manager c manages logging app contains application specific source files and header files app bs sun demo c contains application specific initialization and routines app console c contains command string and functions to be called when commands are entered app sd ui c contains SD card associated functions app scr func c contains screen associated functions fonts contains arrays that are used to generate characters these arrays will be stored in FLASH memory images contains arrays of binary data ready to be shown on the LCD these arrays will be stored in FLASH memory fat sd co
9. Elec Products amp To const unsigned char font angsana enc h variable CHERCHER TP Accessories Projects Font font_angsa REE ce Pek Senet Generate and send bin files na eng32 48 bmp IER Pixel Dept 32 bin code width 512 heigth 288 Reverse R lt gt B Drive E width 512 heih 208 Bytes ine B Fie size KB 8 Thoitosytiec com Notice on the Height parameter in Select Format option This must be set to match your font images It could only be in multiples of 8 And the highest font supported is 64 pixels Venus Supply Co Ltd Page 43
10. INMNN Venus Supply Co Ltd Page 10 ThaiEasyElec com Ml On line Electronics Shop for Embedded System Connector P6 Pin Name in project Lo 0 88V gp Lo LE e 3 4 PO p S ADO 0 I2SRX CLK CAPS O 4 P24 ADO 1 12SRX_WS CAP3 1 S PI S1 USB OVRCR2 SCK1 ADO 5 SCLO 6 PO tZ USB PPWR2MISOt ADO 6 P1 2 MCICLK PWMQ 1 8 P5 1 A 24 MISO2 MAT2 3 9 P2pS CKEOUM A PIN PA 18 A 18 19 SDAO J Pins dedicated for I2C functions They can t be used as GPIO But the user can connect them to external IC with I2C interface 1 3 3V Connector P17 Pin Name in project Lo 88V 0 00 0 o y a a o 8 PO 4 I2SRX CLK RD2 CAP2 0 o 4 PO S I2SRX WS TD2 CAP2 1 5 PO e I2SRX SDASSEL1 MAT2 ORTS 6 J PO LPESTX CLKSCKI MAT2 1 RTC EVO PO 9 28TX SDA MOSIT MAT2 S RTC EV2 8 AJ POR7LCTS1MISOO OSPN 9 P1 3 MCICMD PWMO 2 P1 5 MCIPWR PWMO 3 P1 6 MCIDATO PWMO 4 P1 7 MCIDAT1 PWMO S P1 11 MCIDAT2 PWMO G6 15 GND p 16 J QGND J JJ Venus Supply Co Ltd Page 11 ThaiEasyElec com Ml On line Electronics Shop for Embedded System Console 1 i UARTO jr PTFE r ue irs i P7 UARTO OR LU OND Lo 4 1 TXD 39 RK a a GND Note that connecting the console port with USB to s
11. LDER FOR RTC Vi WW LL d D Ea ao i DC CONNECTOR RS485 CONNECTOR T VK to eiiis GPIOs GPIOs USB HOST CONNECTOR EINTO SWITCH FOR ISP STATUS LED USB DEVICE 2 UART 1 e i UART 2 TOUCH SCREEN CONNECTOR POWER LED KERT iE LCD SOCKET Basic version Top side n m pa p HEIMINI EHEN micro SD CARD SOCKET Basic version Bottom side Venus Supply Co Ltd Page 9 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System 3 2 Connector Descriptions Power Supply Connector GND 5 Note that as some parts on the board use 5V supply directly Care must be taken when supplying power to the board Over or inverse voltage will damage the board GPIO Connectors ane pus 1 2 3 4 P5 0 A 24 MOSI2 MAT2 2 MD2 RST PIN P2 26 CKEOUT2 MAT3 0 MISOO MD2_ MISO PIN P2 27 CKEOUT3 MAT3 1 MOSIO MD2 MOSI PIN 7 RXD4_PIN P2 22 DYCS2 CAP3 0 SCKO MD2_SCLK_PIN P5 4 U0 OE MAT3 3 TXD4 TXD4 PIN P2 23 DYCS3 CAP3 1 SSELO MD2 CS PIN P2 0 PWMI 1 TXD1 LCDPWR MD2 IN PIN P2 14 CS2 CAP2 0 SDA1 MD2 IO PIN P2115 CS3 CAP2 1 SCL1 MD2 OUT PIN 5V o 58V y 16 Pins dedicated for SPI functions when VS1011E MP3 decoder IC is installed They can t be used as GPIO But the user can connect them to external IC with SPI interface NENNEN NNNM NEM NENNEN o NENNEN NENEEENE NENNEN NENNEN o 9 ee N
12. UNT Studio for free Upgradable GUI now you can have a modification on your project without needs to reprogram all of the products again What have to be done is to make mechanism through serial port Ethernet GPRS or etc so you can remotely upgrade your script file or the whole image Or even other parameters on your project can be stored on the script to be used with console commands 8 2 Features referenced to the original version of GUI script Example scripts shown in this section are to demonstrate how the GUI script look like to make script officially please download and see latest GUI script user manual Graphic based and plain application supported Some applications need colorful graphic where buttons are built from images and the application needs colorful background While some applications don t need so much graphic here button and background have plain color and use texts on them This gives faster initial time with less space for images GUI script does support both kinds of applications in the same software core Venus Supply Co Ltd Page 33 ThaiEasyElec com Mil Sound plug in supported For PoS or other applications that may need instruction speech or need playing song GUI script support playing MP3 files at the beginning of each screen and have functions so user can add MP3 files in playlist and the playing will stop when screens changed However to support sound plug in VSIOI TIE or compatible module is
13. W Adapter JTAG Device Chain Serial No M 25 IAE IDCODE Device Name TOO 49 on4paoo477 ARM CoreSight JTAG DP LILIME Version ULINK2 g Device Family Cortex M Firmware Version M1 42 OSEE WESS Sw Port TAG C Manual Configuration Max Clock 200kHz m Debug Connect amp Reset Options Cache Options Download Options Connect Normal Reset Autadetect Iw Cache Code Verify Code Download v Reset after Connect Stop after Bootloader i Cache Memory Download to Flash Back to target s option select Utilities and configure as follow Options for Target Target 1 Device Target Output Listing User CC Asm Linker Debug Utilities Configure Flash Menu Command f Use Target Driver for Flash Programming LILINK Cortes Debugger Settings i Update Target before Debugging Init File amp E dit t Use External Tool far Flash Programming Command Arguments Venus Supply Co Ltd Page 24 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System select setting and add programming algorithm as follow Cortex M Target Driver Setup Debug Trace Flash Download Download Function HAM for Algorithm LOAD Erase Sectors v Verify Stark D OOOO000 Size 00800 C DonotErase i Reset and Run Programming Algorithm Description ice Ti Device Size Address Range LPClZw amp IAP 512kB Flash On c
14. area You need the use this mode as the blank space will be filled with background color Anyway displaying an image TSLCDShowPic2 with this mode all color from original image code will be display including white color Note that a rectangular doesn t have blank space in this case TS MODE NORMAL and TS MODE FULL have same effect 2 Pen Status refers to app config h Pen status or in code pstatus means the current state of pen This is useful parameter sent to ScrObjDo There are 4 available statuses PST NOTFOUND means that the screen is not pressed Venus Supply Co Ltd Page 39 Enable Your Design il ThaiEasyElec com On line Electronics Shop for Embedded System PST DOWN occurs once the screen is pressed PST HOLD occurs continuously while the screen is pressed PST UP occurs once the screen is released 3 Color Depth Selection Guide On BlueScreen SUN and SUNT 3 color depth provided with example code 24 16 and 8 bit per pixel This section provides information for users to select appropriate color depth for their application 3 1 Color Depth vs Memory amp Speed It s true that 24 bpp mode provides more colorful images on screen unfortunately with 7 LCD only 18 color data available so it s actually 18 bpp shown on the screen But if you have tried 16 bpp mode it s no doubt that your image is just the same with 18 bpp mode Besides of how colorful the LCD provides memory and spe
15. art by default make a text file main txt and put it in a folder named sr on the root of SD card that s sr main txt We hope that users can develop project faster with them This section provides information on how to use these commands First to know is console engine accepts both uppercase and lowercase characters just for the command word And you can put any space characters before or between arguments Backspace can be used to delete last characters and TAB characters will be acted as a space HELP enter Help command let the board shows all of available commands and parameters SD card related commands LS lt enter gt Just like UNIX or Linux this command list files in current directory CD folder_name lt enter gt Change current directory to a new lower To get upper use CD READ file_name lt enter gt Read a file READHEX file_name lt enter gt Read a file but now shown in HEX format DELETE file_name blank_folder_name lt enter gt Delete a file or a blank folder RENAME old_name new_name lt enter gt Rename a file or folder Venus Supply Co Ltd Page 27 Thaitasytlec com ni MKDIR folder_name lt enter gt Create a directory OPENWRITE W A file_name lt enter gt With W option create a new file to write And with A option open exist file to append WRITE text lt enter gt Write text to the opening file MP3 playback related commands VS1011 module nee
16. cluded while c is to be added to project the difference in uses is whenever the image would be used in one source file h can used Unless use c and then declare them with extern prefix in app config h then you can use it anywhere in the project For example fonts are used many times in many source files it must be added like a c file Making bin files 1s useful for storing images on SD card You may comparing their size and load time with BMP or JPEG files with JPEG there are also time consumed for decoding You may use this for background general images or buttons With all option correctly selected click Generate and specify the target file name or select destination for multiple files To make a font see settings below Venus Supply Co Ltd Page 42 ThaiEasyElec comlllll On line Electronics Shop for Embedded System ay bmp2h_cony v8 1 Oe x Select LCD C NOKIA 6100 1324132 C DM1785220TT5605 176x220 fELT240320TP 240 320 RGB interface LCD 4 3 7 WEN d a m eiu c C Dot Matrix Select Format Height 2 colors 1 bit for font making 48 ES C 2 colors 1 bit for display 256 colors 8 bit BGR 3 3 2 C 4k colors 12 bit BGR 4 4 4 64k colors 16 bit BGR 5 6 5 true colors 24 bit BGR 8 8 8 Select Method C Generate h c file Generate bin file C Generate multiple bin files From E ThaiE asy
17. ded PLAY mp3_file_name lt enter gt Play an MP3 file PLAYALL folder_name lt enter gt Play all MP3 files in specified folder AUDIO cmd parameter lt enter gt Use audio related commands See table below for more detail about cmd and parameter Audio commands table Audio Commands Meaning Description Play next file Venus Supply Co Ltd Page 28 Enable Your Design il ThaiEasyElec com On line Electronics Shop for Embedded System LAN setting commands Although LAN source code 1s not provided we create LAN parameters and let you set easily These settings are store in EEPROM and will be loaded automatically SETIP xxx xxx xxx xxx enter SETSUBNET xxx xxx xxx xxx enter SETSERVER xxx xxx xxx xxx enter Set IP subnet and server IP respectively SETID id lt enter gt Set unit ID for general purpose between 0 255 SHOW lt enter gt Show LAN settings Date amp Time commands SETTIME hour minute enter Set time to RTC SETDATE day date month year lt enter gt Set date to RTC Following describes the use of parameters Day Accepts 0 6 and day names 3 characters in both uppercase and lowercase For day names use SUN SAT or in lowercase Date Accepts 1 29 1 30 or 1 31 depend on month Month Accepts 1 12 and month names 3 characters in both uppercase and lowercase For month names use JAN DEC or in lowercase Year Accepts 0 9999 GETTIME lt enter gt Show date
18. e screen Init Here the first screen init function is what you have to do when screen 0 starts If there is nothing to do this line is not needed So users only need to write only necessary functions and let GUI engine do the rest g rsero basklOUNs Tirst Screen taskl00ms Venus Supply Co Ltd Page 36 ThaiEasyElec com ill On line Electronics Shop for Embedded System Now first_screen_task100ms function will be called every 100 ms while application run in screen Q gurrtaDID press taben press With is code tableO press function will be called when the table is pressed Here row and column index will be passed to so you can make highlight or something as needed guibpbIl0 relesse DUCLONU release Except from screen change or insert key characters to textbox Here with buttonO release you can have special action to be done when this first button is released Please note that with release or press no pen status needed to be checked But if users need to do special action such as counting time when button is pressed continuously use do and check pen status for PST HOLD for more detail about pen status see appendix Venus Supply Co Ltd Page 37 9 Drawing Unit mm fe 54 Y 5 OK 0000 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System 3l 58
19. ed have significant difference on each color depth mode Because of the truth that you need 4 bytes to store a pixel with 24 bpp while it takes a half with 16 bpp and a quarter with 8 bpp 4 bytes per pixel more memory 24 bpp RGB 8 8 8 j pp needed with slower display speed 16 bpp 2 bytes per pixel an acceptable RGB 5 65 choice for colorful application 8 bpp 1 bytes per pixel slim and fast are perfect choice for plain application Depends on your application here you can set color depth in app contig h described earlier Venus Supply Co Ltd Page 40 Enable Your Design il ThaiEasyElec com On line Electronics Shop for Embedded System 3 2 Palletized Color Even that 8 bpp mode is palletized mode just like a table of color codes with 256 colors available The code has managed to set the pallet color so that users can use them as BGR 332 color blue component in MSB side the code resides in lcd ctrl c at function TSLCDInitPalette In the lcd ctrl h file there are example colors defined in all 3 color depth modes 4 Images and Fonts Generating Even that we have supported BMP files using binary files 1s still the fastest way for 16 bpp to load an image to SDRAM since their size 1s smaller with 16 bpp BMP file takes 3 bytes per pixel while binary file takes 2 bytes We provide information here for ones who need better performance and for making font in binary format used for GUI script The lat
20. erial in the wrong way will not damage any devices Correct connection lights LED4 This connection style is designed so cross connection can be easily established LVTTL UART Connectors Po UART3 P14 UART1 P15 UART2 Connector UART 1 2 3 Pin Name Pin 1 3 3V p RXDx TXDx GND Venus Supply Co Ltd Page 12 ThaiEasyElec com Mi On line Electronics Shop for Embedded System RS232 Serial Port 1 Connector P1 RS232 Connector P1 Pin Note that a jumper must be installed on P9 to use RS232 level for serial portO See section 7 2 for more detail CAN Connector Note that CAN IC is not installed by default Venus Supply Co Ltd Page 13 ThaiEasyElec com Ml On line Electronics Shop for Embedded System RS485 Connector Connector P12 Pin Name Pin 5V A GND Note that the termination resister for end node is not installed by default And a jumper must be installed on P18 to use RS485 interface 3 5 mm Headphone Jack Name Pin Left GBUF Right Note that the signals on audio jack are intended to be used with headphone Please contact us if you need to connect it with a speaker Venus Supply Co Ltd Page 14 ThaiEasyElec com Ml On line Electronics Shop for Embedded System LCD Connector Note that LCD connector is top contact type The pair cable must be installed correctly by turning up the contact side Touch Screen Connector Note tha
21. est version of bmp2h conv is 8 1 it comes with more options and now you can select multiple files output files will be named as the input files So you don t have to do it one by one anymore To start create your image using Paint or whatever you like And then run bmp2h conv and load your image s with 2 or more files selected no image would be shown in the software Now set parameters as shown below except of Select Method Venus Supply Co Ltd Page 41 Enable Your Design ll ThaiEasyElec com On line Electronics Shop for Embedded System amp bmp2h conv v8 1 15 x Select LCD C NOKIA 6100 132x132 DM176220T T5605 176x220 FELT 240320TP 240x320 RGB interface LCD 4 3 7 C Dot Matrix Select Format Th a l eis col ij Fr 2 colors 1 bit for font making gt On line Electronics Shop for Embedded Systemi E C 2 colors 1 bit or display ee 256 colors 8 bit BGR 3 3 2 C 4k colors 12 bit BGR 4 4 4 64k colors 16 bit BGR 5 6 5 true colors 24 bit BGR 8 8 8 Select Method C Generate h c file Generate bin file C Generate multiple bin files From fE i ingd i CERE d T Run ee Te const unsigned short heading4 h variable SE aneral caniisenti Feline width 480 pu heigth 272 incase Reverse R lt gt B Drive E In Select Method option select what you need to store image in code memory use h or c file h is to be in
22. ges or labels can be set their language so with the language button pressed language mode changes and the GUI engine will show only matched objects It does support up to 8 languages in an application Venus Supply Co Ltd Page 34 ThaiEasyElec comillll On line Electronics Shop for Embedded System 8 3 Script Loading Mechanism The script reading mechanism can be pictured below Read a line from script file li GUI command found From the picture above not only GUI script can be stored on the file but users can have other console commands on it While reading scripts 1mages fonts and texts will be stored in SDRAM Picture below shows how these data including parameters for objects stored in SDRAM Venus Supply Co Ltd Page 35 ThaiEasyElec comillll On line Electronics Shop for Embedded System OxAODOO000 OxA0000000 L OxA0000000 2L OxAOO00000 3L OxAOO00000 4L OxAO000000 2 MAX IMAGE BUF L Free memory L screen size x memory used for 1 pixel For 800x480 with 24 bpp gt 1500KB The blue region contains structures which store parameters for example origin position of buttons their colors and etc 8 4 Application Programming Interface After reading script file finished AppScrInit will be called With this function users can tie their application specific code to each screen or tie events to objects buttons tables or textboxes See example code below g isc O init Tire
23. hip Flash 512k DDBBODODH DOD7FFFFH 7 2 Serial Ports Command line interface can be connected using UARTO as CONS SER is defined to 0 1n app config h Anyway the board provides UARTO in 2 types RS232 and LVTTL There is a jumper P9 to be installed see pictures below Venus Supply Co Ltd Page 25 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System To communicate the board with command line interface HyperTerminal or compatible software can be used Set the COM port as follow COM4 Properties Port Settings Bits per second Ems Data bits Parity Stop bits Flow control The serial port 0 also served for ISP In system programming which user can use software like FlashMagic to program the MCU To do this press and hold S2 reset the board and then release S2 Now the MCU should starts with ISP boot loader When programming finished reset the board again without holding S2 Venus Supply Co Ltd Page 26 Enable Your Design ThaiEasyElec com Mi O line Electre ystem n li Ele nics Shop for Embedded S 7 3 Command Line Interface Example code provides plenty of commands these commands allow users to test peripherals and set many necessary parameters Also user can make a script file with setting commands on it then let the board read and do at the st
24. ign dl ThaiEasyElec com On line Electronics Shop for Embedded System SNAPSHOT file name enter Save current screen onto SD card as a BMP file Now that you know what the board can do please see app console c to view the source code and apply it to your application Venus Supply Co Ltd Page 31 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde 8 GUI Script GUI script is a new concept for GUI development on non OS application Many developers are not familiar with OS such as uCLinux where application software can be stored as an 1mage on SD card so it can be upgrade easily GUI script was created so that developers can develop GUI with a text file and then store their fonts 1mages sound files MP3 and etc on SD card Further more developer may manage to download these files from network at the beginning of application not provided but users can develop this themselves 8 1 Why Using GUI Script The advantages of using GUI script are Easier GUI development in the old days you may have one person designed GUI on software like Flash or even made ordinary images for presentation And then one person wrote code on hardware following the design this one had to spend lot of time writing code to just show the GUI This is even worst in some company which these functions needed to be done by only one person With our new design software called SUN7 Studio see image below
25. mini SUN7 User Manual v1 00 Enable Your Design j ThaiEasyElec com On line Electronics Shop for Embedded System ThaiEasyElec comlllll On line Electronics Shop for Embedded System Revision History 4 Feb 2012 Venus Supply Co Ltd Page 2 Enable Your Design il ThaiEasyElec com On line Electronics Shop for Embedded System p y Contents Introduction 4 2 Features 5 2 1 Hardware 5 2 2 Software 6 3 Peripherals 8 3 1 Layouts 8 3 2 Connector Descriptions 10 4 Requirements amp Accessories 17 5 Getting Start 19 6 Example Code Descriptions 20 6 1 Files amp Folders 20 6 2 Project Setting 21 7 Programming Debugging and Command Line Interface 22 7 1 JTAG Interface 27 7 2 Serial Ports 25 7 3 Command Line Interface 21 8 GUI Script 32 8 1 Why Using GUI Script 32 8 2 Features 33 8 3 Script Loading Mechanism 35 8 4 Application Programming Interface 36 9 Drawing 38 Appendix 38 1 TS_MODE 38 2 Pen Status 39 3 Color Depth Selection Guide 40 3 1 Color Depth vs Memory amp Speed 40 3 2 Palletized Color 41 4 Images and Fonts Generating 41 Venus Supply Co Ltd Page 3 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde 1 Introduction Mini SUNT are resistive touch panel controller board comes with NXP s powerful ARM Cortex M3 LPC1788 the LCD controller integrated MCU It s the upgraded and optimized version of BlueScreen SUN7 which u
26. needed Background images At the start of the application all images will be loaded to SDRAM now you can display them as background With the setting background file ID for each screen the GUI engine will display the set image when the screen shown Users can also set wait time for any screen that just show up for a while and go with just a line of script GUI script original version supports background images in binary format JPEG and BMP General images Show images on your screens with only few scripts GUI script in original version supports general images in binary format and BMP Buttons With the GUI scripts you can set position texts on the buttons color size normal image ID press image ID disable image ID for button and etc GUI script will display and change image when buttons are pressed and even move with settable distances rightward and downward Labels Label here means ordinary text on the screen that needed nothing to do when is pressed User can set origin position text color font ID and alignment Textboxes Textboxes are text on the screen that can be inserted or deleted with associated key buttons Tables With GUI script tables can be created simply by setting row and column quantities and sizes Captions color content color texts on caption can be set And there are functions provided to print text on table making highlight and more Multiple languages support background images button ima
27. ntains FAT file system library modified from FatFs 6 2 Project Setting The example code can be run on mini SUN7 board with any option except the LCD size to make it possible many define are used and it s necessary for users to know how to set so the board run as expected See at the head of app config h first of all pins are defined in a header file The user doesn t need to do anything with this hardware configuration which board you re using include hw mini sun7 h use this line if you re using a SUN Venus Supply Co Ltd Page 21 ThaiEasyElec com ill On line Electronics Shop for Embedded System Now select the LCD size Only Graphic library demo supports both LCD SIZE which LCD you re using define LCD SIZE 4 3 for 4 3 inch LCD define LCD SIZE 7 for 7 inch LCD Then select color depth only Graphic library demo supports all options Only with 8 bpp mode you can set the intensity which makes all color lighter color depth if you re using board with 1 SDRAM 16 or 8 should be used define COLOR DEPT 24 define COLOR DEPT 16 define COLOR DEPT 8 fi palLeceized 256 colors define COLOR DEPT 8 INTENSITY SET set intensity bit used only with 8 bpp palette mode The last one at the half of file how many SDRAM on the board one with 32MB is enough for many applications If your board has 2 64MB please comment the line out SDRAM config define SINGLE SDRAM comment this line
28. out if your board has 2 SDRAM ICs Venus Supply Co Ltd Page 22 ThaiEasyElec com Ml On line Electronics Shop for Embedded System 7 Programming Debugging and Command Line Interface 7 1 JTAG Interface Mini SUN7 supports JT AG interface for debugging and programming Many programmers can be used corresponding to your IDE For uVision software on the target s option select Debug and configure the flash programmer as follow Y Options for Target Target 1 Device Target Output Listing User C C Asm Linker Debug Utilities t Use Simulator Settings Use LILINK Cortes Debugger Settings Limit Speed to Real Time Iv Load Application at Startup W Run to maint Iv Load Application at Startup Run to maint Initialization File Initialization File J 1 Restore Debug Session Settings Restore Debug Session Settings i Breakpoints iv Toolbox i Breakpoints iv Toolbox Mw Watch Windows amp Performance Analyzer Iv Watch Windows Iw Memon Display iv Memon Display CPU DLL Parameter Driver DLL Parameter SARMCM3 DLL MPU ISARMCM3 DLL MPU Dialog DLL Parameter Dialog DLL Parameter DARMPT DLL pLPC1788 TARMPT DLL pLPC1788 Cancel Defaults Venus Supply Co Ltd Page 23 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop system for Embedded S Cortex M Target Driver Setup Debug Trace Flash Download LLINK USB JT AGS Y
29. rison table GPIOs 12 P17 12 P17 12 P17 10 P6 10 P6 10 P6 7 P8 7 P8 10 P8 64MB 32 bit 32MB 16 bit 32MB 16 bit 2 2 Software Demonstrating application GUI script demo Command line interface software module Capture images from C328 camera show images on LCD Show JPEG BMP images from SD card SD card commands e g change directory list read write Read and write time RTC Play MP3 file from SD card Write log file GUI software module Design your screen with object oriented method the running background software will manage which object should be operated GUI script engine help you create GUI play sound easier see section 8 GUI Script for more detail Low level drivers LCD driver with 24 bpp 16 bpp 8 bpp palletized Touch screen controller STMPE610 driver Serial port SPI interface I2C interface RTC PWM Venus Supply Co Ltd Page 6 ThaiEasyElec com Ml On line Electronics Shop for Embedded System 3 Peripherals 3 1 Layouts GPIOs CAN CONNECTOR SERIAL PORT 0 RS232 mini JTAG CONNECTOR RESET SWITCH UART 3 BATTERY HOLDER FOR RTC Tee UU 0m DC CONNECTOR p e ete ala a a ETHERNET PORT GPIOs GPIOs ThalEasyElec comill w 9 ov A USB HOST CONNECTOR EINTO SWITCH FOR ISP STATUS LED USB DEVICE FEEFEE EEEE dn HEADPHONE JACK 3 5mm LIT UC HTRHHRHITHREIRSZITTMS
30. ses NXP s ARM7 LPC2478 Despite the change of MCU chipset on board switching power supply is removed and the MP3 decoder circuit is added plus more peripherals and GPIO ports All in the smaller 4 layer PCB with slimmer dimension with lower price Integrated with all necessary peripherals Mini SUN is aimed to be the core controller board for vending machine kiosk and industrial control panel The 4 3 inch and 7 inch touch screen TFT LCDs from our website are available for using with the board Mini SUN is assembled with 3 official versions full option low cost and basic versions The differences are Ethernet MP3 decoder circuit and SDRAM size See section 2 Features for more details Using ARM Cortex M3 running up to 120MHz the firmware can be developed in various ways An alternative we provide is non OS based using our easy proprietary GUI development method called GUI Script and our software SUN7 Studio It s well suited for not so complex graphical applications Please see section 8 GUI Script for more details Furthermore using the same software structure with SUNT the project running with SUN can be ported to Mini SUN easily Mini SUN are manufactured with Lead Free process and all materials on boards are Lead Free Venus Supply Co Ltd Page 4 Enable Your Design ThaiEasyElec com Mi On line Electron ided System ics Shop for Embedde 2 Features 2 1 Hardware NXP s ARM Cortex M3 LPC1788 12
31. t touch screen connector can be connected in 2 ways Once the board is calibrated it remembers the connection way Whenever it s swapped over the board needs to be recalibrated Venus Supply Co Ltd Page 15 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System JTAG Connector Note that as the board is designed for compact size small mini JT AG connector is used in place of standard 20 pin JTAG connector The user needs JTAG to mini JTAG adapter to program and debug the target board Venus Supply Co Ltd Page 16 Enable Your Design ThaiEasyElec com Mi On line Electronics Shop for Embedded System 4 Requirements amp Accessories 5VDC power supply 4 3 1nch LCD with base board optional 7 inch LCD with base board optional serial cable optional or USB to serial LVTTL device Stylus optional micro SD card optional Programmer Debugger optional ULink Ulink2 and mores JT AG to mini JTAG PCB adapter optional JTAG to mini JTAG Stylus Programmer amp Debugger Ulink2 Venus Supply Co Ltd Page 17 ThaiEasyElec co com ill On line Electronics Shop for Embedded System 4 3 LCD with base board 7 LCD with base board Venus Supply Co Ltd Page 18 Enable Your Design ThaiEasyElec com Mi O line Electre ystem n li Ele nics Shop for Embedded S 5 Getting Start The board can be powered via 5VDC terminal There is

Download Pdf Manuals

image

Related Search

Related Contents

stainless steel pre-charged pressure tank  DM6810 / DM5810 User`s Manual  Wet/Dry Vacuum Aspiradora para aspiración de residuos Líquidos  八戸市自動体外式除細動器(AED)貸付要綱  MEGA BASE RACE  

Copyright © All rights reserved.
Failed to retrieve file