To our customers, Old Company Name in Catalogs and Other Documents On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding. Renesas Electronics website: http://www.renesas.com April 1st, 2010 Renesas Electronics Corporation Issued by: Renesas Electronics Corporation (http://www.renesas.com) Send any inquiries to http://www.renesas.com/inquiry. Notice 1. 2. 3. 4. 5. 6. 7. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website. Renesas 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 Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. When exporting the products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and “Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application categorized as “Specific” without the prior written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as “Specific” or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise expressly specified in a Renesas Electronics data sheets or data books, etc. “Standard”: 8. 9. 10. 11. 12. Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots. “High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anticrime systems; safety equipment; and medical equipment not specifically designed for life support. “Specific”: Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas Electronics. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries. (Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majorityowned subsidiaries. (Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics. User’s Manual Low Pin Count – Do it! Demonstration Kit for the NEC Low Pin Count Devices Global Document No. U18139EE1V0UM00 (1st edition) Document No. LPCDOITV100 Date Published December 2004 NEC Electronics (Europe) GmbH Low Pin Count – Do it! ・ The information in this document is current as of 27.12.2004. 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 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 customerdesignated “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, antidisaster 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 2 Low Pin Count – Do it! Low Pin Count - Do it! complies with the EMC protection requirements WARNING This is a ‘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 3 Low Pin Count – Do it! Revision History Date 27-12-2004 Revision V1.00 Chapter --- Description First release 4 Low Pin Count – Do it! Table of Contents 1. Introduction ....................................................................................................................... 9 1.1 1.2 1.3 Main features of Low Pin Count – Do it! ..................................................................................... 9 System requirements ................................................................................................................. 10 Package contents....................................................................................................................... 10 2. Low Pin Count - Do it! system configuration................................................................. 11 2.1 2.2 2.3 Low Pin Count - Do it!................................................................................................................ 11 Host computer............................................................................................................................ 11 Power supply via USB interface ................................................................................................ 11 3. Low Pin Count - Do it! board components .................................................................... 12 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 Configuration switch SW3 ......................................................................................................... 12 Operation mode selection SW3/S1............................................................................................ 13 UART selection SW3/S2 ........................................................................................................... 13 Clock mode selection SW3/S3 .................................................................................................. 13 UART mode selection SW3/S4.................................................................................................. 13 User button SW1 ........................................................................................................................ 14 Start button SW2 ........................................................................................................................ 14 USB interface connector CN7 .................................................................................................... 14 Connector CN1 / Clock configuration ....................................................................................... 14 Connectors CN2 / CN12 / external peripheral configuration.................................................... 15 External Potentiometer R24 ....................................................................................................... 15 AD converter reference voltage input ....................................................................................... 15 External LED’s D1–D4 ................................................................................................................ 15 External connectors CN3,CN4, CN5, and CN6 ........................................................................ 16 4. 78K0S/KA1+ memory map .............................................................................................. 17 5. Low Pin Count - Do it! installation and operation ......................................................... 18 5.1 Getting started............................................................................................................................ 18 5.1.1 CD-ROM contents ..................................................................................................................... 18 6. Hardware installation ...................................................................................................... 19 7. Software installation........................................................................................................ 19 7.1 7.2 7.3 7.4 7.4.1 7.4.2 7.4.3 7.5 IAR Systems Embedded Workbench for 78K0/78K0S installation .......................................... 19 PG-LPC FLASH programming GUI installation ........................................................................ 19 Sample program installation ..................................................................................................... 19 Driver Installation ....................................................................................................................... 20 Installation on Windows 98SE/Me.............................................................................................. 20 Installation on Windows 2000 .................................................................................................... 22 Installation on Windows XP ....................................................................................................... 28 Confirmation of USB Driver Installation ................................................................................... 33 5 Low Pin Count – Do it! 7.6 Driver Uninstallation .................................................................................................................. 34 8. PG-LPC FLASH programming software ......................................................................... 36 8.1 8.2 8.3 8.3.1 8.3.2 8.3.3 8.3.4 8.4 Starting up the GUI Software..................................................................................................... 36 Toolbar........................................................................................................................................ 37 Menu Bar..................................................................................................................................... 38 [File] menu ................................................................................................................................ 38 [Device] menu ........................................................................................................................... 39 [View] menu .............................................................................................................................. 46 [Help] menu............................................................................................................................... 47 Programmer Parameter Window ............................................................................................... 48 9. How to use PG-LPC FLASH programming software ..................................................... 49 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Installing the PG-LPC GUI software .............................................................................................. 49 Installing the driver........................................................................................................................ 49 Installing the parameter file ........................................................................................................... 49 Connecting and starting ................................................................................................................ 50 Setting the programming environment .......................................................................................... 51 Selecting a user program .............................................................................................................. 54 [Autoprocedure(EPV)] command execution................................................................................... 55 Terminating the GUI ..................................................................................................................... 55 Execute “LIGHT_DEMO” application............................................................................................. 55 Restarting the GUI ...................................................................................................................... 55 10. TROUBLESHOOTING .................................................................................................... 56 11. Sample programs .......................................................................................................... 58 11.1 11.2 11.3 11.4 11.5 11.6 General Introduction ................................................................................................................ 58 ADC demo ................................................................................................................................. 60 Light demo................................................................................................................................ 61 ReacTime demo........................................................................................................................ 62 Timer demo............................................................................................................................... 63 UART demo............................................................................................................................... 64 12. Connectors and Cables................................................................................................. 65 12.1 12.2 USB host connector CN7 ......................................................................................................... 65 USB interface cable (Mini-B type)............................................................................................ 66 13. Schematics .................................................................................................................... 67 6 Low Pin Count – Do it! List of Figures Figure 1: Low Pin Count - Do it! system configuration............................................................................ 11 Figure 2: Low Pin Count - Do it! board connectors, switches and LED’s................................................. 12 Figure 3: Add New Hardware Wizard (Windows 98SE )......................................................................... 20 Figure 4: Search Method (Windows 98SE) ............................................................................................ 20 Figure 5: Search Location Specification (Windows 98SE)...................................................................... 21 Figure 6: Checking Driver to Be Installed (Windows 98SE).................................................................... 21 Figure 7: Installation Completion (Windows 98SE) ................................................................................ 22 Figure 8: Found New Hardware Wizard 1 (Windows 2000) .................................................................... 22 Figure 9: Search Method 1 (Windows 2000) .......................................................................................... 23 Figure 10: Driver File Location 1 (Windows 2000) ................................................................................. 23 Figure 11: Address Specification 1 (Windows 2000) .............................................................................. 24 Figure 12: Driver File Search 1 (Windows 2000) ................................................................................... 24 Figure 13: USB Driver Installation Completion 1 (Windows 2000).......................................................... 25 Figure 14: Found New Hardware Wizard 2 (Windows 2000) .................................................................. 25 Figure 15: Search Method 2 (Windows 2000) ........................................................................................ 26 Figure 16: Driver File Location 2 (Windows 2000) ................................................................................. 26 Figure 17: Address Specification 2 (Windows 2000) .............................................................................. 27 Figure 18: Driver File Search 2 (Windows 2000) ................................................................................... 27 Figure 19: USB Driver Installation Completion 2 (Windows 2000).......................................................... 28 Figure 20: Found New Hardware Wizard 1 (Windows XP) ..................................................................... 28 Figure 21: Search Location Specification 3 (Windows XP)..................................................................... 29 Figure 22: Windows XP Logo Testing 3 (Windows XP) .......................................................................... 29 Figure 23: USB Driver Installation Completion 1 (Windows XP)............................................................. 30 Figure 24: Found New Hardware Wizard 2 (Windows XP) ..................................................................... 30 Figure 25: Search Location Specification 2 (Windows XP)..................................................................... 31 Figure 26: Windows XP Logo Testing 2 (Windows XP) .......................................................................... 31 Figure 27: USB Serial Port2 Driver Installation Completion (Windows XP) ............................................ 32 Figure 28: Device Manager ................................................................................................................... 33 Figure 29: Driver Uninstallation ............................................................................................................. 34 Figure 30: Driver Uninstaller.................................................................................................................. 34 Figure 31: Completion of Driver Uninstallation....................................................................................... 35 Figure 32: PG-LCP GUI Software Main Window.................................................................................... 36 Figure 33: [File] Menu .......................................................................................................................... 38 Figure 34: HEX File Selection Window .................................................................................................. 38 Figure 35: [Device] Menu ...................................................................................................................... 39 Figure 36: Device Setup Window - Standard ......................................................................................... 41 Figure 37: Setup Window - Parameter File Selection............................................................................. 42 Figure 38: Parameter File Selection Window......................................................................................... 42 Figure 39: Setup Window - Communication interface to device ............................................................. 43 Figure 40: Setup Window - Supply Oscillator Selection ......................................................................... 43 Figure 41: Setup Window - Operation Mode .......................................................................................... 44 Figure 42: Device Setup Window - Advance......................................................................................... 45 Figure 43: Setup Window - Command options....................................................................................... 45 Figure 44: [View] Menu.......................................................................................................................... 46 Figure 45: [Help] Menu .......................................................................................................................... 47 Figure 46: About PG-LPC Window ........................................................................................................ 47 Figure 47: Programmer Parameter Window .......................................................................................... 48 Figure 48: GUI Software Startup Screen................................................................................................ 51 Figure 49: <Standard Device Setup> Dialog Box................................................................................... 51 Figure 50: Parameter File Selection ...................................................................................................... 52 Figure 51: Port Selection ....................................................................................................................... 52 Figure 52: <Standard Device Setup> Dialog Box after Setting............................................................... 53 Figure 53: <Advance Device Setup> Dialog Box ................................................................................... 53 Figure 54: Completion of Parameter Setting.......................................................................................... 54 Figure 55: After Downloading ................................................................................................................ 54 Figure 56: After EPV Execution............................................................................................................. 55 Figure 57: IAR Systems Embedded Workbench 78K0/K0S ................................................................... 59 Figure 58: IAR System 78K0/K0S C-SPY Simulator .............................................................................. 59 Figure 59: Connector CN7, USB Mini-B Type Host Connector Pin Configuration ................................... 65 Figure 60: USB interface cable (Mini-B type)......................................................................................... 66 Figure 61: Low Pin Count - Do it! board schematics............................................................................... 67 7 Low Pin Count – Do it! List of Tables Table 1: Configuration switch SW3, factory settings .............................................................................. 12 Table 2: Operation mode selection SW3/S1 .......................................................................................... 13 Table 3: UART selection SW3/S2.......................................................................................................... 13 Table 4: Clock mode selection SW3/S3................................................................................................. 13 Table 5: UART mode selection, SW3/S4............................................................................................... 13 Table 6: Connector CN1, clock configuration ......................................................................................... 14 Table 7: Connector CN2, external peripheral configuration .................................................................... 15 Table 8: Connector CN12, external peripheral configuration .................................................................. 15 Table 9: LED D1-D4 connection ............................................................................................................ 15 Table 10: External connectors CN3, CN4, CN5 and CN6....................................................................... 16 Table 11: 78K0S/KA1+ memory map .................................................................................................... 17 Table 12: Low Pin Count - Do it! CD-ROM directory structure................................................................ 18 Table 13: Toolbar Buttons ..................................................................................................................... 37 Table 14: Example directory structure ................................................................................................... 58 Table 15: Example structure.................................................................................................................. 58 Table 16: Pin Configuration of USB Connector CN7 .............................................................................. 65 8 Low Pin Count – Do it! 1. Introduction Low Pin Count – Do it! is a demonstration kit for the NEC’s 78K0S Low Pin Count microcontrollers. It supports onboard FLASH programming and real time execution of application programs up to 4 kBytes based on the 78K0S/KA1+ Low Pin Count microcontroller. The board is prepared to be connected to user hardware parts such as digital I/O or analogue signals. 1.1 Main features of Low Pin Count – Do it! • Easy to use device demonstration capabilities Low Pin Count - Do it! contains elements to easily demonstrate simple I/O-functions, i.e. push buttons, LED output, AD reference voltage, I/O lines, UART interface. • Power supply via USB interface Low Pin Count - Do it! is powered via USB interface, no separate power supply is needed. • PG-LPC, FLASH programming software A windows based FLASH programming software allows to select and download application programs to Low Pin Count - Do it! board for evaluation purposes. • Analogue to digital signal conversion is supported • Various input / output signals available, such as ° ° ° ° ° ° All I/O ports prepared to be connected to user hardware Timer input / output signals UART interface, via USB UART chip FT232 4 analogue input lines 4 I/O ports connected to LED’s 1 push button prepared for external interrupt generation • The IAR Embedded Workbench for 78K0/78K0S and the IAR C-SPY simulator are included. These packages are restricted in such that maximum program code size is limited to 4 kByte of program code. • Full documentation is included for the NEC 78K0S/KA1+ microcontroller, IAR Systems Embedded Workbench, IAR Systems C-SPY simulator and PG-LPC FLASH programming software. Low Pin Count - Do it! is not intended for code development. NEC does not allow and does not support in any way any attempt to use Low Pin Count - Do it! in a commercial or technical product. 9 Low Pin Count – Do it! 1.2 System requirements HOST PC A PC supporting Windows 98SE, Windows ME, Windows 2000 or Windows XP is required for the IAR Systems Embedded Workbench demo-version and the PG-LPC FLASH programming software. Pentium 166 MHz (at least), 64 MB of RAM, 256-color display (1024 * 768), mouse, CD-ROM drive and 40 Mbytes of free hard disk space are required to install the tool packages. Above listed requirements are valid if the IAR Systems Embedded Workbench and the PG-LPC FLASH programming software shall be installed. Host interface USB interface that enables communication based on USB (Ver1.1 or later) 1.3 Package contents Please verify that you have received all parts listed in the package contents list attached to the Low Pin Count - Do it! package. If any part is missing or seems to be damaged, please contact the dealer from whom you received your Low Pin Count - Do it!. Note: Updates to this User Manual, additional documentation and/or utilities for Low Pin Count - Do it!, if available, may be downloaded from the NEC WEB page(s) at http://www.ee.nec.de/updates. 10 Low Pin Count – Do it! 2. Low Pin Count - Do it! system configuration The Low Pin Count - Do it! system configuration is given in the diagram below: Figure 1: Low Pin Count - Do it! system configuration 2.1 Low Pin Count - Do it! Low Pin Count - Do it! is a demonstration kit for the NEC 78K0S Low Pin Count devices. The µPD78F9222 microcontroller is a typical device from this family and it has been used to realise the Low Pin Count - Do it!. The Low Pin Count - Do it! board is connected to the host system via USB interface cable. The host system may be used for programming of µPD78F9222 FLASH memory and to allow execution of application programs on Low Pin Count - Do it! platform. Low Pin Count - Do it! runs the µPD78F9222 microcontroller at 8.00 MHz operating speed. 2.2 Host computer The USB host interface enables communication to the Low Pin Count - Do it! board. The USB UART chip FT232 allows application software to access the USB device in the same way as it would access a standard RS232 interface. The FTDI's Virtual COM Port ( VCP ) driver appears to the windows system as an extra Com Port, in addition to any existing hardware Com Ports. For a detailed specification of the host interface please refer to the chapter “Connectors and Cables” of this document. 2.3 Power supply via USB interface Low Pin Count - Do it! is powered by USB interface, no separate power supply is needed. The USB interface provides the Low Pin Count - Do it! board with 5V supply voltage. 11 Low Pin Count – Do it! 3. Low Pin Count - Do it! board components The Low Pin Count - Do it! board is equipped with push buttons, LED’s and with several connectors in order to be connected to host computers or connect any target hardware. Additionally the Low Pin Count - Do it! board provides a wire wrap field (2,54 mm grid) to integrate user application hardware. Figure 2: Low Pin Count - Do it! board connectors, switches and LED’s All of the Low Pin Count - Do it! µPD78F9222 on-chip resources are free for user application hardware and software. Please read the user’s manual of the 78K0S/KA1+ device carefully to get information about the electrical specification of the available I/O ports before you connect any external signal to the Low Pin Count - Do it! board! 3.1 Configuration switch SW3 The different operation modes of the Low Pin Count - Do it! board can be set by SW3 switches S1-S4. SW3 S1 S2 S3 S4 Factory settings OFF OFF OFF OFF Function Normal operation mode No UART CPU clock = 8 MHz No handshake for UART Table 1: Configuration switch SW3, factory settings 12 Low Pin Count – Do it! 3.1.1 Operation mode selection SW3/S1 SW3 switch S1 controls the operation mode of the Low Pin Count - Do it! board. Setting SW3/S1 to ON allows to reprogram the internal FLASH memory of the 78K0S/KA1+ device using the PG-LPC FLASH programming software. SW3, S1 OFF (default) ON Operation mode Normal operation mode FLASH memory programming mode Table 2: Operation mode selection SW3/S1 Within normal operation mode the user program stored in the FLASH memory of 78K0S/KA1+ device is executed. 3.1.2 UART selection SW3/S2 SW3 switch S2 controls the serial communication of Low Pin Count - Do it! board. The UART6 signals RxD6 and TxD6 are connected to the FT232 interface lines when setting SW3/S2 to ON. SW3, S2 OFF (default) ON Operation mode RxD6 / TxD6 disconnected RxD6 / TxD6 connected to FT232 interface lines Table 3: UART selection SW3/S2 3.1.3 Clock mode selection SW3/S3 SW3 switch S3 controls the clock operation frequency of the Low Pin Count - Do it! board. SW3, S3 OFF (default) ON Operation mode Clock frequency = 8 MHz Clock frequency = 4 MHz Table 4: Clock mode selection SW3/S3 3.1.4 UART mode selection SW3/S4 SW3 switch S4 controls the UART communication mode of Low Pin Count - Do it! board. Setting SW3/S4 to ON enables UART communication with handshake. Within this mode the CPU pins P40 and P41 are connected to the FT232 interface lines and used as RTS and CTS control signals. SW3, S4 OFF (default) ON Operation mode UART communication without handshake UART communication with handshake (P40=RTS; P41=CTS) Table 5: UART mode selection, SW3/S4 13 Low Pin Count – Do it! 3.2 User button SW1 SW1 is a push button connecting VSS to external interrupt input INTP0 of the CPU. This is equal to port P30 of the 78K0S/KA1+ CPU. The port may be programmed to generate interrupt INTP0. The necessary initialisation for this purpose is described in the user’s manual of the 78K0S/KA1+device. Pressing this button will apply low signal level at port P30. 3.3 Start button SW2 SW2 is a reset button. It activates the power on reset. It is connected to the reset input of the CPU. Pressing this button will apply low signal level at the RESET pin. 3.4 USB interface connector CN7 CN7 connector allows connecting the PG-LPC FLASH programming software to the Low Pin Count - Do it! board in order to program application programs into the CPU internal flash. The board power supply of 5V is also provided by connector CN7. Additionally connector CN7 connects 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 Low Pin Count - Do it! board. Closing the connectors CN1/3-5 and CN1/4-6 (default setting) provides 8 MHz clock frequency to the 78K0S/KA1+ device. In this mode the clock frequency is supplied by the CPLD. Alternative an external crystal oscillator can be equipped to the Low Pin Count - Do it! board. To use this operation mode close connectors CN1/1-3 and CN1/2-4. CN1 1-2 3-5 4-6 1-3 2-4 5-6 Jumper setting open (default) closed (default) closed (default) closed closed open Mode Clock frequency = 8 MHz, supplied by CPLD Clock supply by external oscillator. By using this mode be sure to equip a crystal oscillator and corresponding capacitors to X1, C12 and C11. Table 6: Connector CN1, clock configuration 14 Low Pin Count – Do it! 3.6 Connectors CN2 / CN12 / external peripheral configuration Connectors CN2 and CN12 allow connecting and disconnecting of the external board hardware to the 78K0S/KA1+ device. CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting closed (default) closed (default) closed (default) closed (default) closed (default) Mode 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) Table 7: Connector CN2, external peripheral configuration CN12 1-2 Jumper setting closed (default) 3-4 5-6 7-8 closed (default) closed (default) closed (default) 9-10 closed (default) Mode Power supply, Vcc=5V connected to 78K0S/KA1+ 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) Table 8: Connector CN12, external peripheral configuration 3.7 External Potentiometer R24 A 10k potentiometer R24 is connected between Vcc and ground. Vcc is supplied to R24 by closing connector CN12/1-2. The potentiometer arm can be connected to the ANI0 analogue input of the 78K0S/KA1+ device by closing connector CN12/5-6. 3.8 AD converter reference voltage input The reference voltage of the potentiometer R24 can be supplied to the AVREF input by closing connector CN12/3-4. 3.9 External LED’s D1–D4 The LED’s D1-D4 are connected to the 78K0S/KA1+ device and are free for user application purposes. The LED’s are connected via a 4,7k Pull-up resistor to Vcc and therefore active low. Port P23 P130 P45 P123 LED D1 D2 D3 D4 Table 9: LED D1-D4 connection For disconnecting a LED from a port for alternative usage cut the connection (default) of the corresponding soldering bridge SB1-SB4. 15 Low Pin Count – Do it! 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 Low Pin Count - Do it! board provides a wire wrap field - connectors CN4, CN5 and CN6 - allowing the integration of additional application hardware. Table 10: External connectors CN3, CN4, CN5 and CN6 CN3 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC VCC CN3 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 AVREF P20 P21 P22 P23 P130 P45 P44 P43 P42 P41 P40 P30 P31 RESET VDD P123 N.C. N.C. VSS CN6 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 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. CN6 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 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. CN5 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 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. CN5 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 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. CN4 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 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. CN4 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 (N.C. = Not Connected) 16 Low Pin Count – Do it! 4. 78K0S/KA1+ memory map The memory layout of the µPD78F9222 4 kByte FLASH ROM device is shown in the table below. 0xFFFF SFR Area 256 x 8 bits Address area 0xFF00 0xFEFF Free for application software Internal high speed RAM 256 x 8 bits 0xFE00 0xFDFF Use prohibited 0x1000 0x0FFF Flash memory 4096 x 8 bits Free for application software 0x0000 Table 11: 78K0S/KA1+ memory map The Low Pin Count - Do it! board does not reserve any resources of the 78K0S/KA1+ device, consequently all available memory of the device is free for application software. 17 Low Pin Count – Do it! 5. Low Pin Count - Do it! installation and operation 5.1 Getting started The windows based PG-LPC FLASH programming software allows to select and download application programs to Low Pin Count – Do it! board. As communication interface between PC host system and the Low Pin Count – Do it! board a USB interface line is needed. Before you can download and run a program, hardware and software must be installed properly. 5.1.1 CD-ROM contents The CD-ROM shows following directory structure: CD-ROM ROOT - Acrobat Reader for 32Bit Windows OS - Documentation - IAR Embedded Workbench 78K0/78K0S - PG-LPC FLASH programming software, incl. USB Drivers - Sample programs for Low Pin Count - Do it! … AD converter demonstration … Light Show … Reaction time measurement … Timer demonstration … UART demonstration Table 12: Low Pin Count - Do it! CD-ROM directory structure 18 Low Pin Count – Do it! 6. Hardware installation After unpacking Low Pin Count - Do it! connect the board to your host computer using the provided USB interface cable. When Low Pin Count - Do it! is connected, the USB driver needs to be installed on the host machine. Please refer to the following chapter “Software Installation”. 7. Software installation The Low Pin Count - Do it! package comes with the several software demo packages: • IAR Systems Embedded Workbench for 78K0/78K0S, including C compiler, assembler, linker, librarian and IAR C-SPY simulator • PG-LPC FLASH programming GUI • Sample programs The IAR Systems Embedded Workbench and the PG-LPC FLASH programming GUI must be installed on your PC. For detailed installation hints, refer to the following chapters and to the corresponding documentation of the IAR Embedded Workbench. The sample programs can be downloaded to the Low Pin Count - Do it! board directly from the CDROM. Only if you intend to modify or debug (simulate) the sample programs it is necessary to copy the complete \SamplePrograms folder to your local hard disk. Remark: Before modification or re-building of sample programs, do not forget to remove “Read-only” attribute of copied files. 7.1 IAR Systems Embedded Workbench for 78K0/78K0S installation To install the IAR Systems Embedded Workbench for 78K0/K0S including C-SPY simulator, select the SETUP program in the directory \IAR Embedded Workbench 78K\ew78k\ of the CDROM. The setup dialogues will guide you through the installation process. 7.2 PG-LPC FLASH programming GUI installation To install the PG-LPC FLASH programming GUI select the SETUP program in the directory \PG-LPC\ of the CDROM. The setup dialogues will guide you through the installation process. 7.3 Sample program installation The sample programs do not require any installation for download to the Low Pin Count - Do it! board. If the sample programs shall be modified it is required to copy them into any directory of your local hard disk. A file copy using the Windows explorer is the recommended procedure. Remark: Before modification or re-building of sample programs, do not forget to remove “Read-only” attribute of copied files. 19 Low Pin Count – Do it! 7.4 Driver Installation When Low Pin Count - Do it! board is used, the driver needs to be installed on the host machine. After the PG-LPC FLASH programming software has been installed successfully a new folder “C:\Program Files\NECTools32\PG-LPC\DRIVERS” was generated, containing the necessary drivers. Install the driver according to the following procedure: Installation on Windows 98SE/Me ......... Page 20 Installation on Windows 2000 ............... Page 22 Installation on Windows XP ................... Page 28 7.4.1 Installation on Windows 98SE/Me 1. When the Low Pin Count - Do it! board is connected with the host machine, the board is recognized by Plug and Play, and the wizard for adding new hardware is started. Click Next>. Figure 3: Add New Hardware Wizard (Windows 98SE ) Click. 2. The window below is displayed. So, check that "Search for a suitable driver ..." is selected, then click Next>. Figure 4: Search Method (Windows 98SE) Check that "Search for a suitable driver ..." is selected. Click. 20 Low Pin Count – Do it! 3. Check the "Specify a location" check box only and enter Files\NECTools32\PG-LPC\DRIVERS" in the address bar, then click Next>. "C:\Program Figure 5: Search Location Specification (Windows 98SE) <1> Check "Specify a location" only. <3> Click. <2> Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERs". Remark 4. If the installation destination folder is changed at the time of PG-LPC software installation, enter "new-folder\PG-LPC\DRIVERS". The window below is displayed. Click Next>. Figure 6: Checking Driver to Be Installed (Windows 98SE) Click. 21 Low Pin Count – Do it! 5. When the window below is displayed, the installation of the USB driver is completed. Click Finish. The installation of the USB Serial Port driver is then automatically performed. Figure 7: Installation Completion (Windows 98SE) Click. 7.4.2 Installation on Windows 2000 1. When the Low Pin Count - Do it! board is connected with the host machine, the board is recognized by Plug and Play, and the wizard for finding new hardware is started. Click Next>. Figure 8: Found New Hardware Wizard 1 (Windows 2000) Click. 22 Low Pin Count – Do it! 2. The window below is displayed. So, check that "Search for a suitable driver ..." is selected, then click Next>. Figure 9: Search Method 1 (Windows 2000) Check that "Search for a suitable driver ..." is selected. Click. 3. Check the "Specify a location" check box only, then click Next>. Figure 10: Driver File Location 1 (Windows 2000) Check that "Specify a location" only is checked. Click. 23 Low Pin Count – Do it! 4. Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS" in the address bar, then click OK. Figure 11: Address Specification 1 (Windows 2000) Click. Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS". Remark 5. If the installation destination folder is changed at the time of PG-LPC GUI software installation, enter "new-folder\PG-LPC\DRIVERS". Click Next>. Figure 12: Driver File Search 1 (Windows 2000) Click. 24 Low Pin Count – Do it! 6. Click Finish to complete the installation of the USB driver. Figure 13: USB Driver Installation Completion 1 (Windows 2000) Click. 7. Proceed to the installation of the USB Serial Port driver. Click Next>. Figure 14: Found New Hardware Wizard 2 (Windows 2000) Click. 8. The window below is displayed. So, check that "Search for a suitable driver ..." is selected, then click Next>. 25 Low Pin Count – Do it! Figure 15: Search Method 2 (Windows 2000) Check that "Search for a suitable driver ..." is selected. Click. 9. Check the "Specify a location" check box only, then click Next>. Figure 16: Driver File Location 2 (Windows 2000) Check that "Specify a location" only is checked. Click. 26 Low Pin Count – Do it! 10. Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS" in the address bar, then click OK. Figure 17: Address Specification 2 (Windows 2000) Click. Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS". Remark If the installation destination folder is changed at the time of PG-LPC GUI software installation, enter "new-folder\PG-LPC\DRIVERS". 11. Click Next>. Figure 18: Driver File Search 2 (Windows 2000) Click. 27 Low Pin Count – Do it! 12. Click Finish to complete the installation of the USB driver. Figure 19: USB Driver Installation Completion 2 (Windows 2000) Click. 7.4.3 Installation on Windows XP 1. When the Low Pin Count - Do it! board is connected with the host machine, the board recognized by Plug and Play, and the wizard for finding new hardware is started. Check that "Install from a list or specific ..." is selected, then click Next>. Figure 20: Found New Hardware Wizard 1 (Windows XP) Check that "Install from a list or specific ..." is selected. Click. 28 Low Pin Count – Do it! 2. Check that "Search for the best driver in these locations." is selected. Check the "Include this location in the search:" check box and enter "C:\Program Files\NECTools32\PGLPC\DRIVERS" in the address bar, then click Next>. Figure 21: Search Location Specification 3 (Windows XP) <1> Check that "Search for the best driver in these locations." is selected. <2> Check "Include this location in the search:" only. <3> Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS". 3. <4> Click. As shown below, "has not passed Windows Logo testing to verify its compatibility with Windows XP." is displayed. Click Continue Anyway. Figure 22: Windows XP Logo Testing 3 (Windows XP) Click. 29 Low Pin Count – Do it! 4. When the window below is displayed, the installation of the USB driver is completed. Click Finish. Figure 23: USB Driver Installation Completion 1 (Windows XP) Click. 5. Proceed to the installation of the USB Serial Port driver. Click Next>. Figure 24: Found New Hardware Wizard 2 (Windows XP) Check that "Install from a list or specific ..." is selected. Click. 30 Low Pin Count – Do it! 6. Check that "Search for the best driver in these locations." is selected. Check the "Include this location in the search:" check box and enter "C:\Program Files\NECTools32\PGLPC\DRIVERS", then click Next>. Figure 25: Search Location Specification 2 (Windows XP) <1> Check that "Search for the best driver in these locations." is selected. <2> Check "Include this location in the search:" only. <3> Enter "C:\Program Files\NECTools32\PG-LPC\DRIVERS". 7. <4> Click. As shown below, "has not passed Windows Logo testing to verify its compatibility with Windows XP." is displayed. Click Continue Anyway. Figure 26: Windows XP Logo Testing 2 (Windows XP) Click. 31 Low Pin Count – Do it! 8. When the window below is displayed, the installation of the USB driver is completed. Click Finish. Figure 27: USB Serial Port2 Driver Installation Completion (Windows XP) Click. 32 Low Pin Count – Do it! 7.5 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 Low Pin Count - Do it! board, the information to be checked here is needed. By clicking the "Device Manager" tab, check that the drivers are installed correctly. Figure 28: Device Manager Check that "USB Serial Port (COM?)" is present. Check that "USB High Speed Serial Converter" is present. For Windows 98SE/Me Caution Do not select Update and Erase when communicating with the Low Pin Count - Do it! board. For Windows 2000/XP Caution Do not perform "Hardware Modification Scan" when communicating with the Low Pin Count - Do it! board. Remark In the GUI port list box, the same communication port as COM? of USB Serial Port (COM?) needs to be selected. If the drivers above are not displayed, or the mark "×" or "!" is prefixed, refer to CHAPTER 10 TROUBLESHOOTING. 33 Low Pin Count – Do it! 7.6 Driver Uninstallation The driver uninstallation program is installed on the host machine when the PG-LPC software is installed. Use the procedure below for driver uninstallation. 1. When using Windows 2000 or Windows XP, log on as computer administrator. 2. Double-click in the order from "My Computer" to "(C:)" to "Program Files" to "NECTools32" to "PG-LPC" to "DRIVERS". "Ftdiunin.exe" is displayed. Double-click "Ftdiunin.exe". Figure 29: Driver Uninstallation Double-click. 3. Click Continue. Figure 30: Driver Uninstaller Click. 34 Low Pin Count – Do it! 4. Click Finish to complete driver uninstallation. Figure 31: Completion of Driver Uninstallation Click. Caution If the PG-LPC software is uninstalled earlier, "Ftdiunin.exe" is also deleted. In such a case, delete "USB Serial Port (COM?)" and "USB High Speed Serial Converter" from Device Manager manually. 35 Low Pin Count – Do it! 8. PG-LPC FLASH programming software 8.1 Starting up the GUI Software • GUI software startup Select PG-LPC.EXE from the start menu to start the PG-LPC GUI software. When the GUI software is started normally, the following screen appears. Figure 32: PG-LCP GUI Software Main Window Menu bar Programmer parameter window Toolbar Action log window Status bar 36 Low Pin Count – Do it! This window consists of the following items: Name 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 Display Information Displays menu items executable by the PG-LPC. Displays frequently used commands as icons. Displays an PG-LPC action log. Displays programming parameter settings. Displays status. 8.2 Toolbar The toolbar contains buttons for starting the important procedures of the PG-LPC. Table 13: Toolbar Buttons [Device] → [Setup] button [File] → [Load] button [Device] → [Blank Check] button [Device] → [Erase] button [Device] → [Program] button [Device] → [Autoprocedure(EPV)] button 37 Low Pin Count – Do it! 8.3 Menu Bar Depending on the actual device status and device type, some menu items may be enabled or disabled. 8.3.1 [File] menu Clicking the [File] menu displays the pull-down menu as shown below. This menu mainly contains commands related to file operation. Figure 33: [File] Menu (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 34: HEX File Selection Window 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. [ Open button] Selects a user program as a program to be written to the target device. [ Cancel button] Closes the window without selecting a program. 38 Low Pin Count – Do it! (2) [Quit] command The [Quit] menu is the command for terminating the PG-LPC GUI software. Clicking × on the right side of the task bar also terminates the PG-LPC GUI software. User settings are saved in the PG-LPC.ININote file, so that the GUI software starts up next time with the same settings. Note 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. 8.3.2 [Device] menu Clicking the [Device] menu displays the pull-down menu as shown below. This menu mainly contains commands for programming operations such as blank check, deletion and programming of the target device. Figure 35: [Device] Menu (1) [Blank Check] command The [Blank Check] command allows you to make a blank check on the 78K0S/KA1+ target device 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. (2) [Erase] command The [Erase] command erases the flash memory of the 78K0S/KA1+ device connected to the PG-LPC. While the flash memory is being erased, the progress status is displayed in the action log window to indicate programmer operation. The execution on 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. 39 Low Pin Count – Do it! (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. (4) [Verify] command This command is not supported. (5) [Security] command This command is not supported. (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. (7) [Autoprocedure(EPV)] command The [Autoprocedure(EPV)] command executes the [Erase] command and [Program] command in succession. Upon completion of [Autoprocedure(EPV)] command execution, the GUI software displays the result of executing the command on the target device. (8) [Signature read] command This command is not supported. 40 Low Pin Count – Do it! (9) [Setup] command The [Setup] menu 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 [Setup] menu allows you to modify the settings of items other than those items consisting of shadowed characters according to the user environment. (a) Standard setup This menu 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. The window shown below is opened. Figure 36: Device Setup Window - Standard This window shows all basic options that can be set in accordance with the user environment and target device. [ OK button] Clicking the OK button saves the settings on the Standard and Advance menus and closes the window. [ Cancel button] Clicking the Cancel button closes the window without saving the settings on the Standard and Advance menus. 41 Low Pin Count – Do it! <1> Parameter file This file holds parameters and timing data required to rewrite the flash memory of the target device. 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 37: Setup Window - Parameter File Selection Figure 38: Parameter File Selection Window [ PRM File Read button] A window for specifying a parameter file is displayed. Specify a desired file then click Open. 42 Low Pin Count – Do it! <2> Communication interface to device "Communication interface to device" is used to select a channel for communication between the Low Pin Count- Do it! board and host machine. Figure 39: Setup Window - Communication interface to device [Port list box] Select a channel for communication between the Low Pin Count- Do it! board and host machine. Remark Selectable ports can be checked using Device Manager. For details, refer to 7.5 Confirmation of USB Driver Installation. [Speed list box] Select a communication rate for the selected communication channel. <3> Supply oscillator "Supply oscillator" is used to select a clock that determines programming, data transfer, and a transfer rate. Figure 40: Setup Window - Supply Oscillator Selection [Frequency box] Sets the clock frequency of the target system. The range of operating frequency varies from one device to another. So, check the specifications of the device used before making a setting. [Multiply rate] Specifies the division rate or multiplication rate of the target device. If the target device has an on-chip PLL circuit, enter a division rate or multiplication rate according to the use environment. The selectable division rate or multiplication rate differs depending on the device. Check the specifications of the device used before making a setting. 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. 43 Low Pin Count – Do it! <4> Operation Mode The setting of "Operation Mode" may divide the flash memory of some target devices into blocks or areas. This menu is used to select an operation mode of the flash memory. Some devices do not have the block and area division modes, and some devices have only one of the modes. In these cases, a nonexisting mode is unchoosable. Figure 41: Setup Window - Operation Mode [When Chip is selected] The entire flash memory area of the target device is subject to rewrite processing. [When Block is selected] Specify the Block number range subject to rewrite processing by using Start/End. The Start/End list boxes display the Block numbers where the flash memory of the target device is configured. [When Area is selected] Specify the Area number range subject to rewrite processing by using Start/End. The Start/End list boxes display the Area numbers where the flash memory of the target device is configured. [Show Address check box] Specify whether numbers or addresses are displayed in the Start/End list boxes. If this check box is checked, addresses are displayed. If this check box is not checked, numbers are displayed. 44 Low Pin Count – Do it! (b) Advance setup The Advance setup menu is used to specify the command options and security flag settings. When "Advance" is clicked, the following window is displayed: Figure 42: Device Setup Window - Advance <1> Command options This dialog box is used to specify the PG-LPC flash processing command options. Figure 43: Setup Window - Command options [Blank check before Erase check box] If this check box is checked, blank check is made before the 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 check box] Not usable [Checksum after Program check box] If this check box is checked, the flash memory checksum value of the target device is read from the target device after execution of the Program command and EPV command. This value differs from the value displayed in the parameter window of the main window. 45 Low Pin Count – Do it! 8.3.3 [View] menu Clicking the [View] menu displays the pull-down menu shown below. This menu contains commands for setting whether to display the toolbar and status bar. Figure 44: [View] Menu (1) [Toolbar] command Checking the [Toolbar] command displays the toolbar. Unchecking the command hides the toolbar. (2) [Status Bar] command Checking the [Status Bar] command displays the status bar. Unchecking the command hides the status bar. 46 Low Pin Count – Do it! 8.3.4 [Help] menu Clicking the [Help] menu displays the following pull-down menu: Figure 45: [Help] Menu (1) [About PG-LPC] command The [About PG-LPC] command opens the program entry window as shown below and indicates the version. Clicking OK terminates the display. Figure 46: About PG-LPC Window 47 Low Pin Count – Do it! 8.4 Programmer Parameter Window This window displays the settings of the programming parameters. Figure 47: 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. 48 Low Pin Count – Do it! 9. How to use PG-LPC FLASH programming software This chapter explains the basic operations of the PG-LPC GUI for programming the Low Pin Count - Do it! board. This chapter covers how to start the system, execute the EPV command, and program the target device µPD78F9222 mounted on the Low Pin Count - Do it! board. The conditions of the series of operations described in this chapter are as follows: Target board Target device : Clock : Voltage level : Low Pin Count - Do it! µPD78F9222 8 MHz 5V PG-LPC Parameter file : Clock setting : Port : Operation mode: Write HEX : Option setting : 78F9222.PRM 8 MHz Multiplied by 1 COM4 (115200 bps) Chip Light_demo.hex Blank check before Erase (1) Installing the PG-LPC GUI software Install the PG-LPC GUI software on the host machine you are using, by referring to CHAPTER 7 SOFTWARE INSTALLATION (if the software has not been installed yet). (2) Installing the driver Install the USB driver on the host machine you are using, by referring to CHAPTER 7 SOFTWARE INSTALLATION (if the driver has not been installed yet). (3) Installing the parameter file The parameter file for the µPD78F9222 device is installed automatically during installation of PGLPC GUI, folder <PG-LPC install-path>\PRM. Nevertheless, newest version of parameter file for the µPD78F9222 device can by download from the following URL: http://www.ee.nec.de/updates 49 Low Pin Count – Do it! (4) Connecting and starting <1> Set the Low Pin Count - Do it! 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 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting ON don’t care don’t care don’t care Jumper setting closed don’t care don’t care don’t care don’t care CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed don’t care don’t care don’t care don’t care <2> <Plug and Play> Connect the Low Pin Count - Do it! board with the host machine via the USB cable. 50 Low Pin Count – Do it! <3> Start the PG-LPC GUI. Figure 48: GUI Software Startup Screen (5) Setting the programming environment <1> Select [Device] → [Setup] from the menu bar. <2> The Standard dialog box for device setup is activated. Figure 49: <Standard Device Setup> Dialog Box 51 Low Pin Count – Do it! <3> Click PRM File Read to open the parameter file selection window. Select the parameter file “78F9222.prm” then click Open. Figure 50: Parameter File Selection <4> From the Port list box, select the communication port that matches the host machine being used. Select the communication speed of the Host connection. Figure 51: Port Selection Remark Selectable ports can be checked using Device Manager. For details, refer to 7.5 Confirmation of USB Driver Installation. 52 Low Pin Count – Do it! <5> Set "Supply oscillator" according to the specifications of the Low Pin Count - Do it! board, “Frequency = 8.00 MHz” and “Multiply rate = 1.00”. In "Operation Mode", please specify the “Chip” mode. The following figure shows the recommended settings: Figure 52: <Standard Device Setup> Dialog Box after Setting <6> Switch to the Advance dialog box. Figure 53: <Advance Device Setup> Dialog Box <Command options> Blank check before Erase : Checked 53 Low Pin Count – Do it! <7> Click the OK button. The GUI software sets the parameters. When the settings have been completed, the following screen is displayed: Figure 54: Completion of Parameter Setting "PRM File Read OK." is displayed. The display is updated. (6) Selecting a user program <1> Select [File] → [Load]. <2> Select a program file to be written to the target device, then click Open. Figure 55: After Downloading "Success read HEX file." is displayed. The display is updated. 54 Low Pin Count – Do it! (7) [Autoprocedure(EPV)] command execution Select [Device] → [Autoprocedure(EPV)] from the menu bar. When the [Autoprocedure(EPV)] command is executed, Blank Check → Erase → Program and FLASH Internal Verify are executed sequentially for the µPD78F9222 device. Figure 56: After EPV Execution "...finish" is displayed. (8) 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. (9) Execute “LIGHT_DEMO” application Set the Low Pin Count - Do it! board to the normal operation mode by switching SW3/S1 to OFF. < Plug and Play> the Low Pin Count - Do it! board to start in normal operation mode. (10) Restarting the GUI When the system is restarted, the same screen as shown in Figure 54 appears. 55 Low Pin Count – Do it! 10. 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 Low Pin Count - Do it! board may not be installed correctly. Action: Install the GUI software again by referring to CHAPTER 7 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, then insert the USB connector again after a while. Cause: The driver may not be installed correctly. Action: <1> When this product is connected to the personal computer, right-click the driver marked with "!" or "×". Click Erase when displayed. <2> On Device Manager, execute [Hardware Modification Scan]. <3> Install the driver again with Plug and Play. Cause: The device may not be recognized (in the case of connection with the USB hub). Action: Try the following: • Disconnect the USB connector, 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 CHAPTER 7.4 Driver Installation. 56 Low Pin Count – Do it! Communication with the Low Pin Count - Do it! 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 CHAPTER 7.4 Driver Installation. 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: <1> Check that the clock is supplied to the 78K0S/KA1+ device, connector CN1. <2> Check that the power is supplied to the 78K0S/KA1+ device, connector CN12. <3> 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. Action: Use the 78F9222.prm that matches the Low Pin Count - Do it! target device. For information about the PRM file, refer to CHAPTER 8 PG-LPC FLASH programming software. Cause: The setting of "Supply oscillator" in [Device Setup] may be incorrect. Action: Make a correct setting according to the specifications of the target device. 57 Low Pin Count – Do it! 11. Sample programs 11.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 IAR workspace file named “LPC_demo_projects.eww”. AD converter demonstration Light Show Reaction time measurement Timer demonstration UART demonstration workspace file, IAR Embedded Workbench Table 14: Example directory structure 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: output files for IAR C-SPY simulator output files for Low Pin Count - Do it! board (i.e. Intel HEX file) linker command file dependency information file, IAR Embedded Workbench project setting file, IAR C-SPY debugger project file, IAR Embedded Workbench C source file Table 15: Example structure The main directory contains the project files for the IAR Systems Embedded Workbench, the corresponding C source file and the linker command file (xcl File). All output files of the development tools for each target are generated in the directories Debug and Release. One target is the IAR C-SPY simulator directory Debug and the other is the demonstration kit hardware directory Release. To open the IAR Systems Embedded Workbench for a sample program please double-click on the IAR workspace file “LPC_demo_projects.eww” in the directory SamplePrograms. For details of using IAR Embedded Workbench and IAR C-SPY Simulator please refer to the manuals. 58 Low Pin Count – Do it! Figure 57: IAR Systems Embedded Workbench 78K0/K0S Figure 58: IAR System 78K0/K0S C-SPY Simulator 59 Low Pin Count – Do it! 11.2 ADC demo This sample program simulates a simple voltage meter. By using the integrated ADC, the voltage supplied to ADC on input channel 0, port P20/ANI0, is measured. The input voltage is adjusted by potentiometer R24. The board shows the measured voltage by flashing LED’s D1 to D4. Used Internal Peripherals Timer80 A/D converter Used External Parts LED’s D1- D4 Potentiometer R24 Button SW2 To run the ADC demo please set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: SW3 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting OFF OFF OFF OFF Jumper setting closed closed closed don’t care don’t care CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed closed don’t care don’t care don’t care 60 Low Pin Count – Do it! 11.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 Timer80 Used External Parts LED’s D1- D4 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: SW3 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting OFF OFF OFF OFF Jumper setting closed don’t care don’t care don’t care don’t care CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed closed closed don’t care don’t care 61 Low Pin Count – Do it! 11.4 ReacTime demo This sample program demonstrates a reaction time measurement. The application starts by flashing LED’s D1-D4 two times. After a press of button SW1 the application waits for a random time between 0.50 and 3.45 seconds. Then LED D4 is switched on and measurement starts by incrementing a reaction counter every 50ms. The actual counter value is shown by LED’s D1-D4 (binary format) until the next keystroke of button SW1. After a press of button SW1 is detected, the measurement stops and the reaction time is shown by flashing LED’s D1-D4. Pressing button SW2 starts a new measuring cycle. Used Internal Peripherals Timer80 TimerH1 Used External Parts LED’s D1- D4 Button SW1 Button SW2 To run the ReacTime demo please set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: SW3 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting OFF OFF OFF OFF Jumper setting closed don’t care don’t care don’t care don’t care CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed closed closed don’t care don’t care 62 Low Pin Count – Do it! 11.5 Timer demo This sample program simulates a darkroom timer. The board starts after reset flashing all LED’s. After first key press of SW1, the board starts counting up expose times in unit of minutes (binary output format). By pressing SW1 a second time the shown elapse time is selected and counting is started. After the selected time is finished the elapse time is displayed by flashing the LED’s twenty times and the stop mode is entered. By pressing SW1 stop mode can be released. Used Internal Peripherals Timer80 TimerH1 Used External Parts LED’s D1- D4 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: SW3 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting OFF OFF OFF OFF Jumper setting closed don’t care don’t care don’t care don’t care CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed closed closed don’t care don’t care 63 Low Pin Count – Do it! 11.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 Timer80 A/D converter UART6 Used External Parts LED’s D1-D4 Button SW2 To run the UART demo please set the configuration of switch SW3 and connectors CN1, CN2 and CN12 to the following: SW3 S1 S2 S3 S4 CN12 1-2 3-4 5-6 7-8 9-10 Setting OFF ON OFF OFF Jumper setting closed closed closed closed closed CN1 1-2 3-5 4-6 CN2 1-2 3-4 5-6 7-8 9-10 Jumper setting open closed closed Jumper setting closed closed don’t care don’t care don’t care 64 Low Pin Count – Do it! 12. Connectors and Cables 12.1 USB host connector CN7 Figure 59: Connector CN7, USB Mini-B Type Host Connector Pin Configuration 1 5 Table 16: Pin Configuration of USB Connector CN7 USB Connector CN7 1 2 3 4 5 Signal Name 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 Low Pin Count - Do it! board. 65 Low Pin Count – Do it! 12.2 USB interface cable (Mini-B type) Figure 60: USB interface cable (Mini-B type) 66 Low Pin Count – Do it! 13. Schematics Remark: Schematics also available on CDROM directory \Doc\ file “LPCDOIT_BOARD_SCHEMATICS.pdf” Figure 61: Low Pin Count - Do it! board schematics 67