Page 3
NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such 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.
Page 4
European Union only: This equipment (including all accessories) is not intended for household use. After use the equipment cannot be disposed of as household waste. NEC Electronics (Europe) GmbH offers to take back the equipment. All you need to do is register at www.eu.necel.com/weee.
Page 5
Some information contained in this document may vary from country to country. Before using any NEC product in your application, please contact the NEC office in your country to obtain a list of authorized representatives and distributors. They will verify: •...
Page 6
78K0R - Cool it! Revision History Date Revision Chapter Description 25-10-2006 V1.00 First release User’s Manual U18426EE1V0UM00...
78K0R - Cool it! Table of Contents Introduction ........................10 Main features of 78K0R – Cool it!....................10 System requirements........................11 Package contents..........................11 Trademarks ............................11 78K0R - Cool it! system configuration ................12 78K0R - Cool it! ..........................12 Host computer ..........................12 Power supply via USB interface ....................
Page 8
78K0R - Cool it! 78K0R - Cool it! installation and operation ..............26 Getting started..........................26 6.1.1 CD-ROM contents.......................... 26 Hardware installation......................27 Software installation......................27 IAR Systems Embedded Workbench for 78K0/78K0S/78K0R installation ........ 27 Sample program installation......................27 USB Driver Installation ........................28 8.3.1 Installation on Windows 2000 ......................
Page 9
78K0R - Cool it! List of Figures Figure 1: 78K0R - Cool it! system configuration..................12 Figure 2: 78K0R - Cool it! board connectors and switches.................13 Figure 3: Soldering bridges EVDD, AVREF0 and AVREF1 ................17 Figure 4: Connector USB1, USB Mini-B Type Host Connector Pin Configuration ........18 Figure 5: On-Chip debugging ........................23 Figure 6: 78K0R/KG3 memory map ......................25 Figure 7: Found New Hardware Wizard (Windows 2000)................28...
Workbench and IAR Systems C-SPY debugger / simulator. 78K0R - Cool it! is not intended for code development. NEC does not allow and does not support in any way any attempt to use 78K0R - Cool it! in a commercial or technical product.
78K0R - Cool it!. Note: Updates of the IAR Embedded Workbench for 78K, documentation and/or utilities for 78K0R - Cool it!, if available, may be downloaded from the NEC WEB page(s) at http://www.eu.necel.com/updates 1.4 Trademarks IAR Embedded Workbench, visualSTATE, IAR MakeApp and C-SPY are registered trademarks of IAR Systems AB.
USB device in the same way as it would access a standard RS232 interface. The NEC virtual UART driver appears to the windows system as an extra Com Port, in addition to any existing hardware Com Ports.
78K0R - Cool it! 3. 78K0R - Cool it! components The 78K0R - Cool it! board is equipped with a navigation switch, a 16*2 character LC display, LED’s and with several connectors in order to be connected to host computers, FLASH programmer or any external target hardware.
78K0R - Cool it! 3.1 Configuration switch SW2 The different operation modes of the 78K0R - Cool it! board can be set by switch SW2/bit1-8. SW2/bit Factory settings Mode Stand alone and debug Mode enable On-Board debug function (TK-78K0R debugging) enable On-Board debug function (TK-78K0R debugging) TxD3 disconnected...
78K0R - Cool it! 3.1.3 UART mode selection, SW2/bit4-bit5 By switching bit4 and bit5 of SW2 to ON the UART3 signals RxD3 and TxD3 are connected to the µPD78F0731 USB microcontroller. Within this mode standard serial communication to a terminal program running on the HOST PC can be established.
78K0R - Cool it! 3.2 RESET button, SW3 SW3 is the reset button. It activates the power on reset. Switch SW3 controls the reset input signal of the 78K0R/KG3 microcontroller. 3.3 Navigation switch, SW1 Button SW1 is a navigation switch connected to the key interrupt input of the 78K0R/KG3 device. It operates in five directions including a center push function.
78K0R - Cool it! 3.7 Soldering bridges EVDD, AVREF0 and AVREF1 Additional configuration of the 78K0R - Cool it! board can be done by the soldering bridges EVDD, AVREF0 and AVREF1. The different configuration modes are shown in the table below: EVDD AVREF0 AVREF1...
N.C. Table 12: Pin Configuration of Connector USB1 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 78K0R - Cool it! board. User’s Manual U18426EE1V0UM00...
78K0R/KG3 internal flash memory. Please note, the PG-FP4 FLASH programmer is a separate product from NEC and it is not included in this package. Additional FP1 allows connecting the QB-MINI2 On-Chip debug emulator to the 78K0R - Cool it! board in order to use On-Chip debug function of the 78K0R/KG3 device.
78K0R - Cool it! 3.12 Display D1, 16*2 character LC display The 78K0R – Cool it! board is equipped with a character LC display. The alignment of the display is equal to 16 character words at 2 lines. The LCD module contains about a character generator ROM - including predefined standard characters - and a character RAM where the user can define its own characters.
78K0R - Cool it! 3.14 Connectors TPU10 – TPU29 and wrap field Several pins of the 78K0R/KG3 microcontroller are combined to the connectors TPU10 – TPU29. The corresponding assignment can be found in table below. Additional the 78K0R - Cool it! board provides a wire wrap field area allowing the integration of additional application hardware.
78K0R - Cool it! 3.15 Low-pass filter’s U1A, U1B and U1C The 78K0R – Cool it! board is equipped with three low-pass filter’s U1A, U1B and U1C, realized by the operational amplifier LM324M. Each input of a low-pass filter is connected to a dedicated timer output signal of the 78K0R/KG3 microcontroller.
78K0R - Cool it! 4. On-Chip debugging The 78K0R - Cool it! board offers two possibilities to use On-Chip debugging (OCD). The TK-78K0R On- Board debug function of 78K0R – Cool it! allows On-Chip debugging without a need of external debug hardware.
78K0R - Cool it! 4.2 OCD via QB-MINI2 emulator To operate the 78K0R - Cool it! board together with the QB-MINI2 On-Chip debug emulator, configure switch SW2 as following: Setting Mode Stand alone and debug mode Disable On-Board debug function Disable On-Board debug function ON/OFF TxD3 connected / disconnected...
78K0R - Cool it! 5. 78K0R/KG3 memory map The memory layout of 78K0R/KG3 device is shown in the figure below. Figure 6: 78K0R/KG3 memory map The 78K0R – Cool it! does not reserve any resources of the 78K0R/KG3 microcontroller, consequently all available memory of the device is free for application software.
78K0R - Cool it! 6. 78K0R - Cool it! installation and operation 6.1 Getting started The IAR Embedded Workbench including the C-SPY debugger allows to build and download application programs to the 78K0R - Cool it! starterkit. As communication interface between the PC host system and the 78K0R - Cool it! board a USB interface line is needed.
78K0R - Cool it! 7. Hardware installation After unpacking 78K0R - Cool it!, connect the board to your host computer using the provided USB interface cable. When 78K0R - Cool it! is connected, the USB driver needs to be installed on the host machine. Please refer to the following CHAPTER 8 SOFTWARE INSTALLATION.
78K0R - Cool it! 8.3 USB Driver Installation In order to use the 78K0R - Cool it! board for On-Chip debugging the USB driver needs to be installed on the host machine. Install the driver according to the following procedure: Installation on Windows 2000 ....
78K0R - Cool it! Following the window below is displayed. So, check that "Search for a suitable driver ..." is selected, then click Next>. Figure 8: Search Method (Windows 2000) Check that "Search for a suitable driver ..." is selected. Click.
78K0R - Cool it! Locate to the folder "C:\Program Files\IAR Systems\Embedded Workbench 4.0\78K\config\nec\ie_pc_driver\MINICUBE”. Figure 10: Address Specification 1 (Windows 2000) Locate to “C:\Program Files\IAR Systems\Embedded Workbench 4.0\78K\config\nec\ie_pc_driver\MINICUBE” Remark If the installation destination folder is changed at the time of IAR Embedded Workbench installation, enter "new-folder\78K\config\nec\ie_pc_driver\MINICUBE"...
78K0R - Cool it! After the location of the USB driver has been specified click OK to proceed. Figure 12: Address Specification 3 (Windows 2000) Click. Click Next>. Figure 13: Driver File Search (Windows 2000) Click. User’s Manual U18426EE1V0UM00...
78K0R - Cool it! Click Finish to complete the installation of the USB driver. Figure 14: USB Driver Installation Completion (Windows 2000) Click. User’s Manual U18426EE1V0UM00...
78K0R - Cool it! 8.3.2 Installation on Windows XP 1. When the 78K0R - Cool 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. At first the hardware wizard will ask if windows should search on the windows update web, check "No, not this time"...
<3> Click. 4. Locate folder "C:\Program Files\IAR Systems\Embedded Workbench 4.0\78K\config\nec\ie_pc_driver\MINICUBE” and click OK. Figure 18: Search Location Specification 2 (Windows XP) Click. Remark If the installation destination folder is changed at the time of IAR Embedded Workbench installation, enter "new-folder\78K\config\nec\ie_pc_driver\MINICUBE"...
Figure 19: Search Location Specification 3 (Windows XP) Click. 6. As shown below, "NEC Electronics Starter Kit Virtual UART has not passed Windows Logo testing to verify its compatibility with Windows XP." is displayed. Click Continue Anyway. Figure 20: Windows XP Logo Testing (Windows XP) Click.
78K0R - Cool it! 7. After the installation of the USB driver is completed the window below is displayed. Click Finish to close the hardware wizard. Figure 21: USB Driver Installation Completion (Windows XP) Click. User’s Manual U18426EE1V0UM00...
After installing the USB driver, check that the driver has been installed normally, according to the procedure below. When using the 78K0R - Cool it! board in combination with IAR C-SPY debugger the “NEC Electronics Starter Kit Virtual UART” should be present like in the figure below.
78K0R - Cool it! 9. IAR sample session When everything is set up correctly the IAR Embedded Workbench can be started. To do so, start the Embedded Workbench from Windows “Start” menu > “Programs” > folder “IAR Systems” > “IAR Embedded Workbench Kickstart for 78K”.
78K0R - Cool it! After the demo workspace has been opened the files contained in the workspace are displayed. Now click on the little “+” sign next to the project filename “ADC_demo - Debug” to show all files that were part of the selected demonstration project.
78K0R - Cool it! Next the correct linker settings of the demo project will be checked. This can be done in the “Linker” category as shown below. Select the “Config” tab and check that the linker command file “lnk78f1166_a0.xcl” is selected. This file is used by the linker and contains information on where to place the different sections of code, data and constants that may be used within the demo project: Figure 26: IAR Linker options Now after everything has been setup correctly it’s time to compile and link the demonstration project.
78K0R - Cool it! Now the debugger is started and the demo project is downloaded to the 78K0R – Cool it! board. The progress of downloading is indicated by blue dots in the TK-78 Emulator window. Please note, downloading of larger executables can take some time. Figure 28: IAR project download User’s Manual U18426EE1V0UM00...
78K0R - Cool it! After the download was completed all debug features of IAR C-SPY debugger are available, i.e. Single Stepping, Step Over/-In/-Out, Go-Execution, Breakpoints, Register / Memory view etc. To get more details on the debugger configuration and capabilities please refer to the “78K IAR Embedded Workbench IDE User Guide”...
78K0R - Cool it! In case of a security ID mismatch the following message box is displayed by the IAR C-SPY debugger. Click the YES button to enter the Hardware Setup menu. Click Figure 30: TK-78 enter Hardware Setup Specify the default security ID <1> - the default security ID of an erased flash is equal to 10bytes 0xFF each -and enable the “erase flash before next ID check”...
78K0R - Cool 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. This main directory of each sample contains the complete project inclusive all output files of the development tool.
78K0R - Cool it! 11.2 ADC demo This sample program demonstrates the usage of the A/D converter. After button SW1 is pressed three 8-bit PWM's are generated by using the plural channel mode of the Timer array unit. The PWM's were feeding the three low-pass filter's U1A, U1B, U1C.
78K0R - Cool it! 11.6 UART demo This sample program demonstrates the initialization and usage of the UART3 by using the Serial array unit 1, channel 2 and 3. After the program is started press a key on the terminal program that is running on your host system.