NEC V850ES User Manual
NEC V850ES User Manual

NEC V850ES User Manual

Demonstration kit for the v850es/jg2 and nl2432hc22-41k 3.5” tft colour lcd module with touch screen panel
Table of Contents

Advertisement

Quick Links

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. U18781EE1V0UM00
Date Published June 2007
© NEC Electronics Corporation 2007
Printed in Germany

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the V850ES and is the answer not in the manual?

Questions and answers

Summary of Contents for NEC V850ES

  • Page 1 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. U18781EE1V0UM00 Date Published June 2007 © NEC Electronics Corporation 2007 Printed in Germany...
  • Page 2 [MEMO] User's Manual U18781EE1V0UM00...
  • Page 3 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.
  • Page 4 User's Manual U18781EE1V0UM00...
  • Page 5: Table Of Contents

    4.1.2 Introduction screens.........................17 4.1.3 Calibration and Keyboard Screen ....................17 4.1.4 Using bitmaps as buttons.........................18 Ending the demo............................18 CHAPTER 5 HARDWARE SETUP....................19 V850ES/JG2 ............................19 LEDs................................19 Switches ..............................19 Connectors .............................20 Epson S1D13A05 LCD/USB companion chip ..................21 TFT Colour LCD display ........................21 TouchScreen panel..........................22 CHAPTER 6 CONNECTORS ......................23...
  • Page 6 9.4.1 Initialising the V850 ..........................34 9.4.2 Initialising the TFT display registers ....................35 9.4.3 Initialising the Epson S1D13A05 LCD companion chip..............35 9.4.3.1 LCDLIN.c ..........................35 OS_Init ..............................35 9.5.1 Setting up the LCD touch screen header files..................35 9.5.1.1 LCDconf.h..........................35 9.5.2 Guiconf.h............................36 9.5.3 GUITouchConf.h ..........................36 Creating tasks ............................36 9.6.1 MainTask ............................37 9.6.2 User task............................37...
  • Page 7 List of Figures Figure 1-1 Touch IT! Demonstration kit (without the enclosure) ............10 Figure 4-1 USB connection to the Touch It! board.................16 Figure 4-2 Touch the opening screen ....................16 Figure 4-3 Introduction screens......................17 Figure 4-4 Keyboard and Calibration screens..................17 Figure 4-5 Bitmap control demo ......................18 Figure 5-1 Position of switches on Touch It! circuit board..............20 Figure 5-2 TFT LCD Touch panel display ....................22 Figure 6-1 PG-FP4 and MINICUBE2 programmers................24...
  • Page 8 Table 6 MINICUBE2 Flash programmer and on-chip debug (not included) ..........15 Table 7 Switches on the Touch It! Board ....................19 Table 8 Connectors on TFT V850ES board ...................20 Table 9 Memory model settings ......................32 Table 10 IAR compiler settings ......................43 Table 11 Correct pinning from Epson S1D13A05 to TFT LCD connector ..........51...
  • Page 9: Chapter 1 Introduction

    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.
  • Page 10: Figure 1-1 Touch It! Demonstration Kit (Without The Enclosure)

    CHAPTER 1 INTRODUCTION Please refer to the MINICUBE2 installation guides and user’s manual listed in Chapter 3 for more information. The 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.
  • Page 11: Chapter 2 Kit Contents

    Introductory demo Pre-loaded on the Touch It demonstration kit. Sample Washing machine demo Hex file requires download to the V850ES Flash memory Additional pre-built Segger emWin examples to download Touch_sample – allows you to see the touchscreen cursor values GraphXY – demo showing a combination of graphics, check boxes and buttons.
  • Page 12 CHAPTER 2 KIT CONTENTS • emWin simulation GUISimulation executable to show emWin running on a PC platform Also includes sample code which can be compiled with Visual C++ v6.0 or later • USB cable User's Manual U18781EE1V0UM00...
  • Page 13: Chapter 3 Relevant Documentation

    RELEVANT DOCUMENTATION CHAPTER 3 Table 1 V850ES manuals U17715EJ1V0UD00.pdf User Manual for µPD70F3718 cpu U17966EE4V0IF00.PDF MINICUBE2 Setup manual for Flash Programming U18527EJ1V0UM00.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...
  • Page 14: Table 4 Epson S1D13A05 Documents

    CHAPTER 3 RELEVANT DOCUMENTATION Table 4 Epson S1D13A05 documents Technical Manual s1d13a05tm.pdf S1D13A05 LCD/USB Companion chip Technical manual X40A-Q-001-1 S1D13A05_Hardware_Functional_Spec_Rev_702.pdf Hardware Functional Specification for Epson Document number X40A-A-001-07 S1D13A05 LCD/USB companion chip x40ag003.pdf Programming Notes and Examples S1D13A05 configuration tool CFG Download from products section of the Epson web site Epson website...
  • Page 15: Table 6 Minicube2 Flash Programmer And On-Chip Debug (Not Included)

    CHAPTER 3 RELEVANT DOCUMENTATION Table 6 MINICUBE2 Flash programmer and on-chip debug (not included) Goto http://www.eu.necel.com/update select QB-MINI2-EE MINICUBE2 for 78K0S, 78K0, and 78K0R 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.
  • Page 16: Chapter 4 Quick Start Guide

    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.
  • Page 17: Introduction Screens

    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...
  • Page 18: Using Bitmaps As Buttons

    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 Ending the demo To end the demo, remove the USB cable from the board.
  • Page 19: Chapter 5 Hardware Setup

    The external bus feature is used to interface to the Epson LCD companion chip which drives the TFT LCD display. The 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.
  • Page 20: Connectors

    LCD signals from CPU Conn PCB 4 USB connector – can provide 5v supply to stater kit if J1 pins 2+3 closed Hirose FP23 45 way TFT connector for LCD ribbon connection Table 8 Connectors on TFT V850ES board User's Manual U18781EE1V0UM00...
  • Page 21: 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 S1S13A05 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.
  • Page 22: Touchscreen Panel

    CHAPTER 5 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.
  • Page 23: Chapter 6 Connectors

    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. 5v power connector J2 A 5 volt source can be connected via J2.
  • Page 24: Flash Programming Connector J4

    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 or J2.
  • Page 25: Chapter 7 Software Installation

    SOFTWARE INSTALLATION CHAPTER 7 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).
  • Page 26: Structure Of Software Installation

    CHAPTER 7 SOFTWARE INSTALLATION Structure of Software installation Figure 7-1 Software installation structure Figure 7-2 Structure of demo sub-directory User's Manual U18781EE1V0UM00...
  • Page 27: Figure 7-3 Structure Of Src Sub-Directory

    CHAPTER 7 SOFTWARE INSTALLATION Figure 7-3 Structure of Src sub-directory User's Manual U18781EE1V0UM00...
  • Page 28: Chapter 8 To Run The 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.
  • Page 29: Segger Examples

    CHAPTER 8 TO RUN THE SUPPLEMENTARY DEMOS Segger examples. A sample of Segger examples for emWin are 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.
  • Page 30: Chapter 9 Structure Of The Demo Code

    STRUCTURE OF THE DEMO CODE CHAPTER 9 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...
  • Page 31: Segger Embos And Emwin

    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.
  • Page 32: Table 9 Memory Model Settings

    CHAPTER 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.
  • Page 33: Demo Code Overview

    CHAPTER 9 STRUCTURE OF THE DEMO CODE 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( ).
  • Page 34: Main

    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 a PWM output to control the TFT backlight and initially set to a frequency of 2KHz and 100% duty cycle.
  • Page 35: Initialising The Tft Display Registers

    CHAPTER 9 STRUCTURE OF THE DEMO CODE 9.4.2 Initialising 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_Init( ) is called by the function GUI_Init( ) in emWin...
  • Page 36: Guiconf.h

    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 V850ES to use. e.g. #define GUI_TOUCH_AD_TOP...
  • Page 37: Maintask

    CHAPTER 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.
  • Page 38: Figure 9-3 Touch Screen Circuit

    Figure 9-3 Touch Screen circuit To read the X-axis value of the touchscreen on the V850ES ADC input ANI0, 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...
  • Page 39: Touchscreen Calibration

    The LCD backlight dimming is also handled in the Touch Screen task which reads the 2 user switches SW3 and SW4 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 touchscreen are defined in GUI_Touchconf.h, i.e.
  • Page 40 CHAPTER 9 STRUCTURE OF THE DEMO CODE The demo functions called are:- TouchIt_intro, • NECEE_intro, • TouchIt_Slide1, • TouchIt_Slide2, • Display_blockdiagram, • Display_SeggerIAR_logo, • TouchIt_Slide3, • TouchIt_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 by the touch panel.
  • Page 41: Iar Tools

    CHAPTER 10 IAR tools 10.1 Start the IAR Embedded Workbench tools for NEC V850 by clicking on the Windows Start button:- Start->All Programs->IAR Systems->IAR Embedded Workbench for NEC V850 or click on the icon on the Windows desktop. To open the demo project workspace, click on File->Open->WorkSpace and then browse to the \Project directory and open the .EWW workspace file.
  • Page 42: Chapter 10 Starting The Iar Tools

    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...
  • Page 43: Compiling A Project

    CHAPTER 10 STARTING THE IAR TOOLS $PROJ_DIR$\..\Segger\inc\GUI\Widget $PROJ_DIR$\..\Segger\inc\GUI\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...
  • Page 44: Chapter 11 To Setup A New Iar Project

    TO SETUP A NEW IAR PROJECT CHAPTER 11 To create a new IAR project space 11.1 11.1.1 Adding project groups Open the V850 IAR tools with the supplied “TouchIt_project.eww” workspace. You will see a panel with the tab “overview” on the bottom. Click on the top PROJECT level to put it into context and then open the menu Project->Create New Project.
  • Page 45: 11.1.2 Adding Files To The Project Groups

    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. • CPU_V850ES \Sampleprograms\Project\Src\CPU_V850ES_JG2\DF3718_HWInit.s85 \Sampleprograms\Project\Src\CPU_V850ES_JG2\ Lowinit_V850ES_JG2_13A05.c \Sampleprograms\Project\Src\CPU_V850ES_JG2\ RTOSInit_V850ES_JG2_no_UART.c •...
  • Page 46: Chapter 12 Using The Minicube2 (Optional)

    When you connect the MINCUBE2 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 Files\NEC Electronics Tools\mqb2all . Next run the MINICUBE2 diagonostic checker from the Start->All Porgrams->NEC Electronics Tools- >MINICUBE2 Utilities menu.
  • Page 47: Using The Minicube2 To Programme The Touch It! Board (Optional)

    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.
  • Page 48: Figure 12-4 Qb-Programming Application And Device Setup

    CHAPTER 12 USING THE MINICUBE2 (OPTIONAL) To start the QBP program, goto Start->All Programs->NEC Electronics Tools->QBP2. Next, install the PRM file for the 70F3718 from the Device->Setup menu. The programmer is ready for use. Figure 12-4 QB-Programming application and device setup To program a hex file to the Touch It! demonstration kit:- Firstly, select File->Load and browse to the required hex file from the following directories:-...
  • Page 49: (Optional)

    DEBUGGING THE PROGRAM USING ON-CHIP DEBUG WITH THE CHAPTER 13 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.
  • Page 50: 13.1.2 Disable The Uart

    CHAPTER 13 DEBUGGING THE PROGRAM USING ON-CHIP 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 MINICUBE2.
  • Page 51: Chapter 14 Colour Index

    COLOUR INDEX CHAPTER 14 This section describes a circuit board layout error which is corrected by the software routine contained in the file Support_ Colour mapping between the LCD connector and board 14.1 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.
  • Page 52: Table 12 Actual Pinning From Epson S1D13A05 To Tft Lcd Connector

    CHAPTER 14 COLOUR INDEX However, the board is pinned as follows where Red and Green are inverted:- FP_DAT0 (Red5) -> LCD pin 24 (Green5) FP_DAT1 (Red4) -> LCD pin 29 (Green4) FP_DAT2 (Red3) -> LCD pin 28 (Green3) FP_DAT3 (Green5) ->...
  • Page 53: Chapter 15 Epson S1D13A05 Configuration Setting

    EPSON S1D13A05 CONFIGURATION SETTING CHAPTER 15 This chapter contains 5 screenshots showing the settings used for the Epson S1D13A05 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...
  • Page 54: Figure 15-3 Epson Clock Configuration

    CHAPTER 15 EPSON S1D13A05 CONFIGURATION SETTING Figure 15-3 Epson clock configuration Figure 15-4 Epson panel configuration User's Manual U18781EE1V0UM00...
  • Page 55: Figure 15-5 Epson Panel Power Configuration

    CHAPTER 15 EPSON S1D13A05 CONFIGURATION SETTING Figure 15-5 Epson panel power configuration User's Manual U18781EE1V0UM00...
  • Page 56: Chapter 16 Bill Of Materials

    BILL OF MATERIALS CHAPTER 16 This section lists the components used on the Touch It! Circuit board. Table 13 Bill of Materials Quantity /per Reference Part Part Type Board Type 'A' Tantalum C1,C8,C10,C11 4.7u TAJA475K010R 0805 Ceramic 25V 0.68u minimum Type 'A' Tantalum C3,C4 2.2u...
  • Page 57 CHAPTER 16 BILL OF MATERIALS Connector,PCB,side entry 2way 1 row side entry header,2.5mm pitch,2 way header, S2B-EH (LF) (SN) expension connector J3,J5 CONN SOCKET 20x2 20wayx2row, 2.00mm pitch Connector 8 way x 2 row CONN SOCKET 8x2 vertical through hole header HEADER, VERT 1 ROW 5 WAY;...
  • Page 58 IC, SM LOGIC BUFFER AND U10,U11,U12,U13 SN74HC244DW LINE DRIVER NC38 watch crystal, 32.768KHz through hole 32.768kHz 12.50pF Citizen Crystal, through Crystal, 5.000000MHZ hole HC49US5.000MABJ-UB Citizen Crystal, through 48MHz hole HC49US48.000MABJ-UB NEC TFT display NL2432HC22-41K 3.5" NEC TFT Display User's Manual U18781EE1V0UM00...
  • Page 59 SCHEMATICS CHAPTER 17 User's Manual U18781EE1V0UM00...
  • Page 60: Chapter 17 Schematics

    CHAPTER 17 SCHEMATICS User's Manual U18781EE1V0UM00...
  • Page 61 CHAPTER 17 SCHEMATICS User's Manual U18781EE1V0UM00...

Table of Contents