User’s Manual DemoKit-KA1 Demonstration Kit for NEC Electronics Low-Pin-Count Devices Document No. U17680EU1V0UM00 ©August 2005. NEC Electronics America, Inc. All rights reserved. The information in this document is current as of August 2005. 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 upto-date specifications of NEC Electronics products. Not all products and/or types are available in every country. Please check with an NEC 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 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 NEC Electronics 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 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 customer's equipment shall be done under the full responsibility of customer. NEC Electronics 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 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": Computers, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots. "Special": 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 NEC Electronics sales representative in advance to determine NEC Electronics 's willingness to support a given application. Notes: 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). M8E 02.10 ii DemoKit-KA1 User’s Manual DemoKit-KA1 complies with the EMC protection requirements. WARNING This is “Class A” (EN 55022:1998) equipment. This equipment can cause radio frequency noise when used in the residential area. In such cases, the user/operator of the equipment may be required to take appropriate countermeasures under his responsibility. EEDT-ST-001-11 CAUTION This equipment should be handled like a CMOS semiconductor device. The user must take all precautions to avoid build-up of static electricity while working with this equipment. All test and measurement tool including the workbench must be grounded. The user/operator must be grounded using the wrist strap. The connectors and/or device pins should not be touched with bare hands. EEDT-ST-004-10 iii Revision History Date Revision Section Description August 2005 — — Initial release iv DemoKit-KA1 User’s Manual Contents 1. Introduction.....................................................................................................................................1 1.1 1.2 1.3 2. System Configuration .....................................................................................................................3 2.1 2.2 2.3 3. Features..................................................................................................................................................1 System Requirements ...........................................................................................................................2 Package Contents ..................................................................................................................................2 DemoKit-KA1 ........................................................................................................................................3 Host Computer.......................................................................................................................................3 Power Supply .........................................................................................................................................3 Board Components .........................................................................................................................4 3.1 SW3 Configuration Switch ...................................................................................................................4 3.1.1 Operating Mode Selection: SW3/S1.........................................................................................5 3.1.2 UART Selection: SW3/S2 ........................................................................................................5 3.1.3 SW3/S3: Clock Mode Selection ...............................................................................................5 3.1.4 SW3/S4: UART Mode Selection..............................................................................................5 3.2 SW1: User Button ..................................................................................................................................5 3.3 SW2: Start Button .................................................................................................................................5 3.4 CN7: USB Interface Connector ............................................................................................................6 3.5 Connector CN1 / Clock Configuration ................................................................................................6 3.6 CN2 and CN12: External Peripheral Configuration..........................................................................6 3.7 External Potentiometer R24 .................................................................................................................6 3.8 A/D Converter Reference Voltage Input .............................................................................................6 3.9 External LEDs D1–D4...........................................................................................................................7 3.10 External connectors CN3, CN4, CN5, and CN6.................................................................................8 4. Memory Map...................................................................................................................................9 5. Getting Started..............................................................................................................................10 5.1 5.2 5.3 5.4 6. Hardware Installation .........................................................................................................................10 Software installation............................................................................................................................10 5.2.1 SM+ (Product ID: 00001664C) ........................................................................................... 11 5.2.2 NEC Electronics Software Development Tools .....................................................................11 5.2.3 PG-LPC Flash Programming GUI..........................................................................................11 5.2.4 Sample Programs ................................................................................................................. 11 5.2.5 Driver................................................................................................................................... 12 5.2.5.1 Windows 98SE/ME Systems....................................................................................12 5.2.5.2 Windows 2000 Systems ...........................................................................................14 5.2.5.3 Windows XP Systems ..............................................................................................20 Confirmation of USB Driver Installation ..........................................................................................25 5.3.1 Windows 98SE/ME Systems ............................................................................................... 26 5.3.2 Windows 2000/XP Systems ................................................................................................ 26 Driver Uninstallation...........................................................................................................................27 PG-LPC Flash Programming Software ....................................................................................... 29 6.1 6.2 6.3 Starting the Software GUI ..................................................................................................................29 Toolbar .................................................................................................................................................30 Menu Bar..............................................................................................................................................30 6.3.1 File Menu............................................................................................................................. 30 6.3.1.1 Load Command ..................................................................................................... 31 6.3.1.2 Quit Command ...................................................................................................... 31 6.3.2 Device Menu........................................................................................................................ 31 6.3.2.1 Blank Check Command......................................................................................... 32 v 6.4 7. 6.3.2.2 Erase Command .................................................................................................... 32 6.3.2.3 Program Command................................................................................................ 32 6.3.2.4 Verify Command ................................................................................................... 33 6.3.2.5 Security Command ................................................................................................ 33 6.3.2.6 Checksum Command............................................................................................. 33 6.3.2.7 Autoprocedure (EPV) Command .......................................................................... 33 6.3.2.8 Signature Read Command..................................................................................... 33 6.3.2.9 Setup Command .................................................................................................... 33 6.3.3 View Menu .......................................................................................................................... 36 6.3.3.1 Toolbar Command................................................................................................. 36 6.3.3.2 Status Bar Command............................................................................................. 37 6.3.4 Help Menu ........................................................................................................................... 37 Programmer Parameter Window.......................................................................................................37 Using the PG-LPC Flash Programming Software .....................................................................39 7.1 7.2 7.3 7.4 7.5 Installing the PG-LPC GUI Software ................................................................................................39 Installing the Driver ............................................................................................................................39 Installing the Parameter File ..............................................................................................................39 Connecting and Starting .....................................................................................................................40 Command Options...............................................................................................................................44 7.5.1 Executing a Blank Check Before Erase Command ............................................................. 44 7.5.2 Selecting and Opening a User Program............................................................................... 44 7.5.3 Executing the Autoprocedure(EPV) Command .................................................................. 45 7.5.4 Terminating the GUI............................................................................................................ 46 7.5.5 Executing “LIGHT_DEMO” Application ........................................................................... 46 7.5.6 Restarting the GUI............................................................................................................... 46 8. TROUBLESHOOTING ...............................................................................................................47 9. Sample Programs..........................................................................................................................50 9.1 9.2 9.3 9.4 9.5 9.6 10. Connectors and Cables.................................................................................................................58 10.1 11. vi General Introduction...........................................................................................................................50 ADC Demo............................................................................................................................................52 Light Demo ...........................................................................................................................................53 ReacTime Demo ...................................................................................................................................54 Timer Demo..........................................................................................................................................55 UART Demo .........................................................................................................................................56 USB Interface Cable (Mini-B type) ...................................................................................................58 Schematics .....................................................................................................................................60 DemoKit-KA1 User’s Manual 1. Introduction DemoKit-KA1 is a demonstration kit for the NEC Electronics low-pin-count 78K0S/KA1+ microcontrollers (MCUs). Designed for connection to user hardware such as digital I/O or analog signals, the kit supports on-board flash programming and real-time execution of application programs up to 4 KB. 1.1 Features Easy-to-use capabilities to demonstrate simple device functions − Pushbuttons − LED outputs − A/D reference voltage − I/O lines − UART interface USB interface-supplied power; no separate power supply needed Windows-based PG-LPC flash programming software that allows you to select and download application programs for evaluation purposes Analog-to-digital (A/D) signal conversion Various I/O signals − All I/O ports to be connected to user hardware − Timer I/O signals − UART interface via USB UART chip FT232 − Four analog input lines − Four I/O ports connected to LEDs − One pushbutton for external interrupt generation NEC Electronics C compiler and assembler (32 KB maximum program code size) Applilet reference device driver generator System Simulator Plus (SM+) software debugger Full documentation for the NEC Electronics 78K0S/KA1+ microcontroller and the NEC Electronics software tools and PG-LPC flash programming software The DemoKit-KA1 is not intended for code development. NEC Electronics does not support attempts to use the kit in commercial or technical products. 1 1.2 System Requirements Windows® 98SE, Windows ME, Windows 2000 or Windows XP operating system 166 MHz (minimum) Pentium®-class processor 64 MB RAM 256-color display (1024 × 768) Mouse CD-ROM drive 40 MB of free hard disk space USB interface that enables communication based on USB version 1.1 or later (Requirements are valid if the NEC Electronics software development tools and PG-LPC flash programming software are to be installed.) 1.3 Package Contents Please verify that you have received all parts listed in the contents list bundled with the DemoKit-KA1 package. If any part is missing or seems to be damaged, please contact your NEC Electronics sales representative. Note: 2 Updates to this manual, additional documentation and/or utilities available for the DemoKit-KA1 may be downloaded from http://www.necelam.com/microcontrollers/devtools.php. DemoKit-KA1 User’s Manual 2. System Configuration Figure 1 illustrates the system configuration. Figure 1. System Configuration 2.1 DemoKit-KA1 DemoKit-KA1 is a demonstration kit for NEC Electronics’ low-pin-count 78K0S microcontrollers. The µPD78F9222 is a typical device from this family and was used to realize the DemoKit-KA1, which connects to the host system via a USB interface cable. The host may be used for programming the MCU’s flash memory and for executing application programs on the DemoKit-KA1 platform. The DemoKit-KA1 operates the µPD78F9222 microcontroller at a speed of 8 MHz. 2.2 Host Computer The USB host interface enables communication with the board. The FT232 USB UART chip allows application software to access the USB device in the same way it would a standard RS-232 interface. To the Windows operating system, the FTDI's virtual COM port (VCP) driver appears as an extra communications port, in addition to any existing hardware communications ports. For detailed specifications for the host interface, refer to section 10, “Connectors and Cables.” 2.3 Power Supply The USB interface supplies 5V of power to the DemoKit-KA1; no separate power supply is needed. 3 3. Board Components The DemoKit-KA1 board is equipped with pushbuttons, LEDs and several connectors to the host computer and target hardware. Additionally, the board provides a wire-wrap field (2.54 mm grid) that can be used to integrate user application hardware. Figure 2. Board Connectors, Switches and LEDs The µPD78F9222’s on-chip resources are free for user application hardware and software. Before connecting any external signals to the board, please refer to the MCU user’s manual for the electrical specifications of the available I/O ports. 3.1 SW3 Configuration Switch The board’s various operating modes can be set using SW3 switches S1–S4. 4 SW3 Factory Settings Function S1 OFF Normal operation S2 OFF No UART S3 OFF CPU clock = 8 MHz S4 OFF No handshake for UART DemoKit-KA1 User’s Manual 3.1.1 Operating Mode Selection: SW3/S1 SW3 switch S1 controls the board’s operating mode. Setting SW3/S1 to ON allows reprogramming of the MCU’s internal flash memory using the PG-LPC flash programming software. 3.1.2 SW3, S1 Operating Mode OFF (default) Normal operation; user program stored in the device’s flash memory is executed ON Flash memory programming mode UART Selection: SW3/S2 SW3 switch S2 controls the board’s serial communication. Setting SW3/S2 to ON connects the RxD6 and TxD6 UART6 signals to the FT232 interface lines. 3.1.3 SW3, S2 Operation OFF (default) RxD6 / TxD6 disconnected ON RxD6 / TxD6 connected to FT232 interface lines SW3/S3: Clock Mode Selection SW3 switch S3 controls the clock operation frequency of the DemoKit-KA1 board. 3.1.4 SW3/S3 Clock Frequency OFF (default) ON 8 MHz 4 MHz SW3/S4: UART Mode Selection SW3/S4 controls the board’s UART communication mode. Setting SW3/S4 to ON enables UART communication with handshake. In this mode, CPU pins P40 and P41 are connected to the FT232 interface lines and used as RTS and CTS control signals. SW3, S4 Description OFF (default) ON UART communication without handshake UART communication with handshake (P40=RTS; P41=CTS) 3.2 SW1: User Button SW1 is a pushbutton that connects VSS to the CPU’s INTP0 external interrupt input, which is equal to port P30 of the MCU. The port may be programmed to generate INTP0, as described in the user’s manual for the 78K0S/KA1+device. Pressing this button applies a low signal level at port P30. 3.3 SW2: Start Button The SW2 reset button activates the power-on reset and is connected to the reset input of the CPU. Pressing this button applies a low signal level to the RESET pin. 5 3.4 CN7: USB Interface Connector The CN7 connector allows connecting the PG-LPC flash programming software to the DemoKit-KA1 board to program application programs in the CPU’s internal flash memory. Connection CN7 provides the board power supply of 5V, and also UART6 of the 78K0S/KA1+ device to the host system. 3.5 Connector CN1 / Clock Configuration Connector CN1 is used to define the operating clock of the DemoKit-KA1 board. Closing the connectors CN1/3–5 and CN1/4–6 (default setting) provides an 8 MHz clock frequency to the MCU. In this mode, the clock frequency is supplied by the CPLD. Alternatively, an external crystal oscillator can be equipped to the DemoKit-KA1 board. To use this mode, close connectors CN1/1–3 and CN1/2–4. CN1 Jumper Setting 1–2 Open (default) 3–5 Closed (default) 4–6 Closed (default) 1-3 Closed 2–4 Closed 5–6 Open Mode Clock frequency = 8 MHz, supplied by CPLD Clock supply by external oscillator. When using this mode, be sure to equip a crystal oscillator and corresponding capacitors to X1, C12 and C11. 3.6 CN2 and CN12: External Peripheral Configuration Connectors CN2 and CN12 allow you to connect and disconnect external board hardware to the MCU. CN2 Jumper Setting Mode 1–2 3–4 5–6 7–8 9–10 Closed (default) Closed (default) Closed (default) Closed (default) Closed (default) RESET pin connected to CPLD RESET pin connected to button SW2 INTP0 pin connected to button SW1 P40 connected to CPLD (RTS line of FT232) P41 connected to CPLD (CTS line of FT232) CN12 Jumper Setting Mode 1–2 3–4 5–6 7–8 9–10 Closed (default) Closed (default) Closed (default) Closed (default) Closed (default) Power supply, VCC = 5V connected to MCU and external potentiometer R24 AVREF pin connected to VCC ANI0 pin connected to R24 potentiometer arm P44/RxD6 connected to CPLD (RxD line of FT232) P43/TxD6 connected to CPLD (TxD line of FT232) 3.7 External Potentiometer R24 A 10K potentiometer R24 is connected between VCC and ground. Closing connector CN12/1–2 supplies VCC to R24. The potentiometer arm can be connected to the MCU’s ANI0 analog input by closing connector CN12/5–6. 3.8 A/D Converter Reference Voltage Input The reference voltage of the potentiometer R24 can be supplied to the AVREF input by closing connector CN12/3–4. 6 DemoKit-KA1 User’s Manual 3.9 External LEDs D1–D4 The D1–D4 LEDs are connected to the 78K0S/KA1+ device and are free for user application purposes. The LEDs are connected via a 4.7K pull-up resistor to VCC and is therefore active low. Port LED P23 D1 P130 D2 P45 D3 P123 D4 To disconnect an LED from a port for alternative usage, cut the connection (default) of the corresponding soldering bridge SB1–SB4. 7 3.10 External connectors CN3, CN4, CN5, and CN6 CN3, CN4, CN5, and CN6 are connectors for external user hardware. All CPU signals are connected to CN3, with the exception of X1 and X2 signals. The DemoKit-KA1 board provides a wire wrap field— connectors CN4, CN5 and CN6—allowing the integration of additional application hardware. CN3 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 CN3 VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 CN6 AVREF P20 P21 P22 P23 P130 P45 P44 P43 P42 P41 P40 P30 P31 RESET VDD P123 N.C. N.C. VSS (N.C. = not connected) 8 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 CN6 N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 CN5 N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 CN5 N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 CN4 N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 CN4 N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. N.C. 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND DemoKit-KA1 User’s Manual 4. Memory Map The memory layout of the µPD78F9222’s 4 KB flash ROM is shown in Table 1. Table 1. Memory Map of µPD78F9222’s 4 KB Flash ROM 0xFFFF SFR area 256 × 8 bits Address Area 0xFF00 0xFEFF Free for application software Internal high-speed RAM 256 × 8 bits 0xFE00 0xFDFF Use prohibited 0x1000 0x0FFF Flash memory 4096 × 8 bits Free for application software 0x0000 The DemoKit-KA1 board does not reserve any of the MCU’s resources; consequently all available device memory is free for application software. 9 5. Getting Started The Windows-based PG-LPC flash programming software allows you to select and download application programs to the DemoKit-KA1 board. Communication between the host system and board is via a USB interface. Before you can download and run a program, the hardware and software must be installed properly. Figure 3. CD-ROM Contents - Acrobat Reader for 32-Bit Windows operating system - Applilet reference device driver generator - Documentation - NEC Electronics tools: compiler and assembler (evaluation) - PG-LPC flash programming software, including USB drivers - Sample programs for DemoKit-KA1 … AD converter demonstration … Light show … Reaction time measurement … Timer demonstration … UART demonstration - System Simulator SM+ 5.1 Hardware Installation After unpacking the DemoKit-KA1, connect the board to the host using the provided USB interface cable. Afterward, install the USB driver as directed in section 5.2, “Software Installation.” 5.2 Software installation The DemoKit-KA1 package comes with the several demonstration software packages: Applilet and System Simulator (SM+) NEC Electronics software development tools, including a C compiler, assembler, linker, and project manager PG-LPC flash programming GUI Sample programs 10 DemoKit-KA1 User’s Manual The NEC Electronics software development tools and PG-LPC flash programming GUI must be installed on your computer. For detailed information about installation, refer to the following chapters and documentation corresponding to the software tools. 5.2.1 SM+ (Product ID: 00001664C) • Windows XP users − Please refer to the v1.01 Operating Precautions document for restrictions. − In Windows XP SP2, when you activate the SIMULATION FUNCTION, the SM+'s Help→ Current Window dialog doesn't work normally. From the Start menu, you must select Program → NEC Tools32 → SM+ for 78K0S_Kx1+ Help → CHAPTER 6 SIMULATION FUNCTION. • The sample programs can be downloaded to the DemoKit-KA1 board directly from the CDROM. If you intend to modify or debug (simulate) the sample programs, then you need to copy the complete \SamplePrograms folder to your hard disk. • Note: Before modification or rebuilding of sample programs, do not forget to remove the “read-only” attribute of the copied files. 5.2.2 NEC Electronics Software Development Tools To install the NEC Electronics software development tools, select the SETUP program in the \NECTools\ directory of the CD-ROM and follow the setup dialogs through the process. 5.2.3 PG-LPC Flash Programming GUI To install the PG-LPC flash programming GUI, select the SETUP program in the directory \PG-LPC\ of the CD-ROM. The setup dialogs will guide you through the installation process. 5.2.4 Sample Programs The sample programs do not require any installation for downloading to the DemoKit-KA1 board. If the sample programs must be modified, copy them using Windows Explorer into a directory on your local hard disk. Note: Before modifying or rebuilding the sample programs, don’t forget to remove the “readonly” attribute of the copied files. 11 5.2.5 Driver To use the board, you must install one of the drivers in the “C:\Program Files\NECTools32\PGLPC\DRIVERS” folder: • For Windows 98SE/Me systems, follow the procedure explained in section 5.2.5.1. • For Windows 2000 systems, follow the procedure explained in section 5.2.5.2. • For Windows XP systems, follow the procedure explained in section 5.2.5.3. 5.2.5.1 Windows 98SE/ME Systems 1. Once the DemoKit-KA1 board and host connect, the Plug and Play feature initializes the wizard for adding new hardware. Click Next. Figure 4. Add New Hardware Wizard (Windows 98SE ) 2. In the Search Method box, check "Search for a suitable driver ..." and then click Next. 12 DemoKit-KA1 User’s Manual Figure 5. Search Method (Windows 98SE) 3. Check the "Specify a location" box, select "C:\Program Files\NECTools32\PGLPC\DRIVERS" and then click Next. Figure 6. Search Location Specification (Windows 98SE) Note: If the destination folder changed at the time of PG-LPC installation, enter "newfolder\PG-LPC\DRIVERS". 4. When you see this window, click Next. 13 Figure 7. Checking Driver to Be Installed (Windows 98SE) 5. After installation of the software, click Finish to install the USB serial port driver. Figure 8. Installation Completion (Windows 98SE) 5.2.5.2 Windows 2000 Systems 1. When the DemoKit-KA1 board and host computer connect, the Plug and Play function initializes the wizard for finding new hardware. Click Next. 14 DemoKit-KA1 User’s Manual Figure 9. Found New Hardware Wizard 1 (Windows 2000) 2. In the first box, check "Search for a suitable driver ..." and then click Next. Figure 10. Search Method 1 (Windows 2000) 3. Check the "Specify a location" only and then click Next. 15 Figure 11. Driver File Location 1 (Windows 2000) 4. Select "C:\Program Files\NECTools32\PG-LPC\DRIVERS" and then click OK. Figure 12. Address Specification 1 (Windows 2000) Note: If the installation destination folder changed at the time of PG-LPC installation, enter new-folder-name\PG-LPC\DRIVERS. 5. Click Next. 16 DemoKit-KA1 User’s Manual Figure 13. Driver File Search 1 (Windows 2000) 6. Click Finish to complete the installation. Figure 14. USB Driver Installation Completion 1 (Windows 2000) 7. Click Next to install the USB serial port driver. 17 Figure 15. Found New Hardware Wizard 2 (Windows 2000) 8. Check "Search for a suitable driver ..." and then click Next. Figure 16. Search Method 2 (Windows 2000) 9. Check the "Specify a location" box only and then click Next. 18 DemoKit-KA1 User’s Manual Figure 17. Driver File Location 2 (Windows 2000) 10. Select C:\Program Files\NECTools32\PG-LPC\DRIVERS and then click OK. Figure 18. Address Specification 2 (Windows 2000) Note: If the destination folder changed at the time of PG-LPC GUI software installation, enter new-folder-name\PG-LPC\DRIVERS. 11. Click Next. 19 Figure 19. Driver File Search 2 (Windows 2000) 12. Click Finish to complete the installation. Figure 20. USB Driver Installation Completion 2 (Windows 2000) 5.2.5.3 Windows XP Systems 13. When the DemoKit-KA1 board and host machine connect, the Plug and Play function initializes the wizard for finding new hardware. Check Install from a list or specific ... and then click Next. 20 DemoKit-KA1 User’s Manual Figure 21. Found New Hardware Wizard 1 (Windows XP) 21 14. Check Search for the best driver in these locations and Include this location in the search. 15. Select C:\Program Files\NECTools32\PG-LPC\DRIVERS and then click Next. Figure 22. Search Location Specification 3 (Windows XP) 16. When you see the has not passed Windows Logo testing to verify its compatibility with Windows XP message, click Continue Anyway. Figure 23. Windows XP Logo Testing 3 (Windows XP) 22 DemoKit-KA1 User’s Manual 17. When you see this box, click Finish. Figure 24. USB Driver Installation Completion 1 (Windows XP) 18. Click Next to install the driver. Figure 25. Found New Hardware Wizard 2 (Windows XP) 23 19. Check Search for the best driver in these locations and Include this location in the search. 20. Select C:\Program Files\NECTools32\PG-LPC\DRIVERS and then click Next. Figure 26. Search Location Specification 2 (Windows XP) 21. When you see the "has not passed Windows Logo testing to verify its compatibility with Windows XP" message, click Continue Anyway. Figure 27. Windows XP Logo Testing 2 (Windows XP) 24 DemoKit-KA1 User’s Manual 22. When you see this dialog box, click Finish. Figure 28. USB Serial Port2 Driver Installation Completion (Windows XP) 5.3 Confirmation of USB Driver Installation After installing the two types of USB drivers, check that the drivers have been installed correctly, according to the procedure below. When using the DemoKit-KA1 board, the information to be checked here is needed. Click the Device Manager tab and then check that the drivers are installed correctly. 25 Figure 29. Device Manager 5.3.1 Windows 98SE/ME Systems Do not select Update and Erase when communicating with the DemoKit-KA1 board. 5.3.2 Windows 2000/XP Systems Do not perform a hardware modification scan when communicating with the DemoKit-KA1 board. Note: In the GUI port list box, the same communication port as COM? of the USB serial port (COM?) needs to be selected. If the drivers above are not displayed, or the mark "×" or "!" is prefixed, refer to the section on “Troubleshooting.” 26 DemoKit-KA1 User’s Manual 5.4 Driver Uninstallation The driver uninstallation program is installed on the host machine when the PG-LPC software is installed. Use the procedure below to uninstall the driver. 1. When using Windows 2000 or Windows XP, log on as the computer administrator. 2. Double-click My Computer → (C:) Program Files → NECTools32 → PG-LPC → DRIVERS → FTDIUNIN.exe. Figure 30. Driver Uninstallation 3. Click Continue. 27 Figure 31. Driver Uninstaller 4. Click Finish to complete driver uninstallation. Figure 32. Completion of Driver Uninstallation Caution: If the PG-LPC software was uninstalled earlier, the Ftdiunin.exe was also deleted. In this case, manually delete "USB Serial Port (COM?)" and "USB High Speed Serial Converter" from the device manager. 28 DemoKit-KA1 User’s Manual 6. PG-LPC Flash Programming Software 6.1 Starting the Software GUI Select PG-LPC.EXE from the Start menu and wait for the main window to appear. Menu bar Figure 33. PG-LCP GUI Software Main Window Programmer parameter window Toolbar Action log window Status bar 29 This window consists of the following: Name Display Information Menu bar (displayed at the top) Toolbar (displayed under the menu bar) Action log window (displayed under the toolbar) Programmer parameter window (displayed to the right of the action log window) Status bar Displays menu items executable by the PG-LPC. Displays frequently used commands as icons. Displays a PG-LPC action log Displays programming parameter settings. Displays status. 6.2 Toolbar The toolbar contains buttons for executing PG-LPC commands. [Device] → [Setup] button [File] → [Load] button [Device] → [Blank Check] button [Device] → [Erase] button [Device] → [Program] button [Device] → [Autoprocedure (EPV)] button 6.3 Menu Bar The menu bar contains a number of command menus. Depending on the device type and its actual status, some commands may be disabled. 6.3.1 File Menu Clicking the File menu displays the Load and Quit commands. Figure 34. File Menu 30 DemoKit-KA1 User’s Manual 6.3.1.1 Load Command The Load command allows you to select a program file. The selected program file is programmed into the flash memory of the device by executing the Program command or Autoprocedure(EPV) command. Figure 35. Open Dialog Box The file selection window for program loading displays the most recently used directory to which a user program has been loaded. After a user program is loaded, a checksum calculation is made and the result is displayed in the programmer parameter window. Clicking the Open button selects a user program to be written to the target device. Clicking the Cancel button closes the window without selecting a program. 6.3.1.2 Quit Command The Quit command terminates the PG-LPC GUI software. Clicking × on the right task bar also terminates the PG-LPC GUI software. User settings are saved in the PG-LPC.INI file, so that the GUI software starts up next time with the same settings. PG-LPC.INI is created in the Windows folder when Windows 98SE, Windows ME, or Windows XP is used. When Windows 2000 is used, PG-LPC.INI is created in the WinNT folder. 6.3.2 Device Menu Clicking the Device menu displays the commands such as Blank Check, Erase and Program for programming operations. 31 Figure 36. Device Menu 6.3.2.1 Blank Check Command The Blank Check command allows you to make a blank check on the 78K0S/KA1+ target machine connected to the PG-LPC. If the flash memory of the device is erased, a blank check is terminated normally. If the flash memory is not completely erased, the indication "not blank" is provided. Before starting programming, erase the flash memory of the target device. 6.3.2.2 Erase Command The Erase command erases the flash memory of the 78K0S/KA1+ device connected to the PGLPC. While the flash memory is being erased, the progress status is displayed in the action log window to indicate programmer operation. Execution of the Blank Check command before the Erase command is executed follows the setting of 'Command options' of the Advance tab displayed by selecting Device → Setup. Upon completion of Erase command execution, the GUI software displays the result of executing the command on the target device. 6.3.2.3 Program Command The Program command sends a specified user program to the target device and writes the program to the flash memory. The execution of Verify operation for detecting an error in user program communication from the PG-LPC to the target device after the execution of the Program command follows the setting of the 'Command options' on the Advance tab displayed by selecting Device → Setup. During programming, the progress status is displayed in the action log window to indicate programmer operation. This progress status display window displays the progress status on target device programming by percentage. Upon completion of Program command execution, the GUI software displays the result of executing the command on the target device. 32 DemoKit-KA1 User’s Manual 6.3.2.4 Verify Command This command is not supported. 6.3.2.5 Security Command This command is not supported. 6.3.2.6 Checksum Command The Checksum command reads the checksum value of the 78K0S/KA1+ device connected with the PG-LPC. This value differs from the value displayed in the parameter window of the main window. 6.3.2.7 Autoprocedure (EPV) Command The Autoprocedure(EPV) command executes the Erase and Program commands in succession. Upon completion of Autoprocedure(EPV) command execution, the GUI software displays the result of executing the command on the target device. 6.3.2.8 Signature Read Command This command is not supported. 6.3.2.9 Setup Command The Setup command allows you to make settings related to flash memory rewriting according to the user environment and to set command options. Each time the GUI software is started, the most recently used parameter file (.PRM) is read and the settings are displayed. The Device Setup dialog box allows you to modify the settings of items other than those consisting of shadowed characters according to the user environment. The Standard tab is used to set the environment for rewriting the flash memory of the target device. The mode of communication with the target, the operating clock, and so forth differ depending on the device used. Figure 37. Device Setup Window: Standard 33 • Clicking OK saves the settings selected on the Standard and Advance tabs and closes the dialog box. • Clicking Cancel closes the dialog box without saving the settings selected on the Standard and Advance tabs. • Parameter file holds parameters and timing data required to rewrite the target device’s flash memory. Do not modify the data in the parameter file because the data is related to the guarantee of rewrite data. The parameter file is protected by the checksum function. If the checksum result indicates an error, PG-LPC does not accept the parameter file. Figure 38. Device Setup: Parameter File Selection Figure 39. Open Dialog Box • The Look in: list displays a list of available .prm files. Select the one you want to open and then click Open. The communication interface to the device box is used to select a channel for communication between the Low Pin Count—Do it! board and host machine. Figure 40. Host Connection Box • The Port list displays the channels available for communication between the Low Pin Count—Do it! board and host machine. Note: Selectable ports can be checked using the Device Manager. For details, refer to “Confirmation of USB Driver Installation.” • The Speed list enables you to select a rate for the selected communication channel. • The Supply oscillator box is used to select a clock that determines the programming frequency and data transfer rate. Selecting a frequency sets the clock frequency of the target system, which can vary from one device to another. Be sure to check the specifications for the device used before making a selection. Selecting a multiply rate specifies the division rate or multiplication rate of the target device. If the target device has an on-chip phase34 DemoKit-KA1 User’s Manual locked loop (PLL) circuit, enter a division rate or multiplication rate according to the use environment. Division and multiplication rates differ depending on the device, so be sure to check the specifications of the device used before choosing a rate. If the target device does not have an on-chip PLL circuit, select "1.0". On the initial screen, the default setting is displayed according to the parameter file. Figure 41. Supply Oscillator Box The Operation Mode box enables you to divide the flash memory of some target devices into blocks or areas. Some devices do not have the block and area division modes, and some have only one mode. In these cases, modes that don’t exist cannot be selected. Figure 42. Operation Mode • Choosing Chip subjects the entire flash memory area of the target device to rewrite processing. • Choosing Block requires you to specify range using the Start and End lists. The block of flash memory specified is then subject to reconfiguration. • Selecting Area requires you to specify a range using the Start and End lists. The specified area of flash memory is then subject to reconfiguration. • Selecting Show Address displays the addresses in the Start and End lists. If this check box is not checked, numbers are displayed. The Advance setup tab is used to specify the command options and security flag settings. When "Advance" is clicked, the following window is displayed: 35 Figure 43. Advance Tab The Command options box is used to specify the PG-LPC flash processing command options. Figure 44. Command Options Box • Selecting the Blank check before Erase box executes a Blank Check command before an Erase command or EPV command is executed. If the result of a blank check indicates OK, erase processing is not executed. • Security flag after Program box: Not usable • Selecting the Checksum after Program box reads the flash memory checksum value of the target device after execution of a Program and EPV command. This value differs from the value displayed in the parameter window of the main window. 6.3.3 View Menu Clicking the View menu displays the Toolbar and Status Bar commands. Figure 45. [View Menu 6.3.3.1 Toolbar Command Checking the Toolbar command displays the toolbar. Unchecking the command hides the toolbar. 36 DemoKit-KA1 User’s Manual 6.3.3.2 Status Bar Command Checking the Status Bar command displays the status bar. Unchecking the command hides the status bar. 6.3.4 Help Menu Clicking the Help menu displays the About PG-LPC… command. Figure 46. Help Menu Clicking the About PG-LPC command displays information about the PG-LPC program. To terminate the display, click OK. Figure 47. About PG-LPC Window 6.4 Programmer Parameter Window This window displays the settings of the programming parameters. 37 Figure 48. Programmer Parameter Window • Device: Updated after communication with the target device to display information about the target device. • Parameter file: Updated after Setup command execution to display information about a read parameter file. • Load file: Updated after Load command execution to select information about a selected program file. • Connection to device: Updated after Setup command execution to display information about the connection with the target device. 38 DemoKit-KA1 User’s Manual 7. Using the PG-LPC Flash Programming Software This section explains the basic operations of the PG-LPC GUI for programming the DemoKit-KA1 board. This chapter covers how to start the system, execute the EPV command, and program the target device µPD78F9222 mounted on the DemoKit-KA1 board. The conditions of the series of operations described in this section are as follows: Target board :DemoKit-KA1 Target device :µPD78F9222 Clock :8 MHz Voltage level :5V PG-LPC − Parameter file :78F9222.PRM − Clock setting :8 MHz (multiplied by 1) − Port :COM4 (115200 bps) − Operation mode :Chip − Write HEX :Light_demo.hex − Option setting :Blank check before Erase 7.1 Installing the PG-LPC GUI Software Install the PG-LPC GUI software on the host machine you are using, by referring to the section on “Software Installation” (if the software has not been installed yet). 7.2 Installing the Driver Install the USB driver on the host machine you are using by referring to the section on “Software Installation” (if the driver has not been installed yet). 7.3 Installing the Parameter File The parameter file for the µPD78F9222 device is installed automatically during PG-LPC installation in the PG-LPC install-path\PRM folder. Nevertheless, newest version of parameter file for the µPD78F9222 device can by downloaded from http://www.necelam.com/microcontrollers/devtools.php. 39 7.4 Connecting and Starting 1. Set the DemoKit-KA1 board to the flash programming mode by switching SW3/S1 to ON. The recommended configuration of connectors CN1, CN2 and CN12 is shown below: SW3 Setting CN1 Jumper setting S1 S2 S3 S4 ON Don’t care Don’t care Don’t care 1-2 3-5 4-6 Open Closed Closed CN12 Jumper Setting CN2 Jumper Setting 1-2 3-4 5-6 7-8 9-10 Closed Don’t care Don’t care Don’t care Don’t care 1-2 3-4 5-6 7-8 9-10 Closed Don’t care Don’t care Don’t care Don’t care 2. The Plug and Play function connects the board with the host machine via the USB cable. 40 DemoKit-KA1 User’s Manual 3. Start the PG-LPC GUI. Figure 49. PG-LPC Main Window 4. Set the programming environment by selecting Device → Setup to display the Standard tab in the Device Setup box. Figure 50. Device Setup: Standard Tab 5. Click PRM File Read to display the Open dialog box. 41 6. Select 78F9222.prm and then click Open. Figure 51. Parameter File Selection 7. From the Port list, select the communication port that matches the host machine being used. Select the communication speed of the host connection. Figure 52. Port Selection Note: Selectable ports can be checked using Device Manager. For details, refer to “Confirmation of USB Driver Installation.” 42 DemoKit-KA1 User’s Manual 8. Set "Supply oscillator" according to the specifications of the DemoKit-KA1 board: Frequency = 8.00 MHz Multiply rate = 1.00 Operation Mode = Chip Figure 53. Device Setup: Settings for Standard Tab 9. Switch to the Advance tab. Figure 54. Advance Tab: Device Setup Dialog Box 43 7.5 Command Options 7.5.1 Executing a Blank Check Before Erase Command Click OK to set parameters for the GUI software and display the following dialog box. Figure 55. Completion of Parameter Setting "PRM File Read OK." is displayed. The display is updated. 7.5.2 Selecting and Opening a User Program Click File → Load → Open to select and open a file to be written to the target device. 44 DemoKit-KA1 User’s Manual Figure 56. After Downloading "Success read HEX file." is displayed. The display is updated. 7.5.3 Executing the Autoprocedure(EPV) Command Click Device → Autoprocedure(EPV) to execute the automatically execute the Blank Check → Erase → Program commands in sequence on the µPD78F9222 device. 45 Figure 57. After EPV Execution "...finish" is displayed. 7.5.4 Terminating the GUI Select File → Quit to terminate the GUI software. All settings executed so far are saved in the PG-LPC.INI file, so that those settings can be reused when the GUI software is restarted. 7.5.5 Executing “LIGHT_DEMO” Application Set the DemoKit-KA1 board to normal operation by switching SW3/S1 to OFF. The Plug and Play function will then initialize the board in normal operating mode. 7.5.6 Restarting the GUI When the system restarts, the main window appears. 46 DemoKit-KA1 User’s Manual 8. TROUBLESHOOTING In driver installation, recognition based on Plug and Play is disabled. Cause: The USB connector may not be inserted normally into the USB port of the personal computer. Action: Check that the USB connector is inserted fully into the USB port of the personal computer. Alternatively, disconnect the USB connector, then insert the USB connector again after a while. The driver file cannot be found at a specified location. Cause: The PG-LPC software of the DemoKit-KA1 board may not be installed correctly. Action: Install the GUI software again by referring to “Software Installation.” In checking by Device Manager, "USB Serial Port" or "USB High Speed Serial Converter" is not displayed. Alternatively, the "!" or "×" is prefixed. Cause: The USB connector may not be inserted normally into the USB port of the personal computer. Action: Check that the USB connector is inserted fully into the USB port of the personal computer. Alternatively, disconnect the USB connector from the USB port, and then insert the USB connector again after a while. Cause: The driver may not be installed correctly. Action: 10. When this product is connected to the personal computer, right-click the driver marked with "!" or "×". 11. Click Erase when displayed. 12. On the Device Manager, execute Hardware Modification Scan. 13. Install the driver again with Plug and Play. Cause: The device may not be recognized (in the case of connection with the USB hub). 47 Action: Try the following: Disconnect the USB connector, and then insert the USB connector again. Connect the USB connector to another port of the USB hub. If the same symptom occurs, do not use the USB hub, but directly connect the connector to the USB port of the personal computer. When this product is connected with a personal computer, the "Add New Hardware Wizard" screen is displayed. Cause: If the USB connector of this product is inserted not into the USB port used at the installation time but into another USB port, this product may be recognized as a new hardware item. Action: Install the driver by referring to section 7.2. Communication with the DemoKit-KA1 board is disabled. Cause: The driver may not be installed correctly. Action: Check if "USB Serial Port" and "USB High Speed Serial Converter" are installed correctly by referring to section 7.2. Cause: The Port list box may not be set correctly. Action: Set the port checked using Device Manager. Cause: The power, clock or reset signal may not be supplied to the 78K0S/KA1+ device correctly. Action: 14. Check that the clock is supplied to the 78K0S/KA1+ device, connector CN1. 15. Check that the power is supplied to the 78K0S/KA1+ device, connector CN12. 16. Check that the CPLD reset signal is supplied to the 78K0S/KA1+ device, connector CN2. Cause: The PRM file selected in [Device Setup] may be incorrect. 48 DemoKit-KA1 User’s Manual Action: Use the 78F9222.prm that matches the DemoKit-KA1 target device. For information about the PRM file, refer to section 7. Cause: The setting of "Supply oscillator" in the Device Setup dialog box may be incorrect. Action: Make a correct setting according to the specifications of the target device. 49 9. Sample Programs 9.1 General Introduction Each of the sample programs is located in a single directory, which will be called main-directory of the sample. The five sample projects files are included in one NEC Electronics workspace file named “LPC_Demo.prw”. Table 2. Example directory structure A/D converter demonstration Light show Reaction time measurement Timer demonstration UART demonstration Workspace setting file NEC Electronics workspace file A main directory of each sample contains the project inclusive all output files of the development tools. All sample programs use the same directory structure: Table 3. Example structure Make file Project file Individual workspace file C source file Output files for DemoKit-KA1 board (i.e. Intel HEX file) Output load module file, linker Map file Parameter file for compiler Object module file The main directory contains the project files for PM+ and the corresponding C source file. All output files of the development tools for each target are generated. To open PM+ for a sample program, double-click the LPC_Demo.prw workspace file in the SamplePrograms directory. This will include all sample programs in one workspace. For details about using Applilet and SM+, refer to their respective manuals. Also note that the execution time in SM+ is based on the performance of the computer, so please set the “sim” variable and recompile code. 50 DemoKit-KA1 User’s Manual Figure 58. NEC Electronics Project Manager Plus (PM+) 78K0/K0S 51 Figure 59. NEC Electronics System Simulator (SM+) 78K0S 9.2 ADC Demo This sample program simulates a simple voltage meter. Using the integrated A/D converter, the program measures the voltage supplied to the converter on input channel 0, port P20/ANI0. The potentiometer R24 adjusts the input voltage, and the board shows the measured voltage by flashing the D1–D4 LEDs. Used Internal Peripherals Used External Parts Timer80 A/D converter LEDs D1–D4 Potentiometer R24 Button SW2 To run the ADC demo, set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: 52 DemoKit-KA1 User’s Manual SW3 Setting CN1 Jumper Setting S1 S2 S3 S4 OFF OFF OFF OFF 1-2 3-5 4-6 Open Closed Closed CN12 Jumper Setting CN2 Jumper Setting 1-2 3-4 5-6 7-8 9-10 Closed Closed Closed Don’t care Don’t care 1-2 3-4 5-6 7-8 9-10 Closed Closed Don’t care Don’t care Don’t care 9.3 Light Demo This sample programs plays one of eight predefined lightshows. After the program-start-signal, the program plays the first lightshow. By pressing button SW1 the next show is selected. Pressing button SW2 restarts the application. Used Internal Peripherals Used External Parts Timer80 D1–D4 LEDs Button SW1 Button SW2 To run the Light demo please set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: 53 SW3 S1 S2 S3 S4 Setting OFF OFF OFF OFF CN1 1-2 3-5 4-6 Jumper setting open closed closed CN12 Jumper Setting CN2 Jumper Setting 1-2 3-4 5-6 7-8 9-10 Closed Don’t care Don’t care Don’t care Don’t care 1-2 3-4 5-6 7-8 9-10 Closed Closed Closed Don’t care Don’t care Note: To run light demo with SM+, modify the sim variable to 1 and then compile the code. Set sim to 0 to run on flash device. The execution time on SM+ will be a lot faster; hence, setting the sim variable in the code is required. 9.4 ReacTime Demo This sample program demonstrates a reaction time measurement. The application starts by flashing D1– D4 LEDs two times. After a press of button SW1, the application waits for a random time between 0.50 and 3.45 seconds. Then D4 LED switches on and measurement starts by incrementing a reaction counter every 50 ms. The actual counter value is shown by D1–D4 (binary format) until you press the SW1 button again. After the press is detected, measurement stops and the reaction time is shown by flashing the D1–D4 LEDs. Pressing button SW2 starts a new measuring cycle. Used Internal Peripherals Used External Parts Timer80 TimerH1 LED’s D1- D4 Button SW1 Button SW2 To run the ReacTime demo, set the configuration of switch SW3 and connectors CN1, CN2 and CN12 as follows: 54 DemoKit-KA1 User’s Manual SW3 Setting CN1 Jumper Setting S1 S2 S3 S4 OFF OFF OFF OFF 1-2 3-5 4-6 Open Closed Closed CN12 Jumper Setting CN2 Jumper Setting 1-2 3-4 5-6 7-8 9-10 Closed Don’t care Don’t care Don’t care Don’t care 1-2 3-4 5-6 7-8 9-10 Closed Closed Closed Don’t care Don’t care 9.5 Timer Demo This sample program simulates a darkroom timer. The board starts after reset flashing all LEDs. After first key press of SW1, the board starts counting up expose times in unit of minutes (binary output format). Pressing SW1 a second time selects the shown elapse time and starts the counting. After the selected time is finished, the LEDs flash 20 times to display the elapse time and stop mode is entered. Pressing SW1 releases stop mode. Used Internal Peripherals Used External Parts Timer80 TimerH1 D1–D4 LEDs Button SW1 Button SW2 To run the Timer demo please set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: 55 SW3 Setting CN1 Jumper Setting S1 S2 S3 S4 OFF OFF OFF OFF 1-2 3-5 4-6 Open Closed Closed CN12 Jumper Setting CN2 Jumper Setting 1-2 3-4 5-6 7-8 9-10 Closed Don’t care Don’t care Don’t care Don’t care 1-2 3-4 5-6 7-8 9-10 Closed Closed Closed Don’t care Don’t care Note: To run timer demo with SM+, modify the sim variable to 1 and then compile the code. Set sim to 0 to run on flash device. Note that in SM+, the execution timing will not be correct and will run a lot faster. 9.6 UART Demo This sample program simulates a voltage meter with serial communication channel. The sample program does a cyclic measurement of the input voltage of AD converter channel 0, port P20/ANI0, and transfers the measured result via UART6 to a terminal program running on the host machine. The data transfer speed is set to 115200 bps per default. The input voltage can be changed by potentiometer R24. Used Internal Peripherals Used External Parts Timer80 A/D converter UART6 D1–D4 LEDs Button SW2 To run the UART demo, set the configuration of switch SW3 and connectors CN1, CN2 and CN12 as follows: 56 DemoKit-KA1 User’s Manual SW3 Setting CN1 Jumper Setting S1 S2 S3 S4 OFF ON OFF OFF 1-2 3-5 4-6 Open Closed Closed CN12 Jumper setting CN2 Jumper setting 1-2 3-4 5-6 7-8 9-10 Closed Closed Closed Closed Closed 1-2 3-4 5-6 7-8 9-10 Closed Closed Don’t care Don’t care Don’t care 57 10. Connectors and Cables Figure 60. Connector CN7, USB Mini-B Type Host Connector Pin Configuration 1 Table 4. USB Connector CN7 5 Pin Configuration of USB Connector CN7 Signal Name 1 2 3 4 5 VBUS DM DP N.C. GNDBUS For connection with the host machine, use a USB cable (Mini-B type). For confirmation, NEC Electronics used only the USB cable delivered with the DemoKit-KA1 board. 10.1 USB Interface Cable (Mini-B type) 58 DemoKit-KA1 User’s Manual Figure 61. USB Interface Cable (Mini-B type) 59 11. Schematics Note: Schematics also are available on CD-ROM directory \Doc\DemoKit-KA1_SCHEMATICS.pdf 60