Home
V850ES Touch it! - Renesas Electronics
Contents
1. 39 9 7 General overview of introduction demo program eeeeseeeeeeeeeeeenne nennen nnne nnne nnne nnns 39 CHAPTER 10 STARTING THE IAR 15 222122 1 1111 41 10 1 LEGI 41 10 2 Compiler and linker settings eeeeeeeeeeee eese eene nennen nnne sesta assa sanas nnns nan 42 10 3 Compiling aA project rer feet cederet 43 CHAPTER 11 SETUP NEW IAR nunne nunne nanne nnmnnn nnna 44 11 1 To create a new IAR project 44 114 1 Addingproject groups e E RC HD OH o ie ERE 44 11 1 2 Adding files to the project 45 CHAPTER 12 USING THE MINICUBE2 OP IONAL nnnnnn nnnm nnmnnn na 46 12 1 Installing the MINICUBE2 software sna tnn nnne nnn 46 12 1 1 Upgrading the MINICUBE2 firmware nennen 46 12 1 2 Installing the 2 MINICUBE2 Flash programming application 46 12 2 Using the MINICUBE2 to programme the Touch It board
2. 47 CHAPTER 13 DEBUGGING THE PROGRAM USING ON CHIP DEBUG WITH THE MINICUBE2 2 49 19 d 49 131 2 REM 50 13 1 3 IRURE IMEEM ENDE 50 CHAPTER 14 COLOUR INDEX 51 14 1 Colour mapping between the LCD connector and board eese 51 CHAPTER 15 EPSON S1D13A05 CONFIGURATION SETTING 222 2 2 53 CHAPTER 16 BILL OF 6 442 1 nn nnns 56 CHAPTER 17 SCHEMATICS du ads cie itii 59 6 User s Manual U18781EE1VOUMOO List of Figures Figure 1 1 Touch IT Demonstration kit without the 0 200 00 10 Figure 4 1 USB connection to the Touch It board sesssssssssssseeeeeeeeeneeenneee ener nnne 16 Figure 4 2 Touch the opening screen enne nnne nnne rnnt nnne 16 Figure 4 3 Introduction nnne nennen senes nennen nennen 17 Figure 4 4 Keyboard and Calibration screens sssssssseseeseeeeeneenneeeeneen nennen enne 17 Figure 4 5 Bitmap control 4
3. 804 0000 nnn ne nen nennen inneren 18 Figure 5 1 Position of switches on Touch It circuit 20 Figure 5 2 TFT LCD Touch panel 22 Figure 6 1 PG FP4 MINICUBE2 00 nnne 24 Figure 7 1 Software installation 26 Figure 7 2 Structure of demo 26 Figure 7 3 Structure of Src sub directory 00000 enne 27 Figure 8 1 Starting the Application Demo nennen nnne nnns 28 Figure 9 1 Organisation of software nennen nenne nnne nnns 30 Figure 9 2 Overview of main sssssssssssseeeeeeeeene nennen 33 Figure 9 3 Touch Screen nennen nennen nnne nnns 38 Figure 9 4 Structure of Segger example containing Maintask 39 Figure 10 1 IAR project overview nee rne nnne 41 Figure 10 2 IAR Projects Option configuration 42 Figure 112 1 MINIGUBE2 tee ea ber 46 Figure 12 2 MINICU
4. nennen nennen nennen nenne 19 Table 8 Connectors on TFT V850ES nennen enne 20 Table 9 Memory model settings nennen nennen nn nter nnne rre nennen 32 Table T0 TAR compiler Settings eet tee vette stented ete bn teo b oett 43 Table 11 Correct pinning from Epson S1D13A05 to TFT LCD 51 Table 12 Actual pinning from Epson S1D13A05 to TFT LCD 52 T ble 13 trt toe a te i reb exeo Pe gy ee ker Lee Fee ERR cbe d nae 56 8 User s Manual U18781EE1VOUMOO CHAPTER 1 INTRODUCTION Thank you for choosing NEC Electronics 850 5 TFT LCD Touch It demonstration kit Whether you are designing a LCD solution for the first time or you are looking for a solution for your next product the Touch It demonstration kit from NEC Electronics can help you see how easy it is to integrate Touch Screen technology into your next design If you are designing your next control panel for a domestic appliance heating controller or portable device touch panel LCD displays are being used increasingly in products as consumers demand more functionality and usability NEC Electronics technology can help you achieve that The V850ES Touch It demonstration kit provides a complete demonstration and reference design of
5. User s Manual V850ES Touch It Demonstration kit for the V850ES JG2 and NL2432HC22 41K 3 5 TFT Colour LCD Module with touch screen panel Document No U18781EE1VOUMOO Date Published June 2007 NEC Electronics Corporation 2007 Printed in Germany 2 User s Manual U18781EE1VOUMOO information this document is current as of 2007 The information is subject to change without notice For actual design in refer to the latest publications of NEC Electronics data sheets or data books etc for the most up to date specifications of NEC Electronics products Not all products and or types are available in every country Please check with an NEC Electronics sales representative for availability and additional information No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document NEC Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others Descriptions of circuits software
6. Power Registers Direct Pixel doubling Color depth Panel SwivelView Horizontal C 1bpp 8bpp Vertical C 2bpp 16 bpp C 4bpp the color depth in bits per pixel Bits Per Pixel BPP REG 10h b4 0 NOTE These settings ensure that initial register values meet timings specifications Some software might change these settings during execution Configuration description Diagnostics Figure 15 2 Epson preference configuration User s Manual U18781EE1VOUMOO 53 CHAPTER 15 EPSON 1013 05 CONFIGURATION SETTING 1D13A05 Configuration Utility Build 17 File Help General Preferences Clocks Panel Power Reaisters Direct CLKI MHz PCLK PWMCLK Timing 20 000 Source Enable Force high Actual 20 000MHz Divide Source Timing 5 000 MHz Divide Timing CLKI2 MHz Timing 50000 BOK Actuat Divide i1 v NOTE Selection of Clock Timing 20 000 Divide will affect the ae allowable choices for MCLK panel frame rates After making changes make Source BCLK sure to go to Panel section for the change to Divide 1 M take effect Timing 20 000 MHz X Diagnostics 1D13A05 Configuration Utility Build 17 Help General Preferences Clocks Panel Panel Power Registers Direct Panel type p Predefined panels T
7. Figure 12 2 MINICUBE2 switch settings To use the MINICUBE2 as a flash programmer ensure the MINCUBE2 is connected to connector J4 on the Touch It board using the 2x8 way cable and to the PC using the USB cable Ensure the MINICUBE2 USB driver is installed before starting the QBP program USB cable Host machine Figure 12 3 MINICUBE2 connections User s Manual U18781EE1VOUMOO 47 CHAPTER 12 USING THE MINICUBE2 OPTIONAL To start the program goto Start gt All Programs gt NEC Electronics Tools gt QBP2 Next install the PRM file for the 70F3718 from the Device gt Setup menu The programmer is ready for use QB Programmer 27509 File Device pakk ET Ir gt QB Programmer startup Programmer gt Command standby 2 20 Parameter File Reading Firmware v4 02 Success Read ParameterFile Reading Load File peon read Load file mem Dese Device Setup Fimware Cancel Device Setup Parameter file gt 70F3718 CSIO prm Version V1 00 Device Setup Load Name GRAPHXYDEMO HEX Standard Advanced Date 2007 04 23121852 Chksum 8084h Area OO0000h 07FFFFh Parameter File 70 3718 CSIO prm File checksum 3 Chksum Target Device Connection Supply Oscillator Connection to device Pot UART ch Pot UART ch Frequ
8. 54 uPD70F3718GC 8EA A 56 U5 uPD70F3718GC 8EA A 512KByte of flash memory SM MPU LOW OD STM1001TWX6F SOT23 U6 3 08V 3 57 IC SM LOGIC m DECODER DEMULTIPLEXER 4HC138 50 016 IC SM TRANSCEIVER RS U8 232 43 0V TO 45 5V SP3232EBCA L SSOP16 59 1D13A05 LCD Controller 60 U9 SIDA 128 pin QFP5 package IC SM LOGIC BUFFER AND 5 U10 U11 U12 U13 LINE DRIVER SN74HC244DW NC38 watch crystal X1 32 768KHz through hole 32 768kHz 62 12 50pF Citizen Crystal through X2 Crystal 5 000000MHZ hole 63 HC49US5 000MABJ UB Citizen Crystal through X3 48MHz hole 64 HC49US48 000MABJ UB 65 NEC TFT display NL2432HC22 41K 3 5 NEC TFT Display 58 User s Manual U18781EE1VOUMOO CHAPTER 17 SCHEMATICS m OPM SOLVES IORI LA Korg SOINOHLOSTS IND 5 19 OHNO OL 0312 3HHCO IU CE 555275590 LV SA UAW Od AX AL QUEE 14 iad 885 NIdIT SSA OMd Ir as EN tT 22 222222 23 gt 8 555855 aaa 3 Ge 1 s P E 3 i 33 E 55 4 TT n BABA nem uns ollid d V tM dA tier ot Gare ASD WE cave cor 1719 as Mund EEREEEERE 5 59 User s Manual U18781EE1VOUMOO
9. C file RTOSInit_V850ES_JG2_no_UART c Before you can start debugging ensure that the MINICUBE2 USB driver is installed and the latest MINICUBE2 firmware is upgraded as decribed in Chapter 12 Connect the MINICUBE2 according to the manual U18371EJ1 pdf file Ensure the IAR debug options are selected for the MINICUBE2 Options for node ColorBar demo Options for node ColorBar demo Memes Facto Selling no Genera Options Generel Options compiler Setup Options Plugins compter Assembler Assembler Custom Buk Driver Custom Buld Bufd Actions MINICUBE x Build Actions Linker Linker Oboe Debugger I xxx 55 0850 man IE xxx SS V850 IECUEE IECUEE 5 macros ee MINICUSE ie N Wire OCD Ure macro fle OCD RON onkor ROMMeritor Simulator Simulator vesi Tk vaso Ier Device description file Iv default DIR f yo ddlio70 3718 ddi Setup Download Suppeess Very Erase entire flash memory Communication log Use communication log file Factory Settings Use MINICUBE2 MINI2 Cancel Figure 13 2 IAR Debug option setup for the MINICUBE2 User s Manual U18781EE1VOUMOO CHAPTER 14 COLOUR INDEX This section describes a circuit board layout error which is corrected by the software routine contained in the Support 141
10. CHAPTER 17 SCHEMATICS 60 2 HIS Tur ERO T rB gt dis ooo Ee r ggr gugggre 60805 10000 9 QU ZI B HII nese resereern goseinua duum RH corvo 222466 oc 1214441 User s Manual U18781EE1VOUMOO r PAWEL X LEFT CHAPTER 17 SCHEMATICS MOLY ELS OO LA mmm in 9 61 User s Manual U18781EE1VOUMOO
11. Sre lntroductionDemo PROJ_DIR Segger inc GUI Core PROJ_DIR Segger inc GUNJPEG 42 User s Manual 018781 1 00 00 CHAPTER 10 STARTING THE IAR TOOLS PROJ DIR X ASeggeninoGUNWidget PROJ_DIR Segger inc GUN WM Defines OS_LIBMODE_DP INIT PLL Swivelview Linker Output Allow C Spy specific extra output file Extra output Generate extra output file Override default if a different hex file name is required Change the filename extension to hex Diagnostics disable range checks List Generate linker listing Config Override default xcl file PROJ_DIR IAR_v3xx xcl DF3718_for_MINICUBE2_v2 XCL Processing Fill unused code memory with OxFF Table 10 IAR compiler settings 10 3 Compiling a project First highlight a project by clicking on the project tab in the Project Window To rebuild the project click on Project gt Make Project gt Clean and then Project gt Rebuild click on the Make icon If any project settings are changed it is advantageous to clean and rebuild the entire project to ensure all object files are compiled with the uptodate settings User s Manual U18781EE1VOUMOO 43 CHAPTER 11 TO SETUP A NEW IAR PROJECT 11 1 To create a new IAR project space 11 1 1 Adding project groups Open the V850 IAR tools with the supplied Touchlt project eww workspace You will see a panel with the tab overview on the bottom Click on the top PROJECT level
12. Colour mapping between the LCD connector and board The mapping for the colour signals for the TFT Colour LCD display can be found in Section 4 5 of the TFT colour LCD specification nl2432hc22 41k DOD MD 0058 1 pdf You can see that the colour signals include pins 13 to 30 in the order of blue green red These signals should correspond to the FPDATn signals from the Epson 51013 05 LCD companion chip Information relating to the signal mapping can be found in the following Epson document Technical Manual s1d13a05tm pdf Hardware Functional Specification Section 4 5 LCD Interface Pin Mapping Refer to the information in column Color TFT Panel Generic TFT gt 18 bit The correct pinning should be as follows FP DATO Red5 DAT1 Red4 FP DAT2 Red3 DATS3 Green5 DATA Green4 DATS5 Green3 FP DAT6 Blue5 DAT7 Blue4 DAT8 Blue3 DAT9 Red2 FP DAT10 Red FP DAT11 RedO DAT12 Green2 FP DAT13 Green1 FP DAT14 Green0 FP DAT15 Blue2 FP DAT16 Blue1 DAT17 BlueO User s Manual U18781EE1VOUMOO LCD pin 30 Red5 LCD pin 29 Red4 LCD pin 28 Red3 LCD pin 24 Green5 LCD pin 23 Green4 LCD pin 22 Green3 LCD pin 18 Blue5 LCD pin 17 Blue4 LCD pin 16 Blue3 LCD pin 27 Red2 LCD pin 26 Red1 LCD pin 25 RedO LCD pin 21 Green2 LCD pin 20 Green1 LCD pin 19 GreenO LCD pin 15 Blue2 LCD pin 14 Blue LCD pin 13 BlueO Table 11
13. OxFFF501F in RAM and to Ox13EF in Flash ROM Use the file D3718 MINICUBE2 v3 xcl in the linker config options if the MINICUBE2 is to be used which reserves the memory spaces above for the MINICUBE2 This file is located the project directory Options for node ColorBar demo Category Factory Settings General Options compiler Output Extra Output define Diagnostics List Config Proce al gt Assembler Linker command file custom Build Override default Debugger IE xxx 55 850 IECUBE Override default program entry MINICUBE c N Wire C ROM Monitor Search paths one per line Simulator 850 binary image Eile Symbol Segment Align ee Il Cancel Figure 13 1 Reconfiguring the linker XCL file User s Manual U18781EE1VOUMOO 49 50 CHAPTER 13 DEBUGGING THE PROGRAM USING DEBUG WITH THE MINICUBE2 OPTIONAL 13 1 2 Disable the UART Also as the MINICUBE2 uses the UARTA RX and TX on port3 0 and port3 1 the application should not use this peripheral during debug using the MINICUBE2 Also any interrupt routines for the RX and TX channels must not be compiled into the code otherwise this will conflict with the 2 The UART is normally used by the Segger embOS for the embOS viewer To disable this feature the define OS UART 13 1 3 Debug is setto 1 in the
14. Project gt Add option You can also keep the previous source file in the group but exclude it from the build by selecting Project gt Options then tick the Exclude from Build tick box Next add the new file you wish to include for the compile Using this method you can use the group to hold all the source files of interest but only keep one enabled for the compilation build Each example from the Segger tutorial demonstrates the different features of emWin enabling you to pick the ones you require The Touch It demonstration kit provides you with the basic elements to develop a small prototype for your evaluation If you need to create a new project follow the steps in Chapter 11 User s Manual U18781EE1VOUMOO 29 9 STRUCTURE OF THE DEMO CODE 9 1 Basic structure of software demo This document is not intended to describe how to use embOS and emWin but will describe how the Touch It Demonstration kit demo code is built on this and what is required to run the code To find out more how embOS and emWin works please go to the Segger Microcontroller Systeme website www segger com or contact Segger directly The diagram below shows the main software components of the Touch It Demonstration ADC Touchscreen Plus other h files from emWin relocated in inc directory Figure 9 1 Organisation of software files User s Manual U18781EE1VOUMOO 30 9 STRUCTURE OF THE DEMO CODE 9 2
15. drive the Epson S1D13A05 LCD companion chip correctly it needs to be informed which LCD driver chip is being used the parameters of the LCD screen and the number of bits for the colour resolution per pixel For further information please refer to Chapter 27 emWinUser pdf define LCD XSIZE 320 X resolution of LCD Logical coor define LCD YSIZE 240 Y resolution of LCD Logical coor define LCD BITSPERPIXEL 16 define LCD CONTROLLER 1304 define LCD SWAP BYTE ORDER 1 define LCD SWAP RB 0 define LCD USE BITBLT 0 amp define LCD FIXEDPALETTE 1 to enable use of User colour conversion function User s Manual U18781EE1VOUMOO 35 9 STRUCTURE OF THE DEMO CODE The next section contains the register values derived from the Epson configuration setup which are used in the initialisation of the device Please refer to Chapter 15 The final part of the file is the LCD INIT CONTROLLER macro called by the GUI init and LCD init functions once the MainTask has started Please refer to Chapter 24 of the emWinUser pdf regarding Additional info for the S1D13A05 9 5 2 Guiconf h This file defines the GUI features to enable for emWin For the Touch It Demonstration kit GUI support with the OS touchscreen window manager and memory device library are enabled 9 5 3 GUITouchConf h This file is required when the emWin library is built and setups up the touchscreen ADC limits inputs for the V85
16. lInitialising the TFT display registers Next the TFT LCD hardware registers are configured by calling a macro function TFT POWER ON COMMAND source found in TFTReg_Setting h The sequence of data and timeouts required when setting up the TFT registers are detailed in the NECEL TFT LCD user manual 9 4 3 Initialising the Epson S1D13A05 LCD companion chip The LCD companion chip is initialised when LCD is called by the function GUI Init in emWin library The function GUI Init in turn is called a the beginning of the first task to use the LCD in this case MainTask 9 4 3 1 LCDLIN c This file is provides the specific drivers to the Epson LCD companion chip If a different LCD driver is to be considered in your project this file will need to be updated before the emWin libraries is able to output to the TFT colour LCD display The Segger emWin product is able to support other different LCD drivers but these are not included in the Touch It Demonstration kit Please contact Segger for further information 9 5 OS Init In addition to calling the OS Initkern function OS init is also called near the start of main to perform the low level initialisation for the clocks and serial comms ports used by the kernel and OS debug functions Please refer to the Chapter 17 in the Segger embOS Generic pdf for further information 9 5 1 Setting up the LCD touch screen header files 9 5 1 1 LCDconf h In order for the emWin to
17. segger com emwin html User s Manual U18781EE1VOUMOO 31 9 STRUCTURE OF THE DEMO CODE This demonstration kit includes a number of software demos which shows you the potential possibilities you can use to develop your product into The demo software is designed as individual tasks which runs on embOS and calls the various library functions provided by the emWin graphics ibrary Both Segger embOS realtime OS and emWin graphics library are provided as compiled trial libraries using the following memory models Short Addressing On Data Model Tiny Code Model Normal Table 9 Memory model settings Both embOS and emWin libraries are incorporated into the IAR project just like a C or assembler source file in the project pane but make sure that the same memory models are used if you decide to compile the entire demo code In the Touch It Demonstration kit embOS is used to manage 3 tasks Tasks created using embOS are e the main demo application task MainTask created in main Touch Screen task TouchTask created in TouchScreen Init which is called by main e User task for user evaluation purposes Each tasks are is setup with a different priority level using the OS Create API A higher number in the priority field indicates a higher priority rating for the task To use the embOS and emWin features the application demo code calls the various API functions For further details on the operati
18. src o Sampleprograms Project Src Common Main c o Sampleprograms Project Src Common Touchit_ColorConversion c o Sampleprograms Project Src Common UserTask c o Sampleprograms Project Src Common ADC_Touchscreen c Src o Add C file from the Segger Sample Tutorial directory o For example Sampleprograms Project Segger Sample Sample Tutorial 2DGL_DrawPolygon c These examples contain the MainTask function Next click on the new project so that it is in context Then open the menu Project gt Options and set up the configuration according to the Chapter 10 Click OK when this is done User s Manual U18781EE1VOUMOO 45 CHAPTER 12 USING THE MINICUBE2 OPTIONAL Min Ic Figure 12 1 MINICUBE2 121 Installing the MINICUBE2 software 12 1 1 Upgrading the MINICUBE2 firmware Before the MINICUBE2 can be used with the V850 CPU the internal firmware needs to be upgraded if it is before version 4 04 This can be checked on the MINICUBE2 package label Download and install the latest MINICUBE2 firmware MINICUBE2 utilities and the MQB2ALL USB drivers from the locations highlighted in table Table 6 The MINICUBE2 diagnostics user s manual ZUD CD 06 0044 4 E pdf and MINICUBE2 On chip debug checker user s manual ZUD CD 06 0044 4 E pdf is also included in the installation When you connect the 2 to your PC for the first time via USB you will be prompted to install a USB driver which can be found in the directory C Program
19. the Application Demo User s Manual U18781EE1VOUMOO 28 CHAPTER 8 RUN THE SUPPLEMENTARY DEMOS 8 3 Segger examples A sample of Segger examples for emWin also included in the software installation which can also be compiled and run on the Touch It demonstration kit Please note that not all Segger examples will run if they require other components such as Antialiasing etc which are not included in this kit Please contact Segger Microsysteme if you have these requirements for these additional options The additional project directories provided are GraphXY demo demonstrates a windows based graphical interface Touch sample demo shows the values of the touch screen relative to the display ColorBar demo shows the colour capabilities of the display MemDev demo uses special emWin library with Memory Devices option The project workspace is already configured with a hex file to program into the demonstration kit If you wish to recompile the project from the IAR IDE click on the Make icon or select the menu option Project gt Make or Project gt Build All To try out other examples you can use the User_template project which has been created to enable you to easily choose a Segger examples which are included in the directory Touchit_sampleprograms Project Segger Sample Tutorial To add an example file click and highlight the Src group in the User_template project Then add the required file using the
20. the NEC Electronics V850ES JG2 32 bit microcontroller and the NL2432HC22 41K 3 5 TFT Colour LCD Module which includes a touchscreen interface It also includes demostrations using trial versions of the embOS Real Time Operating System RTOS and emWin embedded graphics technology from Segger Microcontroller Systeme which provides an ideal platform to start your software evaluation and prototype The V850ES Touch It Demonstration kit will enable you to e the pre loaded introductory demo e compile additional Segger emWin examples based on your own application The optional MINICUBE2 Flash programmer on chip debug device is required to e program prebuilt demonstration programs to the Touch It board e program additional Segger emWin examples compiled with the EWV850 KS16 IAR tools e allows you to make small adaptations to the demonstrations recompile and execute The pre loaded introductory demo program can be used right out of the box on the V850ES Touch It demonstration kit when a 5 volt supply is applied to the board via the USB cable For information regarding the understanding and use of the embOS and emWin please refer to the Segger documentation Please be aware the trial versions of the Segger products are only for evaluation For development and production purposes the use of embOS and emWin products require licensing from Segger Microcontroller Systeme GmbH For pricing and licensing details please contact
21. 0ES to use e g define GUI TOUCH AD TOP 330 define GUI TOUCH AD BOTTOM 890 define GUI TOUCH AD LEFT 110 define GUI TOUCH AD RIGHT 760 please note the values above may differ from the actual numbers required for the hardware This file also includes flags to determine if the X and Y axis need to be swapped or mirrored The Touch It Demonstration kit is configured so that the top edge is the TFT side with the FPC flexible connector strip 9 6 Creating tasks The Segger trial version of embOS is provided and is limited to a maximum of 3 tasks The Touch It demonstration kit utilises 3 tasks which are described below At least 1 task must be created before OS Start is called start running embOS Tasks are created using the embOS 05 CREATETASK Please refer to the embOS Generic pdf user manual for further details 36 User s Manual U18781EE1VOUMOO 9 STRUCTURE OF THE DEMO CODE 9 6 1 MainTask This task is created in main MainTask forms the framework for the Touch It Demos which are described in the next section 9 7 When you wish to examine other examples in the Segger sample routines these files also contains a MainTask function As a result you can substitute these functions into the demos for further evaluation 9 6 2 User task An empty user task is created in main and set at a lower priority than MainTask and is executed every 10mS This user task
22. ARE INSTALLATION Src Common Source files required for every project CPU V850ES JG2 files relating to V850 hardware Starter kit source files These are the source files for the intro and application demos The prebuilt hexfiles are located in the prebuilt hex file directory Bitmaps are precompiled into libraries and the source files are provided for reference only The bitmap source files are created using the BmpCvt conversion tool which is licensed from Segger The BmpCvt is not included in the Touch It Starter kit Please contact Segger for further information Figure 7 3 Structure of Src sub directory User s Manual U18781EE1VOUMOO 27 8 TO RUN THE SUPPLEMENTARY DEMOS 8 1 Supplementary demos Additional pre built demos are provided with the Touch It software installation under the Prebuilt_hexfile directory To program these into the flash memory of the V850ES JG2 you will need to obtain the MINICUBE2 Flash programmer Please refer to Chapter 12 and associated documentation for additional information The supplementary demos consist of 1 application demo and the Segger emWin examples 82 Application demo A washing machine application demo is provided on the software installation under the project directory Washingmachine debug exe To view the code start the IAR EWV850 KS16 tools and open the Touch It project workspace and then select the TouchltDemo2 project Figure 8 1 Starting
23. BE2 switch settings nennen nennen nnne nnne 47 Figure 12 3 MINICUBE2 connections 47 Figure 12 4 QB Programming application and device setup 48 Figure 18 1 Reconfiguring the linker XCL 1 nennen 49 Figure 13 2 IAR Debug option setup for the MINICUBE2 ssssseseeeeeeeeneeeeneennenen 50 Figure 15 1 Epson general configuration eene 53 Figure 15 2 Epson preference configuration nennen 53 Figure 15 3 Epson clock configuration nennen nnne 54 Figure 15 4 Epson panel configuration 11 54 Figure 15 5 Epson panel power configuration eseeeeeeeeennenn nennen nnn 55 User s Manual U18781EE1VOUMOO 7 List of Tables Table 1 V850ES manuale ciai aE tx 13 Table 2 TFT colour UCD Module eid retro eo ee en Ga n a 13 Table Segger embOS and emWin 13 Table 4 Epson S1D13A05 documents sse enne enne nennen nnne nennen enn 14 T ble 5 Touch It Schematics fis nter ere catia ed 14 Table 6 MINICUBE2 Flash programmer and on chip debug not included 15 Table 7 Switches on the Touch It Board
24. BE2 utilities to install MINICUBEUtilities_Vx xx zip Installation for MINICUBE2 programs to check on chip debug and diagnostic tool to for MINICUBE2 self check and firmware upgrade MQB2ALL_Vxxx zip USB driver for QB2 programming application QBP_Vxxx zip QB2 Flash programmer installation PRM 70F3724 Vxxx zip PRM file for QB2 device setup U18527EJ1VOUMOO pdf QB Programmer programming GUI operation U17966EEAVOIFOO PDF MINICUBE2 setup manual U18371EJ1V0UMOO pdf QB MINI2 on chip debug emulator with programming function ZUD CD 06 0044 4 E pdf ZUD CD 06 0044 4 E pdf MINICUBE2 diagnostics user s manual MINICUBE2 On chip debug checker user s manual User s Manual U18781EE1VOUMOO 15 4 QUICK START GUIDE 4 1 Using the pre loaded Introductory Demo The Touch It Demonstration kit is preloaded with an introduction software demo that only requires the kit to be connected to 5v using the DC power cable or via the USB connector see Table 8 Connectors on TFT V850ES board for the correct jumper connections Some of the screens are adapted from Segger s emWin demonstration programs Figure 4 1 USB connection to the Touch It board The demo sequence is as follow 4 1 1 Touch It welcome screens This welcome page first displays the Touch It handprint Tap the handprint and then on the Next button shown on the next screen to continue Figure 4 2 Touch
25. CD SWAP BYTE ORDER 1 The user functions can be found in the routine Support 070402 ColorConversion c 52 User s Manual U18781EE1VOUMOO CHAPTER 15 EPSON S1D13A05 CONFIGURATION SETTING This chapter contains 5 screenshots showing the settings used for the Epson S1D134A05 initialisation The tool is obtained from Epson and creates the correct values to use in the initialisation of the device The output values were saved and transferred to the LCD INIT CONTROLLER macro in LCDconf h The configuration tool is described in more detail in the Epson document Epson Document number X40A Q 001 1 Filename Technical Manual s1d13a05tm pdf 1D13A05 Configuration Utility Build 17 File General Preferences Clocks Panel Power Registers Direct Memory mapped locations Decode addresses Epson 551134058008 800 Motorola 10268000 C User Defined Motorola IDP68030 Motorola DragonBall Motorola DSP56654 RedCap C Hitachi SH 3 LCEVB Register address hex Display buffer address hex NOTE The decoding of the 13405 physical addresses depends on your particular hardware implementation The selection of Platform Types above reflect only one of many possible implementations for each platform Additional features Enable USB support Diagnostics Figure 15 1 Epson general configuration 1D13A05 Configuration Utility Build 17 File General Preferences Clocks Panel
26. Correct pinning from Epson S1D13A05 to TFT LCD connector 51 CHAPTER 14 COLOUR INDEX However the board is pinned as follows where Red and Green are inverted FP DATO Red5 FP DAT1 Red4 FP DAT2 Red3 FP DATS3 Green5 DATA Green4 DAT5 Green3 FP DAT6 Blue5 FP DAT Blue4 DAT8 Blue3 DAT9 Red2 FP DAT10 Red FP DAT11 RedO DAT12 Green2 FP DAT13 Green1 DAT14 GreenO FP DAT15 Blue2 FP DAT16 Blue1 FP DAT17 BlueO LCD pin 24 Green5 LCD pin 29 Green4 LCD pin 28 Green3 LCD pin 24 Red5 LCD pin 23 Red4 LCD pin 22 Red3 LCD pin 18 Blue5 LCD pin 17 Blue4 LCD pin 16 Blue3 LCD pin 27 Green2 LCD pin 26 Green1 LCD pin 25 GreenO LCD pin 21 Red2 LCD pin 20 Red1 LCD pin 19 RedO LCD pin 15 Blue2 LCD pin 14 Blue1 LCD pin 13 BlueO Table 12 Actual pinning from Epson S1D13A05 to TFT LCD connector The Segger libraries provide the low level drivers to handle normal pinout as in Table 11 but when non standard connections are used alternative functions need to be used to handle the remapping of colour signals when writing the data to the Epson device To achieve this alternative functions LCD Color2Index User and LCD COLOR LCD Index2Color User which reinvert the red and green colour signals To enable the Segger libraries to use the custom functions the 2 defines in LCDconf h need to be set define LCD FIXEDPALETTE 1 and define L
27. FT Custom panel zu Feature Panel Data Width Color Mono Panel Horizontal Display Period Vertical Display Period Horizontal Total Vertical Total Horizontal Display Period Start Position Vertical Display Period Start Position FPLINE Pulse Start Position FPLINE Pulse Width Active Low FPLINE Pulse Polarity Timings FPFRAME Pulse Start Position H FPFRAME Pulse Width Frame rats 8 Hz Active Low FPFRAME Pulse Polarity PCLK X Pol Active High Diagnostics Figure 15 4 Epson panel configuration User s Manual U18781EE1VOUMOO CHAPTER 15 EPSON 1013 05 CONFIGURATION SETTING 1D13A05 Configuration Utility Build 17 File Help General Preferences Clocks Panel Panel Power Registers Direct LCD power control 2 3 Time delay between LCD control signals active and LCD z bias power on 50 milliseconds Time delay between LCD bias power off and LCD control E signals inactive 1200 milliseconds Diagnostics Figure 15 5 Epson panel power configuration User s Manual U18781EE1VOUMOO 55 CHAPTER 16 BILL OF MATERIALS This section lists the components used on the Touch It Circuit board Table 13 Bill of Materials Quantity No Reference Part Part Type Board Type A Tantalum 1 4 C1 C8 C10 C11 4 7u TAJA475K010R C2 0 68u 0805 Ceramic 25V 2 1 mi
28. Files NEC Electronics Tools mqb2all Next run the MINICUBE2 diagonostic checker from the Start gt All Porgrams gt NEC Electronics Tools gt 2 Utilities menu Click on the Firmware tab and browse to the MINICUBE2 Firmware Vxxx hex file Click on the Start button to commence the firmware update Refer to U18371EJ1VOUMOO pdf and ZUD CD 06 0044 4 E pdf for further details on MINICUBE2 firmware update 12 1 2 Installing the QB2 MINICUBE2 Flash programming application Please refer to U18527EJ1VOUMOO PDF QB Programmer Programming GUI operation Manual To obtain the installation files for the MINICUBE2 QB Programmer and device PRM files goto http www eu necel com update and select QB Programmer Programmer GUI for MINICUBE2 User s Manual U18781EE1VOUMOO 46 CHAPTER 12 USING THE MINICUBE2 OPTIONAL This is also highlighted in Table 6 Additional documentation can be obtained from the tools download website Before connecting the MINICUBE2 ensure the 2 switches are set to 3 power provided by the MINICUBE2 and M2 Extract and install the QBP installation program and PRM files from the zipfile 12 2 Using the MINICUBE2 to programme the Touch It board optional The MINICUBE2 can be used as a flash programmer as well as an On chip debug OCD device Before connecting the MINICUBE2 ensure the first switch is set to M2 Then set the 2 switch to 3 to supply the programming voltage to the V850
29. HARWIN M52 25 1 04000082045 USB mini B SMT J8 5 pin mini B Connector Connector rectangular 26 1 through hole horizontall FH23 45S 0 3SHW 05 27 1 J9 Prose PEES Lead type FPC 28 2 1214 INDUCTOR FERRITE SM Fair Rite 2512066017Y1 29 1 L1 INDUCTOR 1210 10UH EPCOS B82422T1103K Murata 30 L3 USB Common Mode Choke DLW21HN900SQ2 31 1 R1 500R MC 0 1W 0805 1 510R 32 1 R2 5R MC 0 1W 0805 1 4R7 33 3 R3 R4 R31 47K MC 0 1W 0805 1 47K 34 4 R5 R6 R7 R9 4K7 MC 0 1W 0805 1 4K7 35 3 R8 R16 R17 10K MC 0 1W 0805 1 10K 36 8 R10 R11 R12 R13 R14 R15 1K 0 1W 0805 1 1K 37 1 R18 150K 0 1W 0805 1 150K 38 1 R19 100R MC 0 1W 0805 1 100R 39 1 R29 150R MC 0 1W 0805 1 150R 40 4 R20 R21 R27 R28 20R 0 1W 0805 1 20R 41 2 R22 R23 301K MC 0 1W 0805 196 300K 42 1 R24 1K5 MC 0 1W 0805 1 1K5 43 1 R25 1M MC 0 1W 0805 196 1M 44 1 R26 470R MC 0 1W 0805 196 470R 45 1 R30 100K Lin TS53YL 100K 46 1 R32 68K MC 0 1W 0805 1 68K Std SMD tactile switch 47 3 SW1 SW3 SW4 SW PUSHBUTTON B3S 1000 swe e RM SMD MCHDS 08 T 48 1 IC SMLED DRIVER ZETEXTSOT23 5 pin ADJUSTABLE 49 1 package User s Manual U18781EE1VOUMOO 57 CHAPTER 16 BILL OF MATERIALS U2 IC SM REGULATOR 500MA LP38693MP 3 3 0 5A SOT223 NON 50 EBS STANDARD PACKAGE LP29821M5 3 0 50mA 5 U3 SP Lead Small Outline 52 5 04 IG SM EDO REGUA2BSV
30. P YD Figure 9 3 Touch Screen circuit To read the X axis value of the touchscreen on the V850ES ADC input ANIO the cpu port lines connected to the X axis P XL and P XR are place in high impendence input mode and a voltage is applied to the resistive array on the Y axis by setting the cpu port lines connected to P YU high in output mode and setting P YD low in output mode To read the value of the Y axis the inverse operation is used These are handled by the functions in ADC_TouchScreen c via emWin library call GUI_Touch_Exec Port XL Port XR Port YD Port YU To read X axis ANIO Set port to input Set port to input Set port to low ouput Set port to high output To read Y axis ANI1 Set port to high output Set port to low output Set port to input Set port to input 38 User s Manual U18781EE1VOUMOO 9 STRUCTURE OF THE DEMO CODE Once the touchscreen has been initialised the emWin touchscreen API calls can be used to detect where the touchscreen is pressed or a button drawn on the display has been clicked e g GUI Getket or GUI TOUCH Getstate The LCD backlight dimming is also handled in the Touch Screen task which reads the 2 user switches SW3 and SWA to change the brightness of the TFT backlight The PWM duty cycle is changed by writing a new value to the V850ES register TP1CCR1 9 6 4 Touchscreen Calibration Although default values for the touchscre
31. Segger Microcontroller Systeme directly to discuss this WwwW Segger com SEGGER Microcontroller Systeme GmbH Heinrich Hertz Str 5 40721 Hilden Germany Phone 49 0 2103 2878 0 Fax 49 0 2103 2878 28 email info segger com The purpose of this demonstration kit is to help you quickly understand what components are required and how they can be used when you incorporate a TFT colour LCD display into your next design If you wish to flash program additional pre built programs into the demonstration kit you will need to use the MINICUBE2 Flash programmer On chip debug device not included with the Touch It Demonstration kit which is available from NEC Electronics User s Manual U18781EE1VOUMOO 9 CHAPTER 1 INTRODUCTION Please refer to the MINICUBE2 installation guides and user s manual listed in Chapter 3 for more information EWV850 KS16 Kick Start version of the V850 IAR Embedded Workbench tools allows you to compile upto 16Kbytes of application code The project environment is setup to produce a hex file for flash ROM programming The 2 can also be used for on chip debug OCD with the Touch It Demonstration kit Just ensure the correct xcl linker file is used to reserve 2Kbytes of flash and 16 bytes of RAM and disable any UART resources or interrupts for the ROM monitor Figure 1 1 Touch IT Demonstration kit without the enclosure The kit contains all the necessary hardware a
32. Segger embOS and emWin The TFT Colour LCD demonstration kit software utilises trial library versions of embOS the efficient Real Time Operating System RTOS and emWin graphics library from Segger Microcontroller Systeme GmbH These libraries are built to enable applications to be compiled using the special KS16 version of the IAR tools Please note that the regular library files in the trial download will not compile with the KS16 IAR tools and require the full version of the IAR tools which require additional licensing The emWin library included in the Touch It Demonstration kit also contains trial optionals of Memory Devices Window Manager and Widgets If you need to evaluate the Segger products more closely please contact Segger Microntroller Systeme directly or visit their website to obtain further information Segger Microscontroller Systeme GmbH contact details can be found at http www segger com about html For development and production the use of embOS and emWin products from Segger Microcontroller Systeme GmbH require licensing For pricing and licensing details please contact Segger Microcontroller Systeme directly to discuss this The trial version of embOS v3 32m is used in this demonstration kit embOS is included as a trial library and limited to 3 tasks and used as a compiled library specific to the V850ES cpu and IAR compilers The embOS library memory model used is shown in Table 9 below This trial version
33. ailable to the Epson S1D13A05 device but is not used on the Touch The S1D13A05 supports a SwivelView mode which allows the display to be rotated 07 907 180 and 270 on the screen Normally the top edge of the TFT colour LCD display is when the flexible connector is orientated on the lefthand side of the display The demonstration kit uses the Epson LCD driver in SwivelView so that the display is rotated 90 making the edge with the flexible connector the top edge refer to LCDConf h The S1D13A05 device drives the LCD display in 16bits per pixel bpp mode so approximately 65000 different colours are achievable The initialisation functions and parameters are handled by the emWin library functions from Segger Microcontroller Systeme Please refer to the software section and Segger documentation for further details For further information please refer to the Epson documents listed above or visit www erd epson com 5 6 Colour LCD display The NL2432HC22 41K TFT colour LCD display module is a 240 h x 320 v 3 5 amorphous silicon a Si TFT active matrix LCD panel with touch panel and a back light The normal aspect of the screen is in portrait mode with the flexible connector ribbon on the left side of the panel The LCD display utilises NEC LCD Technologies Super Reflective NLT technology to illuminate the display Although the display is capable of over 250 000 colours 6 bits per colour approx 65000 colo
34. and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features NEC Electronics products are classified into the following three quality grades Standard Special and Specific The Specific quality grade applies only to NEC Electronics products developed based on a customer designated quality assurance program for a specific application The recommended applications of an NEC Electronics product depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it in a particular application Standard Comp
35. ask MainTask contains a while 1 loop which calls the main body of the demo This file resides in the IAR project group Src Each demo routine will call an OS Delay or an OS touchscreen key waiting routine When these OS functions are called the active task is suspended for the duration of the delay or until a touch screen click has been detected and control is returned to the OS During these delays embOS determines if another task which is ready to run In this case this will either be the User Task or _TouchTask User Task runs until it calls OS Delay and suspends and returns control back to the embOS kernel If all tasks are now waiting for their OS Delay to expire and not ready to run the kernel calls OS Idle until OS Delay expires for one of the tasks which then becomes ready run For further information on how embOS operates please refer to Chapters 2 3 and 4 in the embOS Generic pdf users manual 9 4 1 Initialising the V850 The V850ES is normally initialised in the startup code sequence as described above before any OS code has been run This is achieved by the cstart low level init function in the file Lowinit V850ES JG2 13A05 c Timer P1 is setup to be PWM output to control the TFT backlight and initially set to a frequency of 2KHz and 100 duty cycle The dimming control is handled in the TouchScreen task 34 User s Manual U18781EE1VOUMOO 9 STRUCTURE OF THE DEMO CODE 9 4 2
36. bination of graphics check boxes and buttons MemDev demo demo showing the emWin memory devices option in action to display a fast dynamic graphical display ColorBar demo shows the TFT LCD colour palette User s Manual U18781EE1VOUMOO 11 2 KIT CONTENTS emWin simulation o GUISimulation executable to show emWin running on a PC platform o Also includes sample code which can be compiled with Visual v6 0 or later USB cable User s Manual U18781EE1VOUMOO 3 RELEVANT DOCUMENTATION Table 1 850 5 manuals U17715EJ1VOUDOO pdf User Manual for uPD70F3718 cpu U17966EEAVOIFOO PDF MINICUBE2 Setup manual for Flash Programming U18527EJ1VOUMOO PDF QB Programmer User Guide http www eu necel com update Development tools software downloads and updates Table 2 TFT colour LCD module nl2432hc22 41k_DOD MD 0058_1 pdf Preliminary Specification for TFT Colour LCD Module More information available from http www eu necel com products display index html http www nec Icd com en technology nlt_sr_nit html http www eu necel com _pdf EPMC PU 0018 2 0 PDF Table 3 Segger embOS and emWin documents embOS Generic pdf embOS User and reference manual by Segger Microntroller Systeme embOS V850 IAR pdf embOS CPU amp compiler specifics for V850 amp IAR tools by Segger Microntroller Systeme emWinUser pdf emWin Graphic Library w
37. e 4 2 t 4 2 4 2 1 1 1 1 aM 1 2 P 4 4 3 1 1 1 Figure 5 1 Position of switches on Touch It circuit board T 5 4 Connectors Reset Unused ADC input select LCD backlight Connector Function Comments J1 5v select Close pins 2 3 for USB power Close pins 1 2 for power from Conn Socket J2 J2 Connector for 5V power Close pins 1 2 on J1 to use this J3 Test pins to CPU pins 1 to 50 44 MINICUBE2 and PG FP4 To program the cpu flash memory connector J5 Test pins to CPU pins 51 to 100 J6 Conn Socket 4 Pint RS232 Rx 2 RS232 Tx J7 Conn Socket 20 x 2 LCD signals from CPU J8 Conn PCB 4 USB connector can provide 5v supply to stater kit if J1 pins 243 closed J9 Hirose FP23 45 way TFT connector for LCD ribbon connection 20 Table 8 Connectors on TFT V850ES board User s Manual U18781EE1VOUMOO CHAPTER5 HARDWARE SETUP 5 5 Epson S1D13A05 LCD USB companion chip The S1D13A05 is a LCD graphics controller that provides the interface between the TFT colour LCD display and the V850ES microcontroller The 51513 05 provides a 2 D Hardware Acceleration Engine to improve the drawing functions and includes a SRAM display buffer of 256Kbytes The S1D13A05 also incorporates a USB controller but this is not discussed in this manual The 20Mhz CLKOUT signal from the V850ES is supplied to the S1D130A5 48Mhz clock is av
38. efer to the TFT LCD datasheet listed in Chapter 3 Caution The Touch screen display flex ribbon connector is fragile Take care not to bend or crease the flex ribbon to avoid damage Section 9 6 3 briefly describes how the touchscreen is setup to read each respective touchscreen axis Figure 5 2 TFT LCD Touch panel display 22 User s Manual U18781EE1VOUMOO 6 5 6 1 TFT connector J9 The TFT colour LCD is connected to the board via the 45 way ribbon cable connector by Hirose FH23 45S 0 3SHW For correct operation of the connector please refer to the Hirose datasheet or visit the Hirose website http www hirose com to access the datasheet e58613007 pdf The ribbon cable is fragile so please take care when handling the board and ensure that the ribbon is not creased or damaged Details of the pin connections can be found in the NEC Electronics TFT colour LCD manual 6 2 power connector J2 A 5 volt source can be connected via J2 Before connecting power to the board please refer to Chapter 4 for the correct jumper settings for J1 6 3 USB connector J8 The USB connector is to provide an alternative 5 volt power source to the Touch It Demonstration kit Before connecting the USB cable ensure the jumper settings are correct for J1 in Chapter 4 The USB functionality can be provided by the Epson S1D13A05 LCD companion chip but the USB driver is not available at present therefore th
39. en are defined in GUI Touchcont h i e the minimum and maximum ADC values for the X and Y axis there will slight variations due to tolerancing from one touchscreen to another As a result at some point in time there will be a need to run a calibration program The Segger emWin library provides such a function and this is included in the demonstration software An example calibration demo is included in the default demo program 9 7 General overview of introduction demo program Once the hardware OS and touchscreen have all been initialised in main the demo calls MainTask in maintask c Firstly the emWin GUI Init function is called to initialise the LCD and emWin data display structures before calling the main body of GUIDEMO main in the while 1 loop GUI Init GUIDEMO main Figure 9 4 Structure of Segger example containing Maintask Each individual demo as seem in Chapter 4 is called in the for loop of GUIDEMO main from the array Touchlt apfTest User s Manual U18781EE1VOUMOO 39 9 STRUCTURE OF THE DEMO CODE The demo functions called are Touchlt intro NECEE intro Touchlt Slide1 Touchlt Slide2 Display blockdiagram Display SeggerlAR logo Touchlt Slide3 Touchlt Slide4 Keyboard Calibration Display Application Bitmaps These demos show how text and values can be written to the display and how bitmap graphics can be shown and also used as bitmapped buttons for use b
40. ency 5 00 MHz 0 Speed 31250bps Speed 31250bps Multiply rate 4 00 Range Chip Freq 5 00MHz Multiply 4 00 peration Mode Eu Chip Start Zi Block End DK Cancel Figure 12 4 QB Programming application and device setup To program a hex file to the Touch It demonstration kit Firstly select File gt Load and browse to the required hex file from the following directories built hexfile Project Demo Debug Exe_ if you have recompiled a project Next select the Autoprocedure EPV Erase Program and Verify option to start reprogramming process Please refer to U18527EJ1VOUMO0 pdf QB Programmer programming GUI operation manual for further details 48 User s Manual 018781 1 00 00 CHAPTER 13 DEBUGGING THE PROGRAM USING DEBUG WITH THE MINICUBE2 OPTIONAL If you have purchased a MINICUBE2 and wish to debug your code running on the Touch It kit with the V850 IAR kickstart tools you will need to use the MINICUBE2 using the On chip debug facility You will need to ensure the correct linker XCL file is used and UART is disabled in the code as described below before recompiling 13 1 1 XCL Setup The IAR linker uses an xcl file to define the memory segmentation for the application When the MINICUBE2 is used for on chip debug it utilises 16 bytes of RAM and 2Kbytes of Flash ROM for ROM monitor purposes For example reserve the area between OxFFF5000 to
41. hapter OS _InitKern OS nitHW TFT POWER ON OS Create TaskTouch OS Create TouchScreen init OS Start Figure 9 2 Overview of main User s Manual U18781EE1VOUMOO 33 9 STRUCTURE OF THE DEMO CODE 9 4 Main The functions contained in main perform the following Disable the interrupt prior to hw and OS initialisation The OS initialisation is performed by a function called OS INIT in the RTOSInit V850ES JG2 c file RTOSInit V850ES JG2 no uart c is used in the examples so that you may also the the optional MINICUBE2 device Create the MainTask task and User task User task is set to a lower priority than MainTask Next the touchscreen initialisation routine TouchScreen_lInit in ADC_Touchscreen c is called which initialises the ADC inputs used for the touchscreen and also creates the touchscreen task which is set to a high priority level than MainTask Finally OS Start is called to enable the embOS kernel to control the application and determine the first task to run For the purpose of the Touch It Demonstration kit the first task to run will be the TouchScreen task i e TouchTask as this has the highest priority Once _TouchTask calls the OS Delay function TouchTask is suspended for the duration of the delay and control is returned to the embOS kernel The kernel assesses which task has the next highest priority in this case MainT
42. is function is not enabled for the Touch It Demonstration kit User s Manual U18781EE1VOUMOO 23 6 CONNECTORS 6 4 Flash Programming connector 44 The 2 x 8 way connector J4 is available to connect flash programming equipment to the Touch It Demonstration kit 2 types of flash programming devices can be used MINICUBE2 not included with Touch It Demonstration kit PG FP4 Universal Flash programmer not included with Touch It Demonstration kit Figure 6 1 PG FP4 and MINICUBE2 programmers The programming voltage for the V850ES Flash is supplied by the PG FP4 or by the MINUCBE2 when SW2 is switched to 3 so it is not necessary to apply power via the USB connector J2 24 User s Manual U18781EE1VOUMOO CHAPTER 7 SOFTWARE INSTALLATION 7 1 Touch It Demonstration kit software installation The pre loaded introductory demonstration kit demo will run on the Touch It Demo board when 5 volts is applied via the mini USB connector To examine edit additional software demos or recompile and run the standalone Segger example files the demonstration kit software includes the EWV850 KS16 Kick Start version of the IAR V850 software development tools limited to 16Kbytes application code 7 2 Hardware requirements A PC supporting Windows 98 or later is required for the IAR Systems workbench Pentium 166MHz at least 64 of RAM 256 colour display 1024 768 mouse CD ROM dr
43. is provided for evaluation purposes 9 6 3 Touch Screen task The emWin graphics library supports various means of user inputs via keyboard joysticks and pointing devices For the purpose of this demonstration kit only the touch screen functions will be considered emWin provides full support for the touchscreen function from reading the touchscreen inputs calculating the position on the LCD screen to the routines and functions to position a cursor or determine that a button or icon has been pressed or clicked As all other functions the touchscreen also has to be initialised The default values representing the minimum and maximum ADC readings need to be defined the GUITouchconf h include file These values are used by the emWin library function GUI Touch Driveranalog note this source file is not available in this demonstration kit Please contact Segger Microsysteme for further details initialise the touchscreen the function main calls the function TouchScreen Init in ADC Touchscreen c Touchscreen Init creates TouchTask which is setup to be activated every 10mS TouchTask enables the emWin GUI Touch Exec to be called to service the touch screen functions The basic circuit for the touchpanel is shown below User s Manual U18781EE1VOUMOO 37 9 STRUCTURE OF THE DEMO CODE Circuits of touch panel P P ANIO TouchScreen any TouchScreen XL resistor YU resistor XR YD P XR
44. isplay and a number of leds switches and connectors and the NL2432HC22 41K TFT colour LCD display module by NEC Electronics 5 1 V850ES JG2 The V850ES JG2 is NEC Electronics high performance 32 bit CPU suited for low power applications The V850ES JG2 features the V850ES 32 bit RISC core 512Kbytes flash memory and 40Kbytes internal RAM The V850ES JG2 supports upto 84 input output ports which also serve as alternative functions to the large feature list of peripherals such as timers ADC s DAC s serial comms interrupts The external bus feature is used to interface to the Epson LCD companion chip which drives the TFT LCD display V850ES JG2 is driven by an external 5MHz clock which is PLL ed up to 20MHz A 32 768kHz crystal is also connected to the sub clock inputs to the V850 For more information please refer to document listed at the end of Chapter 3 5 2 LEDs The red led shows that power is applied to the board A yellow and green led are connected to CPU port pin P97 and P98 respectively and can be used as status lights by the demo software 5 3 Switches The following switches are available on the board Switch Function SW1 CPU Reset SW2 8way DIP used to ground ADC inputs to 1 if unused SW3 Input to V850ES 4 Input to 850 5 1 Table 7 Switches on the Touch It Board User s Manual U18781EE1VOUMOO 19 CHAPTER5 HARDWARE SETUP
45. ith Graphic Interface manual by Segger Microntroller Systeme More information available from Segger WWW Segger com website User s Manual U18781EE1VOUMOO 13 RELEVANT DOCUMENTATION Table 4 Epson S1D13A05 documents Technical Manual s1d13a05tm pdf 1013 05 LCD USB Companion chip Technical manual X40A Q 001 1 S1D13A05 Hardware Functional Spec Rev 702 pdf Document number X40A A 001 07 Hardware Functional Specification for Epson S1D13A05 LCD USB companion chip x40ag003 pdf Programming Notes and Examples 1D13A05 configuration tool CFG Download from products section of the Epson web site Epson website http www erd epson com http www epson electronics de under Products gt Semiconductors gt Graphic Controllers gt Standard LCD Controller Table 5 Touch It Schematics Complete Schematic Touch it v2 0 25Mar2007 pdf 14 User s Manual U18781EE1VOUMOO RELEVANT DOCUMENTATION Table 6 MINICUBE2 Flash programmer and on chip debug not included Goto http www eu necel com update select QB MINI2 EE gt MINICUBE2 for 78 05 78 and 78KOR for latest firmware and select QB Programmer Programmer GUI for MINICUBE2 for QB2 programming installation to obtain the following installation files MINICUBE2 Firmware Vxxx zip Latest firmware for MINICUBE2 Uses the Diagnostic tool from MINICU
46. ive and 40Mbytes of free hard disk space are required to install the tool packages A USB interface version 1 1 or later is required to support the programming devices 7 3 Package contents Please verify that you have received all the parts listed in the package contents list document README pdf 7 4 Software installation The software installation CD will run automatically when inserted into the CD ROM drive Click on the required icon on the setup screen to install the documentation tools and application examples User s Manual U18781EE1VOUMOO 25 7 SOFTWARE INSTALLATION Touchlt sampleprograms Docs documentation including Segger documents Pre built hexfiles files ready to download using MINICUBE2 roject ColorBarDemo Graph demo Intro demo MemDev demo Touch Sample demo User template demo Washing machine demo Segger mbOS trial inc Libs libraries for use with KS16 tools Sample Segger example source files Src source files for main body of demos IAR_Vv3xx ddf Device description file for debugger include io70f3718 register definitions startup IAR HW definition file memory map Figure 7 1 Software installation structure Project Demo Debug Exe 185 d85 hex files List list file if enabled Obj compiled object files Settings IAR settings Figure 7 2 Structure of demo sub directory 26 User s Manual U18781EE1VOUMOO 7 SOFTW
47. nd software to quickly setup and run and show a number of demos on the TFT Colour LCD The emWin simulation is also included in the CD to allow emWin to be evaluated on the PC platform without the need for a Touch It Demonstration board Unzip the emWin_Simultion file and start the executable in the EXE directory Please refer to the readme html file and the Software Products gt emWin gt Simulation section on the Segger website for further information Please note that Segger licensing terms and agreements apply 10 User s Manual U18781EE1VOUMOO 2 5 e Touch It Demonstration kit board containing the V850ES JG2 yPD70F3718 cpu o Epson S1D13A05 LCD USB Companion chip o USB connector connected to 1013 05 but not used in this demonstration kit o Buttons to toggle LCD backlight o TFT connector o Programming connector e NL2432HC22 41K TFT Colour LCD Module 3 5 Super Reflective NLT screen 320 240 QVGA o Touchscreen panel e AR software tools Kick Start editon limited version to 16Kbytes application code Sample software utlitising Segger embOS and emWin software libraries o Introductory demo Pre loaded on the Touch It demonstration kit o Sample Washing machine demo file requires download to the V850ES Flash memory o Additional pre built Segger emWin examples to download Touch sample allows you to see the touchscreen cursor values GraphXY demo showing a com
48. nimum Type A Tantalum 3 2 4 2 20 TAJA225K010R 4 6 C5 C16 C17 C18 C19 C20 5 6 21 22 23 24 25 26 100 0805 6 6 C32 C33 034 C35 C36 C37 7 4 C38 C39 C40 C41 8 6 C27 C28 C31 C44 C45 C46 Type Tantalum 9 4 6 9 42 43 TAJA105K016R 0805 Ceramic 10 1 ed Ten B37941X1103K060 0805 Ceramic 11 4 12 13 14 15 10 B37930K5100J60 0805 Ceramic 2238 867 12 2 C29 C30 12p 15129 Small signal Schottky 13 1 D1 DIODE SCHOTTKY diode 0540 DIODE ZENER 22V 5 D2 DIODE ZENER 22V SOD 323 Current 14 1 max 200mA BZX384 C22 Red diffused LED HLMP 15 1 pa 1700 2mA 3mm leaded Yellow diffused D4 LED LED HLMP 1719 2mA 16 1 3mm leaded Green diffused D5 LED LED HLMP1790 2mA 17 1 3mm leaded DIODE DUAL SOT 23 18 2 D6 D7 BAV99 SOT BAV99 Pin header 1raw 3 way 19 1 i PEADES 2mm pitch 20 1 J1 JUMPER SOCKET 2 Ways Pitch 2mm User s Manual U18781EE1VOUMOO 56 CHAPTER 16 BILL OF MATERIALS Connector PCB side entry 2way 1 row side entry 2 header 2 5mm pitch 2 way header S2B EH LF SN 21 1 expension connector J3 J5 CONN SOCKET 20x2 20wayx2row 2 00mm 22 2 pitch Connector 8 way x 2 row 44 8 2 vertical through hole 23 1 header HEADER VERT 1 ROW 5 J6 CONN SOCKET 4 WAYS HARWIN M52 24 1 040000P0545 HEADER VERT 2 ROW 40 WAY J7 CONN SOCKET 20x2
49. nnnnnnnnnnnnnnnn nennen 21 5 6 TET Colour LCD fe cecidi 21 5 7 TouchScreen 0 4 M 22 CHAPTER 6 CONNECTORS tse eire deus 23 6 1 23 6 2 5v power connector U2 23 6 3 USB CONMGCHON UB E L 23 6 4 Flash Programming connector 44 init nnn snnt nns a sentiri asina 24 CHAPTER 7 SOFTWARE 5 42444224 22 22 25 7 1 Touch It Demonstration kit software nnne 25 7 2 Hardware 25 7 3 Package CONTENTS 25 7 4 Software installation 25 7 5 Structure of Software nnne 26 CHAPTER8 RUN THE SUPPLEMENTARY 5 4 4 44 4 22 2222 28 8 1 Supplementary detmos eerte ecce neo Root dien 28 8 2 Ap
50. o GraphXYdemo Intro de 4 lt lt lt lt lt lt Figure 10 1 IAR project overview panel User s Manual U18781EE1VOUMOO CHAPTER 10 STARTING THE IAR TOOLS 10 2 Compiler and linker settings Once the project is open confirm the compiler and linker settings by clicking on Projects gt Options to open the Options configuration window Options for node NEC Board Display Demo Category General Options C C compiler Target Output Library Configuration Library Options Stack Heap 4 Assembler Custom Build Build Actions Device Linker 85 5 uPD70F3718 Debugger Emulator IECUBE Code model Data model Normal Tiny Wire ROM Monitor Simulator C Large Large TK v850 Use short address mode E Cancel Figure 10 2 1 Projects Option configuration window This section lists the key settings for the compiler environment which need to be changed from the default setting The options which are not listed are left as defaults Category Option General Option Target Device V850ES uPD70F3718 Code Model Normal Data Model Tiny Use Short Address Mode Output Output Executable Library Config Full DLIB C C compiler Optimizations Optimizations Size Medium C C compiler Preprocessor PROJ_DIR Segger inc PROJ_DIR Segger inc GUIConf or GUIConf_w_MemDev PROJ_DIR IAR_v3xx include PROJ_DIR
51. of embOS for the V850 using the IAR tools can also be formally downloaded from the Segger website http www segger com downloads html The use of emWin in this demonstration kit is targeted with the Epson S1D13A05 LCD companion IC to drive the TFT colour LCD display Using a RTOS such as embOS enables the software application to be managed as tasks by the OS kernel Tasks can be given a priority so that higher priority tasks always run before lower priority tasks The OS also handles the timers and interrupts and a number of are provided to enable the application to use these facilities More information can be found on the Segger website http www segger com embos general html or in the embOS documentation Using a graphics library such as emWin provides the software designer with a higher level of abstraction when developing an application emWin handles all the low level functions required for displaying text graphics bitmap handling widgets and also functions to create a Windows based application if required emWin handles the software drivers to the Epson S1D13A05 LCD companion chip and the TFT LCD display to make the development of your next project using the TFT LCD display easier In addition the emWin product also provides support for the touchscreen panel and enables the software development an easy way to develop touch and click applications on the TFT LCD panel For further details on emWin please refer to http www
52. on of embOS or emWin please refer to the Segger manuals listed in Chapter 3 The demo example for these applications are provided in this demonstration kit 32 User s Manual U18781EE1VOUMOO 9 STRUCTURE OF THE DEMO CODE 9 3 Demo code overview The demo code has a basic structure called from main Main performs the majority of the initialisation setups the interrupt enabled before creating the MainTask User Task TouchScreen initialisation before handing over to the OS by calling OS Start Your application software design will follow a similar structure where the entry point for your code will be from MainTask You can see this by looking at the Segger examples Once the OS starts the kernel manages the application by running each task in turn until OS Delay is called which suspends that task for the time frame required The OS kernel decides the next task to run until OS Delay is called again When the time period specified by OS Delay is lapsed the task is then made ready again to run at the next available sequence Essentially the kernel manages the runtime between MainTask User Task TaskTouch The GUI LCD and TouchScreen initialisation is handled by the emWin libraries when GUI Init is called and is configured according the the defines GUlconf h LCDconf h and GUITouchconf h More details will be discussed in the section Configuration Files further down this c
53. plication 28 8 3 29 9 STRUCTURE OF THE DEMO nunne nnnm nnmnnn na 30 9 1 Basic structure of software demo eese 30 9 2 Segger embOS and reete esc 31 EE EM Lu DEenrEOLCNISM 33 Le s W T e ER 34 User s Manual U18781EE1VOUMOO 5 9457 Jnitialising trie M850 iih ote tee tto dc be ee eee 34 9 4 2 Initialising the TFT display 35 9 4 3 Initialising the Epson S1D13A05 LCD companion 35 9 453 1 o ERR EGHHIABRICUSBRI EIUS 35 Prxe Wllce M 35 9 5 1 Setting up the LCD touch screen header files ssessseeneeeenenennennn 35 9 5177 P EERR 35 9 5 2 GUICONT ask eile es Mee ee at i oe ie etc ede e ns 36 9 5 39 GUITOUCHGONE Ni teen Aneta ete e recited tine ie tee 36 9 6 Creating tasks 36 9 6 1 Mainlask m 37 9 6 2 User task oui egeat prb echo dude feu ene 37 9 6 3 Touch Sereen task ene tette eres eo tee i eae 37 9 6 4 Touchscreen
54. se contact the authorized reprasantativas and distributors They will verify Dewice availablity Ordering information Product rabasa schedula Availability of related technical literature Development anvironment specifications for example specifications for third party tools and components host computers power plugs AC supply voltages and so forth Network requirements office in your country to obtain In addition trademarks registered trademarks export restrictions and other lagal issues may also vary from country to country NEC Electronics America Inc Santa Clera California Te 408 588 6000 800 366 9782 Fax 408 588 6130 800 722 0288 NEC Electronics Europe GmbH Duesseldorf Germany 0211 65 000 0211 65 08 1327 Sucursal Espana Madrid Spain 061 504 27 87 Fax 61 504 28 60 Succursale Francaise V lkz y Vilacoublay France 01 30 67 58 0 01 30 67 58 Filiale Italiana Milano Italy Tel 02 66 75 41 Fax 02 66 75 42 90 Branch The Netherlands Eindhoven The Netherlands Tel 040 255 40 10 Fax 040 244 45 80 Tyskland Filial Taeby Sweden Tel 08 638 7200 Fax 08 638 7222 United Kingdom Branch Miton Keynes UK Tel 01908 691 133 Fax 01908 670 290 NEC Electronics China Co Ltd Beijing China 010 8235 1155 Electronics Hong Kong Ltd Hong Kong Te 2805 9318 Fax 2886 0022 0044 NEC Elec
55. the opening screen User s Manual U18781EE1VOUMOO 16 4 QUICK START GUIDE 4 1 2 Introduction screens This shows the NEC Electronics introduction screen and a brief slide show of what the Touch It Demonstration kit can do for you The demo will continue to the next screen after 20 seconds or when the Next button is pressed Figure 4 3 Introduction screens 4 1 3 Calibration and Keyboard Screen After the slide show a calibration program will run allowing you to recalibrate the touchscreen if necessary Click the Calibrate button to enter this program To test the calibration click on the test calibration button or click on the Keyboard button to try out the demo as a QWERTY keyboard Click ESC to quit the demo em N i Touch screen 2 SEGGER Figure 4 4 Keyboard and Calibration screens User s Manual U18781EE1VOUMOO 17 CHAPTER 4 QUICK START GUIDE 4 1 4 Using bitmaps as buttons The next demo shows bitmaps used as buttons Click on a bitmap to display a different message at the bottom of the screen This screen will end after 20 seconds or when Next is pressed Figure 4 5 Bitmap control demo 4 2 Ending the demo To end the demo remove the USB cable from the board 18 User s Manual U18781EE1VOUMOO CHAPTER 5 HARDWARE SETUP The demonstration kit board incorporates the V850ES JG2 high performance 32 bit CPU the Epson LCD driver the TFT colour LCD d
56. to put it into context and then open the menu Project Create New Project In the Create New Project Window select V850 family empty project and click OK Next a Save As window will appear Create a new folder using the Create New Folder Icon if required browse to this and then provide a File Name before clicking A new project will appear in the Overview panel Now you need to configure the project space First click on the sign by an existing project to expand it You can see the new groups you need to create Next you need to create the same groups as the other projects To add a new group right click on the project and scroll to Add Group Create the following groups Common src CPU V850ES embOSlib emWinlib Src User s Manual U18781EE1VOUMOO 44 CHAPTER 11 TO SETUP A NEW IAR PROJECT 11 1 2 Adding files to the project groups Next you need to add the source files for each group add the files from the directories shown below e 850 5 o Sampleprograms Project Src CPU_V850ES_JG2 DF3718_HWinit s85 o Sampleprograms Project Src CPU_V850ES_JG2 Lowinit V850ES JG2 13A05 c Sampleprograms Project Src CPU_V850ES_JG2 RTOSInit V850ES JG2 no UART c e embOSlib Sampleprograms Project Segger libs osESTNDP r85 Sampleprograms Project Segger OS_Error c e emWinlib Sampleprograms Project Segger libs emWinlib_STN r85 o Or Sampleprograms Project Segger libs emWinlib_MemDev_STN r85 e Common
57. tronics Korea Ltd Seoul Kcrea 002 558 3737 Fax 02 558 5141 NEC Electronics Singapore Pte Ltd Singapore 65 6253 8311 Fax 65 6250 3583 NEC Electronics Taiwan Ltd Taipei Tatean 02 8175 0500 Fax 02 8175 9570 User s Manual U18781EE1VOUMOO Table of Contents CHAPTER 1 INTRODUCTION 9 CHAPTER KIT CONTENTS c occus daa ve 11 CHAPTER3 RELEVANT DOCUMENTATION 1 13 CHAPTER 4 QUICK START 16 41 Using the pre loaded Introductory Demo 16 4 1 1 Touch It welcome Screens 16 41 22 Introduction 17 4 1 3 Calibration and Keyboard Screen 17 44 4 Using bitmaps as bu ttons 1 iir tee 18 4 2 Ending the 18 5 ees se usen 19 5 1 850 2 19 es DS itis 19 5 3 Switches aE Ea Eaa aaraa aE Aa aa aAa a Taara anetari 19 5 4 A E A A A ST 20 5 5 Epson S1D13A05 LCD USB companion Chip ss ssssssussunnnunrnnnnnnnnnnnunnnnnnnnnnnnnnnnnnnnnnnn
58. urs are available on this demonstration kit as the Epson S1D13A05 Icd companion IC drives the LCD panel via a 18bit interface The demonstration software utilitising the Segger emWin graphics library uses 565 colour mode Images and graphics in the software design are handled in 16bit mode i e 5green 6red 5blue The colour index is translated to 18 bits before writing to the Epson LCD device Please refer to Chapter 13 Colour Index for further information User s Manual U18781EE1VOUMOO 21 CHAPTER5 HARDWARE SETUP In order to run the demos in landscape mode the Epson IC provides a swivelmode that can rotate the image round 90 180 or 270 counterclockwise Swivel mode is enabled by setting the relevant values in the registers of the Epson device Chapter 15 shows the Epson configuration tools that enables the correct register configuration to be derived This configuration tool can be obtained directly from Epson 5 7 TouchScreen panel The touchscreen panel is an integral part of the NL2432HC22 41K TFT Colour LCD display It consists of a resistive array for the vertical axis and another for the horizontal axis The resistive array is fed into the V850 s 10 bit ADC inputs The inputs are analysed by software to determine if the screen has been pressed or tapped to display a cursor over a position on the screen or show a button being clicked before For more details on the TFT colour LCD display with touchscreen panel please r
59. uters office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special X Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems life support systems and medical equipment for life support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers wish to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given application Note 1 NEC Electronics as used in this statement means NEC Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above 02 11 1 User s Manual U18781EE1VOUMOO 3 Regional Information Some information contained in this document may vary from country to country Befors using any product in your application plaa
60. y the touch panel The bitmap graphics are embedded in the C code in the form of data array structures which are converted from native bitmaps using the BmpCvt conversion tools from Segger Microsysteme Further information can be found in Chapter 10 of the emWinUser pdf document Please contact Segger Microsysteme GmbH for more information about licensing the tool and other software products http www segger com software html 40 User s Manual U18781EE1VOUMOO CHAPTER 10 STARTING THE IAR TOOLS 10 1 tools Start the IAR Embedded Workbench tools for NEC V850 by clicking on the Windows Start button Start gt All Programs gt IAR Systems gt IAR Embedded Workbench for NEC V850 or click on the icon on the Windows desktop To open the demo project workspace click on File gt Open gt WorkSpace and then browse to the Project directory and open the EWW workspace file Workspace x ColorBardemo Debug Files d E Touchlt praject Ha Debug Ha Common src Ha ADC TouchScreen c Ha Main c Touchlt ColorConversio Ca User task c CPU 850 5 Ha C3 embOSlib Lec Ha em Winlib Src EK La COLOR ShowColorBar c Lg C3 Output rdan Debug amp Intro demo Debug b Debug B TouchSample Debug B User template Debug B WashingMachine Debug verview ColorBardem
Download Pdf Manuals
Related Search
Related Contents
L,M|TEE Li}` ORGANISATION MONDIALE DE LA SANTÉ Epson EMP-1707 User Manual FieldForce TCM XB USER`S MANUAL Manual de Instrucciones OPERATING INSTRUCTIONS FIREPLACES Owner`s Manual Blu-ray DiscTM Home Theater Sound System IBM Partner Pavilion T400F Switch User Manual Copyright © All rights reserved.
Failed to retrieve file