Home
Blue Screen
Contents
1. 2 colors 1 bit for display 256 colors 8 bit 4k colors 12 bit 64k colors 16 bit Select Method Generate h file C Generate bin file C Generate multiple bin files C Generate and send bin files From C Documents and To const unsigned short namef h variable Settings Pe PESVOA Desktop New Folderpic_button1 bmp magel oo Pixel Dept 32 bin code wi dth heigth 100 Reverse R lt gt B Drive width 4g heih ho 24 Bytes ine 8 Fie size KB Thaitasytiec comi At To textbox change the name of image code to anything you like or you may change it later after the header file is generated This image is named as pic_button1 in this project Next click Generate and specify the target file name Finally copy the generated file to the project folder and include it As seen in app _screen_obj c this image is included as pic_button1 h Enable Your Design 15 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual In order to display this image on the screen see function bt1_draw in app screen_obj c First the area is filled with a rectangular Then it s overfilled with pic_button1 image with the offset pointer at so_obj SO_BT1 val so_obj SO_BT1 hsize so_obj SO_BT1 vsiz e with value of val at 0 3 four styles button can be displayed occasionally Notice about TS MODE NORMAL in function bt1
2. and add all source files in folder efs For more detail about efs stand for embedded file system see appendix Enable Your Design 10 ThaiEasyElec comill On Line Electronics Shop for Embedded System Blue Screen Manual After these settings the project should be compiled without any errors Some warnings may occur The project workspace should be seen as below F ae Y blue_screen_console aVision3 bes Edit view Project Debug Flash Peripherals Tools SVCS Window Help Qo Fe4 EH 2 gt a e e F E X Target 1 El a Target 1 5i 2 Source Group 1 bes ED LPC2300 5 TE main c e serial_Ipe2txx_v1_O00 c H e utils custom_v1_O0 c oe app_console c H E app_bluescreen _demo c H console wi _01 c H jE Wsl0xx c H spi_lpc23xx_vi_O1 c H i c_eeprom c J i2 c_Ipe23xx_v1_00 c bc_ad 843_ v1 00 c E screen_obj w1 O00 c t app_screen_obj c H tsied_elk24o320tp_vi_10 c H E debug c F e dir c H disc c H efs c F extract c E 4 Fat c Reqs Books Fun te compiling Sd c compiling time c compiling ul c linking Program Sige Code S7776 Ro data 50280 Ril data 368 fi data 12560 FromELF creating hex file blue screen console axt O Error s 9 Warning s Enable Your Design 11 ThaiEasyElec com ll On Line Electronics Shop for Embedded System Blue Screen Manual 5 4
3. Blue Screen User Manual v1 00 nable Your Design ThaiEasyElec com ill Enable Your Design 2 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 1 Introduction Blue Screen is a touch screen development board comes with NXP s powerful ARM7 LPC2378 resistive type 2 8 inch touch screen TFT LCD micro SD card socket and 8kB EEPROM With full of peripheral drivers and advance software modules e g screen object manager command line interface SPI interface 12C interface The board is suited for all levels of developer Any technical problem about coding please feel free to post it in our webboard Enable Your Design 3 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 2 Features Hardware 240x320 pixels TFT LCD with touch screen NXP s ARM7 LPC2378 Micro SD card socket connected via SPI interface support up to 2GB capacity High capacity HC type not supported Onboard 8kB EEPROM the last 128 bytes are reserved for screen calibrated parameters 1 port ThaiEasyElec s module connector consisting of SPI and UART signals from MCU UART connector for command line interface and in system programming TTL 3 3v with 5v tolerant 16 ports GPIO Mini B USB connector the board is powered from USB connector Software Demonstrating application MP8 player with graphic user interface ThaiEasyElec s V
4. S1011 Module required Command line interface software module Show image from SD card SD card commands e g change directory list open read open write Audio related commands e g play pause increase decrease volume Screen object software module Design your screen with object oriented method the running background software will manage which object should be operated Low level drivers LCD driver Touch screen controller AD7843 driver Serial port SPI interface 12C interface Enable Your Design 4 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 3 Requirement USB cable type A to mini B for supplying the board ThaiEasyElec s VS1011 module optional for MP3 player application free earphone ThaiEasyElec s USB to serial and cable optional for command line interface Stylus optional Micro SD card optional Programmer Debugger optional ULink and mini N Link are Supported VS1011E Module USB mini B to Serial Stylus ca se mini N link ARM USB JTAG Mini SD Card Enable Your Design 5 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 4 Drawing 66 04 mm eee o p 1G 4b Coup 3 _ a gt j 57 659 mmn AH BS 25 mm 9 048 int JLo egy As go CO Usass anjy l ha 2 B1 imma he a i aa ee
5. Source files description Header files only important files are shown 1 hw_blue_screen h define hardware for example TC_CS is at port 2 2 define TC_CS DPRT FIO2DIR define TC CS PRIS FIO2SET define TC_CS PRIC FIO2CLR define TC_CS PIN 2 DPRT direction port PRIS port set PRTC port clear PIN pin number in the port These may look awkward but it s very easy to change some pins 2 app config h this file is used to configure many parameters various on each project Header file including are in this file And this file is included in most of source file So which declaration shared on more than one source file should be declared on this file This file also has function declarations from app_blue_screen_demo c 3 All other header files are subjected to declare functions only source files only important files are shown 1 main c background functions are here including timer interrupt service routine 10_ RQHandler i o initialization io_init In case that user need to use more peripherals PINSEL may be set in io_init Notice that Applnit and AppRun are called from main user application may be modified or recreate using these functions Enable Your Design 12 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 2 app blue _screen c most of application are here except the graphic user interface which is in app _screen_obj c 3 scree
6. e Ei 2 21 imm Enable Your Design ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual 5 Getting start 5 1 Peripherals USB connector mini B Reset button JTAG connector ThaiEasyElec s module connector Console command line interface connector UARTO ISP Jumper Micro SD card socket 16 bit GPIO 4green LEDs 2 8 inch touch screen LCD ODOONOAaFKWND gt o_o Enable Your Design 7 ThaiEasyElec com ll On Line Electronics Shop for Embedded System Blue Screen Manual 5 2 Power it on Connect the board with your computer via USB cable as seen in picture ai Thue The board shows Press the screen to recalibrate within 3 2 1 seconds In this state if you want to recalibrate the screen press on it Anyway the board is calibrated from our factory so users dont need to do it again i xX OM x See Sy ee ee A EEEE ee eee AAA When the board starts up it loads calibrated parameters from last 128 bytes of EEPROM see function AppCalibrateScreen in app _blue_screen c These parameters are used to calculate which point the screen is pressed They are variable on each board In case that user overwrites some of these data in EEPROM At the starting up the calibration state picture below will show automatically without waiting Enable Your Design 8 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Bl
7. TAG Clock not over than 200kKHz if you are using mini N Link Enable Your Design 18 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual ARM Target Driver Setup ULINE USB JTAG Adapter JTAG Device Chain Move Serial No U0589C6E IDCOLE Paes TOO Ox4F1FOFOF ARM TDMI S Core Up ULINE Yersior v2 10 mi Device Family ARM i i i ID CODE Fimware Voo Automatic e Manual Configuration Device Marne Max JTAG Clock 2U0UkKH2 Add Delete Update IF ler Debug Cache Options Download Options Mise Options iW Cache Code iw Verify Code Download dd lise Reece eee W Cache Memory Download to Flash Cancel Back to target s option select Utilities and configure as follow Enable Your Design 19 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual Options for Target Target 1 Device Target Output Listing Uzer C C Asm Linker Debug Utilities Configure Flash Menu Command ULINK ARM Debugger Settings iV Update Target before Debugging Init File e Ete C Use External Tool for Flash Programming Command ot Arguments Aun Independent Cancel Defaults Select setting and add programming algorithm as follow Enable Your Design 20 ThaiEasyElec comIill On Line Electronics Shop for Embedded System Blue Screen Manual Flash Download Setup Download Function RAM for Algorit
8. _draw This is mode of displaying something on the screen See appendix for more detail Enable Your Design 16 ThaiEasyElec comill On Line Electronics Shop for Embedded System Blue Screen Manual 5 6 Programming Debugging and Command line interface 5 6 1 JTAG Interface Blue Screen supports JTAG interface for debugging and programming Connect JTAG cable so the pin 1 is on the same side with reset switch see picture below Enable Your Design 17 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual For Keil s software on the target s option select Debug and configure the flash programmer as follow Options for Target Target 1 Device Target Output Listing User C Asm Linker Debug Utilities C Use Simulator Settings i User ULINK ARM Debugger Settings Limit Speed to Real Time i Load Application at Startup i Run to maini i Load Application at Startup W Aun to maini Initialization File Initialization File Re Restore Debug Session Settings Restore Debug Session Settings if Breakpaoints lf Toolbox i Breakpoints i Toolbox lf Watchpoints amp PA i Wabkchpoints i Memory Display Mw Memory Display CPU DLL Parameter Driver DLL Parameter SARM DLL oL PC2100 SARM DLL Dialog DLL Parameter Dialog DLL Parameter DARMP DLL pLPC2378 TARM P OLL pLPC2378 Cancel Defaults Also select Settings and set MAX J
9. d back color The example of this mode displaying is 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 ignored TS_MODE_ FULL In case of showing a text message again and again in the same area You need the use this mode as the blank space will be filled with background color Anyway displaying an image I SLCDShowPic2 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 Enable Your Design 23 ThaiEasyElec com ll On Line Electronics Shop for Embedded System Blue Screen Manual PST_NOTFOUND means that the screen is not pressed 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 Embedded file system library EFSL Embedded file system library using in this application is free library downloadable from http sourceforge net projects efsl It s limited to SPI only LPC23xx s MCI is not support
10. ed It s very easy to port it to your existing hardware AVR NXP s ARM7 and some other platform have already had example In this application lpc200_spi c is modified from original code It is the bridge between our SPI library and EFSL Other files is also modified some lines are commented to decrease warnings and errors
11. edded System Blue Screen Manual Line 4 and 5 define horizontal and vertical origin of the object Line 6 enables this object Line 7 sets default value of the object value may be variable for each type of object Line 8 11 set the addresses of these function to there corresponding function Note that so_obj is structure type variable User may change its parameter when need So in case that user designs more than one screen in an application The array so_obj can be redefined again and again for each screen For more detail about so_obj please see in screen_obj h 5 5lmage generating In the MP3 player application most of images seen on the screen are generated from JPEG files or Bitmap files with the software called omp2h_conv The last version is 5 1 allows bigger size of image This part of manual shows step by step how to implement these pictures into your project Firstly create your image using Paint or whatever you like Secondly run bmp2h_conv and load your image The default configurations of this version are supported for this type of LCD There is nothing to be worried about these options Enable Your Design 14 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual GE bmp2h_convy v5 1 Load Generate Select LCD C NOKIA 6100 132x132 DM176220T T5605 176x220 AELT240320TP 240x320 Select Format 2 colors 1 bit for font making
12. hin LOAD C Erase Sectors V Verify Start 0240000000 Size Ox0800 C DonotErase W Reset and Run Programming Algorithm Address Range LPC2000 AF2 STKE Flash On chip Flash oUOk OOQOO000H OO0YCFFFH Stark Size Add Remove OF Cancel Help 5 6 2 UART port To communicate the board with command line interface HyperTerminal can be used Set the COM port as follow Enable Your Design 21 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual COM4 Properties Fort Settings Bits per second lili Data bits 4 Parity Hone Stop bits 1 Flow control Mone Restore Defaults This UART port also served for ISP In system programming which user can use software like Flash Magic to program the MCU To do this place a jumper on J1 and then press reset Now the MCU should starts with ISP boot loader Enable Your Design 22 ThaiEasyElec com ll On Line Electronics Shop for Embedded System Blue Screen Manual Appendix 1 TS_MODE refers to tslcd_elt240320tp h TS_MODE is display mode used in functions start with TSLCD Now there are 3 modes available TS 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 OxXFFFF will considered as background and it will be display as rea
13. n_obj c this is the code running in the background of screen object management From the AppScanPen in app _blue_screen c the screen position and the pen status are send to ScrObjDo This point is called global position because it refers the hold screen In ScrObjDo each object are determined whether the screen position is in its area considering from its origin and its size Then do of targeted object will be processed with local position got from minus of global position and the object s origin 4 app _screen_obj c in this file each objects parameter are defined here including origin horizontal and vertical size do and draw function and etc A part of code from this file is shown below define SOQ_VOLUME O 1 so_obj SO VOLUME hsize 16 2 so_obj SO VOLUME vsize 108 3 so_obj SO_VOLUME horigin 284 4 so_obj SO VOLUME vorigin 20 5 so_ obj SO_VOLUME stat SO_ST_ON 6 so_obj SO_VOLUME val 60 7 so_obj SO_VOLUME draw volume_draw 8 so_obj SO VOLUME do_ volume_do 9 so_obj SO_VOLUME task100ms volume_task100ms 10 so_obj SO_VOLUME is_ white volume_is_white 11 Line 1 is to dedicate that for this screen MP3 player screen The volume bar is the number 1 object Line 2 and 3 define width and height of the object respectively Enable Your Design 13 ThaiEasyElec com Ill On Line Electronics Shop for Emb
14. nterface SD MMC memory card interface 10 bit ADC with 8 channels LPC2377 10 bit DAC Four 32 bit timers with capturecompare Watchdog Timer Pu unit for three phase motor control Real Time Clock with optional batter backup Brown out detect circuit General purpose 0 pins i Ea Ea EA Ea Ea Ea Ea oa Ea r Ea Ma P2707 iiij Lill Enable Your Design 9 ThaiEasyElec com Ill On Line Electronics Shop for Embedded System Blue Screen Manual secondly set the XTAL frequency as 20 MHz This is very important one downloading the firmware via JTAG with wrong setting will cause the board not to be programmable anymore If this situation occurs one way to recover is to program it with Flash Magic Options for Target Target 1 Device Target Output Listing User Cr C Asm Linker Debug Utilities NaF founded by Philips LPC2378 Code Generation stal MHz 20 ABM Maode Operating system None Use Cross Module Optimization Use MicroLlB Big Endian ReadOnly Menon Areas Read Write Memory Areas default off chip Start Size Startup default off chip Start Size Molnit Romi tT Pami RoM2 o RAM2 o Rom fo J RAMS fe on chip on chip pom 0x0 Ox80000 Ram 040000000 048000 IROM2 i IRaM2 Ds7FE00000 04000 Thirdly replace the LPC2300 s file with the one you got from our website And then add all other source files c in the project And also add group efs
15. ue Screen Manual Press here yyisvsse In order to recalibrate the screen there would be 25 points on the screen to be pressed For each point user needs to touch it twice For accuracy please touch it slowly and a stylus should be used When finishing the MP3 Player screen will be shown 5 3 Creating project with Keil The board is supplied with codes Users have to make project yourself This guide is an example for Keil Firstly you have to create a project And select the device as LPC2378 Options for Target Target 1 Device Target Output Listing User CrC Asm Linker Debug Utilities Database 3 Dat Vendor NP founded by Philips Device LPCS378 Toolset ARM LPC 50 ARMY TOMI S based high performance 32 bit RISC Microcontroller LPc22s0e01 with Thumb extensions poles SIZE cr chi Elsa alle outs nErenn Pcaremctaa iE are LPC e0 In Application Programming IAP 58KB RAM CPU clock up to 72 MHz LPC2 294 On chip crystal oscillator On chip 4MHz2 AC oscillator On chip PLL LPC2294 01 l LPC2364 Enhanced Vectored Interrupt Controller Ethernet 107100 MAC with DMA External Memory Controller for static devices such as Flash and SRAM LPC2365 USB 2 0 Full Speed Device Controller CAN 2 08 with two channels LPC2 366 General purpose OMA controller Four UART one with full modem LFC2367 interface Three 2C senal interfaces Three SPISSP serial interfaces LPC2368 25 i
Download Pdf Manuals
Related Search
Related Contents
GRACO Fluid Metering Systems Catalog 209650 - MATRIZ MANUAL FRITADOR INDUSTRIAL Transferir o manual de utilização User Manual - Music Sony XAV-62BT Marketing Specifications NEC MultiSync EA244UHD-BK Benutzerhandbuch - Fa. Ludwig KX-TDE100 & 200 User Manual Jamo IC 102 CellaVision® DM1200 User`s Manual 3.0 Copyright © All rights reserved.
Failed to retrieve file