Download User`s Manual TK
Transcript
User’s Manual TK-78K0R/KE3L+USB Date published: March 2010 Rev. 2.00 © TESSERA TECHNOLOGY INC. 2010 Printed in Japan -1- TK-78K0R/KE3L+USB User’s Manual Windows and Windows XP are registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. ・The information is subject to change without notice. ・No part of this document may be copied or reproduced in any form or by any means without prior written consent of TESSERA TECHNOLOGY INC.. TESSERA TECHNOLOGY INC. assumes no responsibility for any errors that may appear in this document. ・TESSERA TECHNOLOGY INC. 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 TESSERA TECHNOLOGY INC. products listed in this document or any other liability arising from the use of such products. No license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of TESSERA TECHNOLOGY INC. 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 a customer's equipment shall be done under the full responsibility of the customer. TESSERA TECHNOLOGY INC. assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits, software and information. CAUTION ・Do not give any physical damage to this equipment such as dropping ・Do not superimpose voltage to this equipment. ・Do not use this equipment with the temperature below 0℃ or over 40℃. ・Make sure the USB cables are properly connected. ・Do not bend or stretch the USB cables. ・Keep this equipment away from water. ・Take extra care to electric shock. ・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. -2- TK-78K0R/KE3L+USB User’s Manual Contents CHAPTER 1 PREPARATION.....................................................................................................................................................7 1.1 Development Tools / Software .....................................................................................................................8 1.2 Installation of Development Tools ................................................................................................................9 1.2.1 Installation Package.....................................................................................................................9 1.2.2 Installation of Development Tools .........................................................................................9 1.3 Installation of USB Driver ............................................................................................................................. 15 1.3.1 Installation on Windows XP.................................................................................................... 16 1.3.2 Installation on Windows 2000................................................................................................ 19 1.3.3 Completion of USB Driver Installation .............................................................................. 22 1.4 Sample Programs.............................................................................................................................................. 23 1.4.1 Preparation of Sample Programs ........................................................................................ 23 1.4.2 Overview of Sample Programs............................................................................................. 26 CHAPTER 2 EXPERIENCES................................................................................................................................................... 27 2.1 Start PM+ ............................................................................................................................................................ 29 2.2 What is PM+........................................................................................................................................................ 30 2.3 Load Workspace (project) ............................................................................................................................. 32 2.4 Set Linker Options........................................................................................................................................... 34 2.4.1 "Output1" Tab............................................................................................................................ 34 2.4.2 "Output2" Tab............................................................................................................................ 36 2.5 Set Compiler Options ..................................................................................................................................... 37 2.5.1 "Extend" Tab .............................................................................................................................. 37 2.5.2 "Startup Routine" Tab............................................................................................................ 38 2.6 Create Load Module Files ............................................................................................................................. 39 2.7 Check Debugger Settings ............................................................................................................................. 41 2.8 Check Board Settings .................................................................................................................................... 43 2.9 Start Debugger (ID78K0R-QB) ................................................................................................................... 44 2.10 Run Programs.................................................................................................................................................. 47 2.11 Stop Programs ................................................................................................................................................ 49 2.12 Close Debugger (ID78K0R-QB)................................................................................................................ 50 2.13 Quit PM+ ........................................................................................................................................................... 51 CHAPTER 3 HARDWARE SPECIFICATIONS .................................................................................................................. 52 3.1 Layout of hardware functions...................................................................................................................... 53 3.2 Layout of solder-short pad and test pad ............................................................................................... 53 3.3 Hardware Functions ........................................................................................................................................ 54 3.3.1 SW1, SW4...................................................................................................................................... 54 3.3.2 SW2 (INTP0) ................................................................................................................................ 55 3.3.3 SW3 (RESET SW) ...................................................................................................................... 55 3.3.4 SW5 (Filter) .................................................................................................................................. 56 3.3.5 JP1.................................................................................................................................................. 56 3.3.6 JP2, JP3 ....................................................................................................................................... 56 -3- TK-78K0R/KE3L+USB User’s Manual 3.3.7 JP4.................................................................................................................................................. 56 3.3.8 LED1 (POWER)........................................................................................................................... 57 3.3.9 U1, U2 (7segLED) ...................................................................................................................... 57 3.3.10 CN1, CN2.................................................................................................................................... 58 3.3.11 CN3............................................................................................................................................... 58 3.3.12 J1................................................................................................................................................... 58 3.3.13 VR1 ............................................................................................................................................... 58 3.3.14 USB1 ............................................................................................................................................ 58 3.3.15 USB2 ............................................................................................................................................ 58 3.3.16 FP1................................................................................................................................................ 58 3.4 Solder-short pad label.................................................................................................................................... 59 CHAPTER 4 TROUBLESHOOTING..................................................................................................................................... 60 4.1 If you cannot find USB driver when you connect PC to the kit ................................................... 60 4.2 Error when you start the debugger ........................................................................................................... 60 4.2.1 "Can not communicate with Emulator..." (F0100 or A0109).................................... 61 4.2.2 "Incorrect ID Code." (Ff603)................................................................................................ 62 4.2.3 "The on-chip debug function had been disabled in the device." (F0c79) .......... 62 4.2.4 "Disabling the on-chip debug function is prohibited." (F0c33)............................... 62 CHAPTER 5 OTHER INFORMATION.................................................................................................................................. 63 5.1 Create a new workspace............................................................................................................................... 64 5.2 Register additional source file..................................................................................................................... 69 5.3 Debugger tips..................................................................................................................................................... 71 5.3.1 Change display of buttons ..................................................................................................... 71 5.3.2 Display source list and function list................................................................................... 71 5.3.3 Set/delete breakpoints ........................................................................................................... 72 5.3.4 Display global variables ........................................................................................................... 73 5.3.5 Display global variables while programs are running.................................................... 74 5.3.6 Display local variables.............................................................................................................. 75 5.3.7 Display memory and SFR contents.................................................................................... 75 5.4 Erase microcontroller built-in flash memory......................................................................................... 76 5.5 Circuit diagram .................................................................................................................................................. 82 -4- TK-78K0R/KE3L+USB User’s Manual Introduction TK-78K0R/KE3L+USB is the evaluation kit for development with sound systems using "78K0R/KE3-L", NEC Electronics 16bit all flash microcontroller. The user only needs to install the development tools and USB driver, and connect the host machine with the target board to start the code development, build, monitoring the output, and debugging code. (This demonstration kit uses the on-chip debug feature from the microcontroller itself, without emulator connection) Configuration for Debugging -5- TK-78K0R/KE3L+USB User’s Manual Overview This manual consists of the following contents. Read chapter 1 and 2 first for installing the development tools and using the sample programs. Read chapter 3-5 for customizing the sample programs and the hardware. Chapter 1: Chapter 2: Chapter 3: Chapter 4: Chapter 5: Preparations Install the development tools Experiences Experience the basic operations of integrated development environment (PM+) and integrated debugger (ID78K0R-QB) with using sample programs. Hardware Specifications Explain the hardware of TK-78K0R/KE3L+USB Troubleshooting Describe how to solve troubles you may face, such as errors when starting the integrated debugger (ID78K0R-QB) Other Information Introduce other information, such as how to create a new workspace (project) on integrated development environment (PM+), how to register additional source file, and some useful tips of the integrated debugger. The circuit diagrams of demonstration kit are included in this chapter. Reader This manual is intended for development engineers who wish to become familiar with the development tools for the 78K0R. It is assumed that the readers have been familiar with basics of microcontrollers, C and Assembler languages, and the WindowsTM operating system. Purpose This manual is intended to give users an understanding of the features, hardware configurations, development tools for the 78K0R. -6- TK-78K0R/KE3L+USB User’s Manual CHAPTER 1 Preparation This - chapter describes following topics: Overview and installation of development tools Installation of development tools Overview and preparation of sample programs Users can experience the development flow such as coding, build, debugging, and test, by using the development tools bundled with TK-78K0R/KE3L+USB. -7- TK-78K0R/KE3L+USB User’s Manual 1.1 Development Tools / Software ● Device file DF781026 V1.00 A device file contains device specific information. So, users need a device file to use the development tools. ● Integrated Development Environment (IDE) PM+ V6.31 The IDE works on Windows operation system. Users can develop a system efficiently by using the editor with idea processor function, compiler, and debugger. ● C Compiler CC78K0R W2.12 (code size limited version) C compiler for the 78K0R microcontrollers. The object code size is limited to 64 Kbyte. This compiles C code for 78K0R and ANSI-C code program into assembler code. This produces object code and linker. ● Assembler RA78K0R W1.33 (code size limited version) Assembler for the 78K0R microcontrollers. The object code size is limited to 64 Kbyte. This convert the assembler code for 78K0R into object program. The object program will be used for debugger. ● 78K0R Integrated Debugger ID78K0R-QB V3.60 This is the tool for debugging the object program generated by C compiler and assembler. The debugger enables to do C source level debugging. With the debugger, you can debug the code easily and efficiently by refering and changing variables, using step-in debuging function, and so on. ● Starter Kit USB Driver This is a software driver for PC to access to the USB interface of the kit. ● HID Class Sample Program / USB Human Interface Device Class Sample Driver The 78K0R/KE3-L is detected as the HID device. This sample program behaves as a keyboard. And it is used in [chapter 2]. Please refer to the "USB HID (Human Interface Device) Class Driver application note" for further details. ● CDC Class Sample Program / USB Communication Device Class Sample Driver The 78K0R/KE3-L is detected as the CDC device. This sample program behaves as a COM port. Please refer to the "USB CDC (Communication Device Class) Driver application note" for further details. -8- TK-78K0R/KE3L+USB User’s Manual 1.2 Installation of Development Tools 1.2.1 Installation Package The attached CD-ROM includes the development tools and documentations. Users can use the installer to install those development tools and documentations. 1.2.2 Installation of Development Tools ① Please insert the CD-ROM in the drive. The installer will show up automatically. If it does not start automatically, please initiate it by double clicking the SETUP.EXE. <1> Readme First The contents of the CD-ROM, and some notes are available. Please read it at first. <2> Install… Click “Install” to start installation of development tools. For details, please refer to the next section. -9- TK-78K0R/KE3L+USB User’s Manual <3> Documents Manuals of development tools and the evaluation kit are available in PDF files. When this button is clicked, the WWW browser will start. Adobe® Acrobat® Reader is available in the CD-ROM. <4> Sample Program Click this button to start the WWW browser for the sample program and the tutorial. <5> Link to NEC Electronics Microcontrollers Click this button to start the WWW browser display the link to the NEC Electronics Microcontroller web site (http://www.necel.com/micro/index_e.html) The NEC Electronics Microcontroller web page provides with the latest product/tool information and FAQs. <6> Exit Terminate the setup. ② Click the "Install" - 10 - TK-78K0R/KE3L+USB User’s Manual ③ "Tool Installer" dialog box is opened. Select products that you need to install. (as default, all the products that you need to use the TK-78K0R/KE3L+USB are selected.) "Explain" area displays an explanation of the selected product. To change the installation destination, click Browse… . When all the settings are completed, click Install… . * In this document, it is assumed that users install the programs under "NEC Electronics Tools" directory (default installation directory). Users can find the tools by selecting “Start Menu” -> "Programs" -> "NEC Electronics Tools". ④ Click OK when "Install" comfirmation dialog box is opened. - 11 - TK-78K0R/KE3L+USB User’s Manual ⑤ Read "software license agreement" and click To stop the installation, click No . Yes ⑥ Enter the product ID, and click Next . * The product ID is available on the other sheet. ⑦ It starts copying the files. - 12 - for continuing the installation. TK-78K0R/KE3L+USB User’s Manual ⑧ Click Next when "Select Files" installation wizard dialog opened. ⑨ When the installation is completed, the following dialog opens. Click OK . ⑩ "NEC Electronics Starter Kit Virtual UART" USB driver must be installed on PC before you connect to TK-78K0R/KE3L+USB. Install the USB driver by referring "1.3 Installation of USB Driver". - 13 - TK-78K0R/KE3L+USB User’s Manual Notes on the installation authority To install this tool in Windows 2000 or XP, the authority of an administrator is necessary. Therefore, please login as an administrator. Notes on the install-directory Please do not use 2-byte characters, such as umlaut in the directory name, where the product is to be installed. Note on the version of Windows If the language of the Windows is not English, a file transfer error during installation might be observed. In this case, please abort the installation in the language, and re-install it in an English version of Windows. The identical problem may be observed, if a language other than English is specified as the system language in the “Regional Settings Properties” tab. Limitation Assembler RA78K0R and C compiler CC78K0R limit the object size to 64 Kbyte. - 14 - TK-78K0R/KE3L+USB User’s Manual 1.3 Installation of USB Driver "NEC Electronics Starter Kit Virtual UART" USB driver must be installed on PC before you start using the TK-78K0R/KE3L+USB. Please, follow the instruction below to install the driver. "Starter Kit USB Driver" must be installed on the PC. If not, please refer to "1.2 Installation of Development Tools" to install the driver first. CAUTION: Do not use a USB hub for connecting TK-78K0R/KE3L+USB. First, connect the TK-78K0R/KE3L+USB USB2 to PC with USB cable. Depending on the version of Windows OS, the installation will be differed. Please check your Windows version, and follow the instructions - Windows XP -> "1.3.1 Installation on Windows XP" - Windows 2000 -> "1.3.2 Installation on Windows 2000" After the installation, go to "1.3.3 Completion of USB Driver Installation" 8 - 15 - TK-78K0R/KE3L+USB User’s Manual 1.3.1 Installation on Windows XP 1. Once the TK-78K0R/KE3L+USB is connected with USB, the "Found New Hardware Wizard" will be started. Select "No, not this time" and click Next > . Select "No, not this time" Click "Next" 2. Select "Install from a list or specific location" and click Next > . Select "Install from a list or specific location" Click "Next" - 16 - TK-78K0R/KE3L+USB User’s Manual 3. Select "Search for the best driver in these locations.", check "Include this location in the search:", and then click "Browse..." to select the driver directory path. The path should be "C:\Program Files\NEC Electronics Tools\TK-driver" as default installation. If the installation directory is not default, then select "TK-driver" under the installation directory. Click Next > . Select the driver directory Click "Next" 4. If the following dialog is opened, click Continue Anyway . Click "Continue Anyway" - 17 - TK-78K0R/KE3L+USB User’s Manual 6. The installation of "NEC Electronics Starter Kit Virtual UART" driver is completed. Click Finish . Click "Finish" 7. Go to "1.3.3 Completion of USB Driver Installation". - 18 - TK-78K0R/KE3L+USB User’s Manual 1.3.2 Installation on Windows 2000 1. Once the TK-78K0R/KE3L+USB is connected with USB, the "Found New Hardware Wizard" will be started. Select "No, not this time" and click Next > . Click "Next" 2. Select "Search for a suitable driver for my device". Click Next > . Select "Search for a suitable driver for my device" Click "Next" - 19 - TK-78K0R/KE3L+USB User’s Manual 3. Select "Specify a location". Click Next > . Select "Specify a location" Click "Next" 4. Select the driver directory path. The path should be "C:\Program Files\NEC Electronics Tools\TK-driver" as default installation. If the installation directory is not default, then select "TK-driver" under the installation directory. Click OK . Click "OK" Select the driver directory - 20 - TK-78K0R/KE3L+USB User’s Manual 5. Click Next > . Click "Next" 6. The installation of "NEC Electronics Starter Kit Virtual UART" driver is completed. Click Finish . Click "Finish" 7. Go to "1.3.3 Completion of USB Driver Installation". - 21 - TK-78K0R/KE3L+USB User’s Manual 1.3.3 Completion of USB Driver Installation Confirm the USB driver is installed on PC. Start "Device Manager", and find "NEC Electronics Starter Kit Virtual UART" (without "?" mark) under the "Ports (COM & LPT)". Device Manager Find "NEC Electronics Starter Kit Virtual UART (COMx)" The screen above shows that the COM port number is "COM8". If ID78K0R-QB is not in use, you can use this port number for connecting TK-78K0R/KE3L+USB. When you change the USB port connection, the COM port number will be changed as well. CAUTION ・Do not do “Hardware Modification Scan” when you communicate with the target device. - 22 - TK-78K0R/KE3L+USB User’s Manual 1.4 Sample Programs This section explains the overview and preparation of sample programs. For details about the sample programs, see "4. Sample Programs". 1.4.1 Preparation of Sample Programs ① Insert the CD-ROM disk in the CD-ROM drive of your PC. The [NEC Electronics Microprocessor Development Tools Setup] screen automatically appears.(if this screen does not appear automatically, start setup.exe from Explorer. etc.) ② Press the Sample Program button to start the WWW browser. - 23 - TK-78K0R/KE3L+USB User’s Manual ③ Click the “HID Class sample program, CDC Class sample program” link , the following download confimation window appears. ④ Click the Save butten. - 24 - TK-78K0R/KE3L+USB User’s Manual ⑤ After specifying the download destination folder,click the Save button. ⑥ The self-extraction sample program set (TK78K0R.exe) is copied to the specified folder. The folder that the “TK78K0R” folder is made when this file is executed, and the sample program is stored under the folder in addition is made. - 25 - TK-78K0R/KE3L+USB User’s Manual 1.4.2 Overview of Sample Programs The sample programs consist of following directories. TK78K0R 78K0R_USB_HID NEC_project Project file folder K0RUSB_HID.prw include Include file folder src Source file folder Project file 78K0R_USB_CDC NEC_project Project file folder K0RUSB_CDC.prw include Include file folder src Source file folder Inf_file INF file folder - 26 - Project file TK-78K0R/KE3L+USB User’s Manual CHAPTER 2 Experiences In this chapter, you will experience how to use the development tools with using the sample programs. The development tools are : - Integrated Development Environment (IDE), PM+ - Integrated Debugger, ID78K0R-QB You will use the programs that you prepared in "1.4 Sample Programs", as the sample programs for TK-78K0R/KE3L+USB. You will be able to understand how to use the development tools and the concept of project files which you need for producing application programs. - 27 - TK-78K0R/KE3L+USB User’s Manual The overall steps are as follows: 2.1 Start PM+ 2.3 Load Workspace 2.4 Set Linker Options 2.5 Set Compiler Options 2.6 Create Load Module Files 2.7 Check Debugger Settings 2.8 Check Board Settings Run Programs 2.9 Start Debugger 2.10 Run Programs 2.11 Stop Programs 2.12 Close Debugger 2.13 Quit PM+ - 28 - TK-78K0R/KE3L+USB User’s Manual 2.1 Start PM+ Let's start using the development tools. First, start the PM+ Select "Windows Start Menu" -> "Program" -> "NEC Electronics Tools" -> "PM+ V6.31". PM+ starts up - 29 - TK-78K0R/KE3L+USB User’s Manual 2.2 What is PM+ In PM+, application programs and environment setting are handled as a single project, and series of actions such as program creation using the editor, source management, build, and debugging are managed. Also, one of more project files is managed together as a workspace. Menu bar Tool bar Output Window Project Window Project window A window in which project names, source files, and include file are displayed using a tree structure. Output window A window in which the build execution status is displayed. For details regarding menu bars and tool bars, refer to "Help" menu in PM+. "Help" on menu bar , then "PM+ Help" - 30 - TK-78K0R/KE3L+USB User’s Manual What is a project? A project is the unit that is managed by PM+. A project refers to an application system and environment development based on PM+. PM+ saves project information in a "project file". What is a project file? A project file contains project information that includes the source files, device name, tool options for compiling, editor, and debugger information. The file name format is "xxxxx.prj". Project files are created in the directory you specifies when you create a new workspace. What is a project group? A project group is a group comprised of a number of projects in an application system. The target device of each project must be the same within a project group. What is a workspace? A workspace is the unit used to manage all the projects and project group required for one application system. A workspace file contains one or more project files. The file name format is "xxxxx.prw". - 31 - TK-78K0R/KE3L+USB User’s Manual 2.3 Load Workspace (project) In this section, you will use the workspace that you created in "1.4 Sample Programs" For creating a new workspace, refer to "Chapter 5 Other Information". The workspace has information about the build environment for the sample programs. Select "File" on menu bar and "Open Workspace…". Then, select "K0RUSB_HID.prw" under the directory " TK78K0R\78K0R_USB_HID \NEC_project ". Select the directory that contains the sample programs. Select "K0RUSB_HID.prw ", then click - 32 - Open . TK-78K0R/KE3L+USB User’s Manual Workspace name: "K0RUSB_HID.prw " Load the workspace file "K0RUSB_HID.prw " Project group Project The workspace file "K0RUSB_HID.prw " contains one project called "K0RUSB_HID". You will use this project "K0RUSB_HID". CAUTION: Please ignore when you get a prompt saying "files could not be found". This may occurred when the installation directory is not a default. - 33 - TK-78K0R/KE3L+USB User’s Manual 2.4 Set Linker Options The linker options have been set by the project file. However, some option settings will be covered in this section because the linker option settings are important for debugging. Following three settings are covered specifically. - Outputs from debugging - On-chip debug (Desable/Enable, security ID) - Watchdog timer Select "Tools" on menu bar, then "Linker options....". 2.4.1 "Output1" Tab Select "Output1" tab on "Linker Options" window, and see following settings. - 34 - TK-78K0R/KE3L+USB User’s Manual - Load Module File settings Check "Output Symbol Information". This enables to do source level debugging (setting break points, monitoring variables in watch window, etc). Also, you can specify the load module file name. - On-Chip Debug Option Byte Check "On-Chip Debug Option Byte". Enter "85" in "Control value". This setting enables the on-chip debugging function of the microcontroller. * For details of "Control value", refer to the user's manual of 78K0R/KE3-L (U19878E). See "Start address" is set to "1FC00", and "Size" is set to "1024". These settings reserve the memory address area for the monitor program (the flash memory area that the debugger uses for on-chip debugging). In this case, the "Control value" is allocated to the address of C3H in flash memory, and FFH is set to the next address. Because of this, the following areas could not be set the segments. <Address area that reserved by on-chip debugging> - 2H, 3H - CEH-D7H - From the address set in "Start address" to the byte set in "Size" - Security ID Check "Security ID", and enter the security ID which is a unique ID code (10 bytes) to authenticate when the debugger is launched. The security ID is stored in the flash memory (C4H-CDH), and checked if it is the same as the code entered in Linker options dialog when the debugger is launched. The debugger will not be launched when the security ID is unmatched. By using this function, you can secure the programs from leaks. If you do not need to set the security, it is recommended to set the security ID "FFFFFFFFFFFFFFFFFFFF" as this is the initial code. If you forget about the security ID (stored in the address of C4H-CDH) or if you set wrong on-chip debug option byte, you will not be able to use the debugger (ID78K0R-QB). To solve this, you can erase the built-in flash memory with "WriteEZ5" for connect to the ID78K0R-QB. For details, refer to "5.4 Erase microcontroller built-in flash memory". - 35 - TK-78K0R/KE3L+USB User’s Manual 2.4.2 "Output2" Tab Select "Output2" tab on "Linker Options" window, and see following settings. - User Option Byte Check "User Option Byte", and then enter "00FBFF". Here, you can do the setting of watchdog timer, low-voltage detector, and system reserved memory area. The 3 bytes you entered are stored at C0H-C2H on flash memory: - C0H: setting for watchdog timer - C1H: setting for low-voltage detector - C2H: setting for system reserved memory area (must be set as FFH) This time, you disabled the watchdog timer and the default start function of low-voltage detector. For details, refer to the user's manual, 78K0R/KE3-L (U19878E). - 36 - TK-78K0R/KE3L+USB User’s Manual 2.5 Set Compiler Options The compiler options have been set by project file. However, because some compiler options are useful, following two settings are covered specifically in this section. - Enable C++ comments - Use multiplier and divider Select "Tools" on menu bar, then "Compiler options". 2.5.1 "Extend" Tab Select "Extend" tab, and check "Enable C++ Comment". This setting allow you to use the C++ comment using "//". It is useful feature when developing code. - 37 - TK-78K0R/KE3L+USB User’s Manual 2.5.2 "Startup Routine" Tab Select "Startup Routine" tab, and check "Using Library" and "Using Multiplier". The 78K0R/KE3-L has feature of multiplier to increase those calculation speed. - 38 - TK-78K0R/KE3L+USB User’s Manual 2.6 Create Load Module Files After developing the source code, you have to create load module files by compiling, assembling, and linking. This process is called build. Click the build button , or select "Build" on menu bar, then "Build". Build process is executed Build has been completed successfully. - 39 - TK-78K0R/KE3L+USB User’s Manual What is build? Build is a function that creates an executable file from source files in a project. PM+ automatically performs compiling, assembling, linking, and other processing actions. To reduce the time for the build, PM+ detects and compiles/assembles only the files that have been updated from the previous build process. What is rebuild? Build compiles and assembles only the source files that have been updated from the previous time, whereas rebuild compiles and assembles all the source files. When setting, such as compiler options, have been changed, you must rebuild instead of build. - 40 - TK-78K0R/KE3L+USB User’s Manual 2.7 Check Debugger Settings After the build, you should configure the debugger settings. The debugger settings have been set by the project file as well. However, because those settings are important for debugging, some settings are covered in this section. Select "Tools" on menu bar, then "Debugger Setting...". - 41 - TK-78K0R/KE3L+USB User’s Manual Check if "ID78K0R-QB V3.60 78K0R Integrated Debugger" is selected on "Debugger". If you cannot select "ID78K0R-QB V3.60 78K0R Integrated Debugger", select "Project" on menu bar, "Project settings" -> "Tool version settings" -> "Detailsetting" -> then select "ID78K0R-QB". - 42 - TK-78K0R/KE3L+USB User’s Manual 2.8 Check Board Settings Before connecting the PC and the TK-78K0R/KE3L+USB with USB, you should check the setting of switch and jumper pin on the board. Set the switch and the jumper pin on the TK-78K0R/KE3L+USB as follows. JP1 JP2 JP3 JP4 SW4 Short 1-2 Short 1-2 Short Short Debug Writer SW1 1 2 3 4 5 6 7 8 ON ON ON ON ON OFF OFF OFF After the switch settings are completed, connect the PC to USB2 on TK-78K0R/KE3L+USB with USB cable. If the "Found New Hardware Wizard" is started, install USB driver with referring "1.3 Installation of USB Driver". - 43 - TK-78K0R/KE3L+USB User’s Manual 2.9 Start Debugger (ID78K0R-QB) Click the debug button , or select "Build" on menu bar, then "Debug". If you do not see the debug button, go to "2.7 Check Debugger Settings" for changing the settings. The steps to start the debugger will be explained below. ID78K0R-QB is launched - 44 - TK-78K0R/KE3L+USB User’s Manual "Configuration" dialog is opened. Please choose “Tool0+Tool1” in the "Target Device Connection" Enter "FFFFFFFFFFFFFFFFFFFF" (F x 20) in "ID Code", then click Click Yes OK . when the confirmation dialog for downloading load module file is opened. - 45 - TK-78K0R/KE3L+USB User’s Manual ID78K0R-QB starts and downloading the program to flash memory. When the download is completed, the source code will be displayed NOTE: Completion of the download does not mean running the programs. Therefore, it does not make anything happened. To run the demonstration, see "2.10 Run Programs". - 46 - TK-78K0R/KE3L+USB User’s Manual 2.10 Run Programs Now, you are ready to run the program. Click the restart button , or select "Run" on menu bar, then "Restart". The sample program runs. Run the sample program When programs are running, the status bar will be red. - 47 - TK-78K0R/KE3L+USB User’s Manual Connect the PC to USB1 on TK-78K0R/KE3L+USB with USB cable. Select "Windows Start Menu" -> "Program" -> " Accessories " -> " Notepad ". The alphabet is entered by "SW2" operation to the up side, and pushing the "SW2" starts the new paragraph as follows. You could confirm the sample program is working. ●For more information about the functions that are used in those sample program, see "USB HID (Human Interface Device) Class Driver application note". - 48 - TK-78K0R/KE3L+USB User’s Manual 2.11 Stop Programs Now, you are going to stop the program. Click the stop button , or select "Run" on menu bar, then "Stop". Stop the program When the program stops, the status bar changes back to the original color. - 49 - TK-78K0R/KE3L+USB User’s Manual 2.12 Close Debugger (ID78K0R-QB) Select "File" on menu bar, then "Exit". The exit confirmation dialog is displayed. If you click Yes , it saves the settings in the project file, and then closes the ID78K0R-QB. It is recommended to save the settings as it saves the window you used, window size, layout, etc. If you click No , it does not save the settings and closes the ID78K0R-QB. - 50 - TK-78K0R/KE3L+USB User’s Manual 2.13 Quit PM+ Select "File" on menu bar, then "Exit PM+". PM+ is closed. The experiences section ends now. You can find more information how to use the development tool and information about other useful features in "Chapter 5 Other Information". - 51 - TK-78K0R/KE3L+USB User’s Manual CHAPTER 3 Hardware Specifications In this chapter, the hardware of TK-78K0R/KE3L+USB will be explained. Microcontroller μPD78F1026 ※78K0R/KE3-L(USB) External main system clock: 20MHz Clock Subsystem clock: 32.768KHz Internal oscillation clock: 20, 8, 1MHz PWM output Filter:LMV324M:NS(U13) AMP:LM4865M:NS(U14) Speaker:0.3W (for simplified monitoring) Audio Jack:3.5mm monaural Filter ON/OFF Switchable (SW5) Output Volume (VR1) USB MINI B (USB1) USB Function USB MINI B (USB2) Debug/Serial communication Interface Expansion connector 50Pin socket x2 pad only(CN1,CN2) Connecter for MINICUBE2 (FP1) Power supply voltage 5V (USB or AC adapter) ・4 ways + center-push switch (SW2) Input/output for operation ・Dip switch (SW1) ・7Seg-LED (U1,U2) check use ・Reset switch (SW3) * The name with bracket is the name printed on the board. - 52 - TK-78K0R/KE3L+USB User’s Manual 3.1 Layout of hardware functions J1 SW5 USB2 JP1 LED1 VR1 CN2 JP4 SW1 U1,U2 SW4 JP2 SW3 JP3 FP1 CN1 CN3 SW2 3.2 Layout of solder-short pad and test pad AVREF EVDD P111 P110 P50~P53 P20~P23 P120 - 53 - P16 RIGHT P31 USB1 TK-78K0R/KE3L+USB User’s Manual 3.3 Hardware Functions 3.3.1 SW1, SW4 The bit 1-3 on SW1 are for debug mode settings, bit 4,5 are for mode settings and bit 6-8 are DIP switches connected to P41,P42,P17 pins in microcontroller. ● For the use of ID78K0R-QB, use following settings. SW1 Bit 1 ON/OFF ※1 Bit 2 ON Bit 3 ON SW4 *1 Debug/Writer Side ON: The microcontroller runs the programs stored in the flash memory as soon as it gets power supply. OFF: The microcontroller stays being reset until ID78K0R-QB is started. ● To run the programs stored in built-in flash memory without using ID78K0R-QB, or debugging the microcontroller with MINICUBE2, use following settings and re-supply power. SW1 Bit 1 OFF Bit 2 OFF Bit 3 OFF SW4 *2 K0R <--> K0USB side or Center Set the SW4 center, if you use P11 and P12 on the Expansion connector ● Bit4 is the switch for POWER LED. ON OFF If CPU is supplied power, LED1 is turned on. If CPU is supplied power, LED1 isn't turned on. ● Bit5 is the switch for the audio mute. ON OFF Audio output is muted by P31output low. Non audio mute - 54 - TK-78K0R/KE3L+USB User’s Manual ● The bit 6-8 are connected to P41,P42, 17 pins in microcontroller. ON means "Low" and OFF means "Open". When you need to use this, you need to set the microcontroller built-in pull-up resistor option registers (PU1,PU4) to ON. For details about settings of microcontroller built-in pull-up resistor option registers, refer to 78K0R/KE3-L User's Manual (U19878E). SW1 Bit 6 Bit 7 Bit 8 P42 P43 P17 3.3.2 SW2 (INTP0) SW1 is a 4 ways + center-push switch. When the switch is moved to one of 4 ways or is pushed down, it sends the signal of "Low". When it is released, it becomes "Open" again. You need to set the pull-up resistor option register ON for this function. (For more information about the pull-up resistor option register, refer to the 78K0R/KE3-L user's manual, U19878E) SW1 1pin 2pin 3pin 4pin 5pin 6pin SW1 Pin Functions (ALPS SKRHADE010) Signal Target Microcontroller Operation Name Pin Name P70 P71 P72 P74 GND P73 P70 /KR0 P71 /KR1 P72 /KR2 P74/KR4/INTP8 GND P75/KR5/INTP9 UP CENTER PUSH LEFT RIGHT DOWN 3.3.3 SW3 (RESET SW) This is the reset switch. You can reset the microcontroller by pressing this switch. - 55 - TK-78K0R/KE3L+USB User’s Manual 3.3.4 SW5 (Filter) SW5 is the slide switch to select use/not use of the Filter (LMV324M). When it sets to "OFF", it does not use the Filter and it inputs sound signals from microcontroller to AMP. Microcontr oller OFF Filter Audio signal AMP ON 3.3.5 JP1 JP1 is the jumper switch pin for connecting the microcontroller and the filter. Please set the jumper switch pin short circuit. Please refer to the circuit diagram for further details. 3.3.6 JP2, JP3 JP2, JP3 are jumper switch pin for selecting the power supply to the CPU. JP2 1-2 Short 2-3 Short - JP3 1-2 Short 1-2 Short USB power supply from USB2 connecter. USB power supply from USB1 connecter. 2-3 Short AC adapter power supply from CN3 connecter. 3.3.7 JP4 JP4 is the jumper switch pin for supplying the power to the audio circuit. Please set the jumper switch pin short circuit. Please refer to the circuit diagram for further details. - 56 - Jack TK-78K0R/KE3L+USB User’s Manual 3.3.8 LED1 (POWER) This is the POWER LED. It is lighted when it gets power supply. You can turn off the LED by setting the bit4 OFF on SW1. 3.3.9 U1, U2 (7segLED) U1and U2 are 7segLED. By setting the 7segLED output data in P20-P23 and setting P50-P53 from Low to High, the data is latched and the 7segLED displays the data. U1 U2 P20 P20 P21 P25 P26 P24 P22 P27 P23 P20~P23 P50~P53 P21 P26 P24 P22 P23 P27 h c t a L P25 h c t a L P110 P111 Example of data and its display P20 P51 P21 P52 P50 P22 P23 0 1 2 3 4 0xC0 5 0x92 0xF9 0xA4 0xB0 0x99 6 7 8 9 0x83 0xf8 0x80 0x98 P53 To display "1" on U1 and "2" on U2: PM2 = 0xf0; // Set lower 4bit of P2 to output mode PM5 = 0xf0; // Set lower 4bit of P5 to output mode PM11.0 = 0; PM11.1 = 0; // Set P110, 111 to output mode P2 = 0xf9; P5 = 0xf9>>4; // Set data for "1" in P2 and P5 P11.0 = 0; P11.0 = 1; // Set P110 to Low, then High P2 = 0xa4; P5 = 0xa4>>4; // Set data for "2" in P2 and P5 P11.1 = 0; P11.1 = 1; // Set P111 to Low, then High - 57 - TK-78K0R/KE3L+USB User’s Manual 3.3.10 CN1, CN2 The connecter for CN1, CN2 expansion connection. The connecter was not installed. (HIROSE ELECTRIC CO., LTD. HIF-3H-50DA-2.54DSA) 3.3.11 CN3 This is the connector for AC adapter. Please, connect the bundled AC adapter (+5V). ・Support plug : 2.1mm DC jack (center plus) 3.3.12 J1 This is the jack for external speakers. Connect a speaker when you play sound. ・Support jack: 3.5mm (monaural) 3.3.13 VR1 Audio output volume control. If the audio mute is set, then audio is not output. 3.3.14 USB1 USB connecter for the USB function controller. 3.3.15 USB2 USB connecter for the debug / serial communication. It was found as 「NEC Electronics Starter Kit Virtual UART」. 3.3.16 FP1 This is the interface for connecting MINICUBE2. - 58 - TK-78K0R/KE3L+USB User’s Manual 3.4 Solder-short pad label With using the solder-short pad to cut the circuit, users can customize the circuit. The solder-short pad looks like the picture below. To open, use cutter to cut the dent part. To short, put solder on the pad. Solder-short pad (Open) Solder-short pad name P120 Solder-short pad (Short) Before Shipment Short P16 Short P31 Short AVREF Short EVDD Short P110,P111 Short Connection Open Short Open Short P120 is connected to USB1 bus power detecting signal. You can use P120 for multipurpose IO. P16 is connected to audio circuit. You can use P16 for multipurpose IO. P31 is connected to audio muting circuit. Open You can use P31 for multipurpose IO. Short Open Short Open VDD = AVREF AVREF is separated from VDD. VDD = EVDD EVDD is separated from VDD. P110 and P111 are connected to 7Segment LED data latch circuit. You can use P110 and P111 for multipurpose IO. These are connected to 7Segment LED data latch circuit. You can use the ports for multipurpose IO. External speaker output connecter J1 is connected as stereo connecter. Connection for the monaural connecter. Short Short Open P20~P23、 P50~P53 Short RIGHT Open Short Open Short Open Note: All ground signals are each connected. - 59 - TK-78K0R/KE3L+USB User’s Manual CHAPTER 4 Troubleshooting This chapter describes how to solve troubles you may face. 4.1 If you cannot find USB driver when you connect PC to the kit Check Point 1 If you use USB hub, do not use it. (USB hub is not supported) Check Point 2 Check if you installed "Starter Kit USB Driver" in "1.2 Installation of Development Tools". If not, install the driver. Check Point 3 Check if the settings of switches on the kit are correct with referring to "1.3 Installation of USB Driver". Check Point 4 If above 3 check points are confirmed, disconnect the USB cable from PC and re-connect again. It should show the "Found New Hardware Wizard" wizard. Operate the installation with referring to "1.3 Installation of USB Driver". After the installation, make sure you go through "1.3.3 Completion of USB Driver Installation" to confirm the USB driver installation. 4.2 Error when you start the debugger There could be several reasons to make errors happen. The solving processes differ depending on errors. Please check the error message first. The solving processes for each error are as follows. - 60 - TK-78K0R/KE3L+USB User’s Manual 4.2.1 "Can not communicate with Emulator..." (F0100 or A0109) Check Point 1 If you use USB hub, do not use it. (USB hub is not supported) Check Point 2 Check if the settings of switches on the kit are correct with referring "1.3 Installation of USB Driver". Check Point 3 Confirm the USB driver installation with referring to "1.3.3 Completion of USB Driver Installation". Check Point 4 If above 3 check points are confirmed, close the debugger and disconnect the USB cable from PC. Re-connect USB cable properly to both the PC and the kit, and then re-start the debugger. - 61 - TK-78K0R/KE3L+USB User’s Manual 4.2.2 "Incorrect ID Code." (Ff603) This error occurs when the security ID stored on microcontroller built-in flash memory is different from the ID code you entered at the start of debugger. Security ID entry area at the start of debugger Check Point 1 Enter correct security ID and click OK on the configuration window. Check Point 2 If you forgot the security ID, you have to erase the microcontroller built-in flash memory. Before erasing, check if you actually set the security ID with referring to "2.4 Set Linker Options". Also remember the code you set for the security ID. After this, erase the flash memory with referring to "5.4 Erase microcontroller built-in flash memory". 4.2.3 "The on-chip debug function had been disabled in the device." (F0c79) This error occurs when the value at address C3H (On-chip debug option byte) in microcontroller built-in flash memory is incorrect. You need to erase the flash memory. Check Point 1 Check if you actually set the correct on-chip debug option byte with referring to "2.4 Set Linker Options". If it is not correct, then set correctly. Check Point 2 Erase the flash memory with referring to "5.4 Erase microcontroller built-in flash memory". 4.2.4 "Disabling the on-chip debug function is prohibited." (F0c33) Basically, this error occurs when you start (download) the debugger without doing the settings described at "2.4 Set Linker Options". Do the same checking processes as"4.2.3 The on-chip debug function had been disabled in the device. (F0c79)". - 62 - TK-78K0R/KE3L+USB User’s Manual CHAPTER 5 Other Information This chapter explains some useful operation techniques of development tools and circuit diagram of the kit for developing of user programs. 6.1 Create a new workspace (project) 6.2 Register additional source file 6.3 Debugger tips 6.4 Circuit diagram - 63 - TK-78K0R/KE3L+USB User’s Manual 5.1 Create a new workspace Now, create a new workspace and project. PM+ allows you to create a new workspace with following "New WorkSpace" dialog. Select "File" on PM+ menu bar, then "New Workspace...". "New WorkSpace" dialog opens <Description of items> Workspace File Name: -> Specify the name of the workspace file that manages the project files. .prw is automatically suffixed as the file type. A project file (.prj) of the same name is simultaneously created. Folder: -> Specify the folder for saving the workspace file by writing its absolute path. This item can be selected from a reference dialog box by pressing the Browse… button. Project Group Name: -> Specify this item if wishing to manage multiple projects together in function units. If nothing is specified, this item is the same as the workspace file name. Microcontroller Name: -> Specify the name of the microcontroller to be used. Device Name: -> Specify the name of the device to be used. The concrete information set here is described on the following pages - 64 - TK-78K0R/KE3L+USB User’s Manual Input the workspace information setting as follows. Workspace file name → test Folder → C:\TK78K0R Project Group Name → (no input) Microcontroller Name → 78K0R Device Name → uPD78F1026_64 Click Click Yes Next > button button Click - 65 - Detail Setting button TK-78K0R/KE3L+USB User’s Manual Set the version of tools as follows. CC78K0R:W2.12 RA78K0R:W1.33 ID78K0R-QB:V3.60 Select tools as above screenshot, then click Click Next > Click - 66 - Next > OK . TK-78K0R/KE3L+USB User’s Manual Select ID78K0R-QB V3.60 Click Next > Check the project information settings Click - 67 - Finish TK-78K0R/KE3L+USB User’s Manual Project “test" was registered. This completes workspace and project creation. Additional source files can be registered at any time thereafter. For details, refer to "6.2 Register additional source file". Also, you need to do the settings for on-chip debug. Please refer to "2.4 Set Linker Options", "2.5 Set Compiler Options", and "2.7 Check Debugger Settings". - 68 - TK-78K0R/KE3L+USB User’s Manual 5.2 Register additional source file Now, register additional source files. The following example shows the additional registration of source files “b.c” and “c.c” with source file “a.c” already registered. Place the cursor on the source file in the Project window of PM+, and select [Add Source Files…] displayed in the right-click menu. Select source files "b.c" and "c.c", then click Open Multiple source files can be selected by clicking them with pressing - 69 - Ctrl key. TK-78K0R/KE3L+USB User’s Manual Source file "b.c" and "c.c" are additionally registered to the project. - 70 - TK-78K0R/KE3L+USB User’s Manual 5.3 Debugger tips This section describes some useful techniques for the debugger (ID78K0R-QB). 5.3.1 Change display of buttons Execution controls (run, stop, step-in debugging, reset, etc) and opening functional window can be made by below buttons. However, it could be difficult to know which button does what. In this case, select "Options" on menu bar, then "Debugger Options". Check "Pictures and Text" on setting area. With this setting, the buttons display the text as well, so that it is easier to know what they are. 5.3.2 Display source list and function list When you wish to see source file list or function list, select "Browse" on menu bar, then "Other" -> "List" to open the list window. The information in the windows is synchronized. Therefore, it is not just for referring to the list, but it is useful when you wish to update files or functions. When you click "game1"... Source window shows "game1" - 71 - TK-78K0R/KE3L+USB User’s Manual 5.3.3 Set/delete breakpoints Breakpoints are executed by clicking lines in which " * " is displayed "B" is displayed in the line where a breakpoint is set. Breakpoints are deleted by clicking "B". Click Breakpoint was set - 72 - TK-78K0R/KE3L+USB User’s Manual 5.3.4 Display global variables With using Watch Window, you can display global variables. There are several ways to register global variables to watch window. In this section, how to register from source window is described. ①Right-click the variable on source window, then select "Add Watch..." ②Add Watch dialog opens. Click OK . ③Adding a variable to watch window is completed. - 73 - TK-78K0R/KE3L+USB User’s Manual 5.3.5 Display global variables while programs are running RAM, general-purpose register, and SFR can be referred by the pseudo real-time monitor function even when the programs are running. Select "Option" on menu bar, then "Extended Option...". Configure the settings for "RAM Monitor And DMM". Check Specify the sampling interval time of the pseudo real-time monitor function. The sampling time can be specified from 0 to 65500 with unit of 100ms. It will not monitor if it is set to "0" or blank. This completes the settings. Note: ・The user program momentarily breaks upon a read. ・Do not use the pseudo real-time monitor function while using the memory window. It uses the system resources significantly as it monitors the displaying memory as well. ・It is recommended to close the memory window when you use the pseudo real-time monitor function. - 74 - TK-78K0R/KE3L+USB User’s Manual 5.3.6 Display local variables Local variable window is used to display local variables. By clicking the button below, you can open the local variable window. Unlike global variables, local variables cannot be displayed when programs are running. 5.3.7 Display memory and SFR contents By clicking the button below, you can open the memory window. By clicking the button below, you can open the SFR window. - 75 - TK-78K0R/KE3L+USB User’s Manual 5.4 Erase microcontroller built-in flash memory If the On-Chip Debug Option Byte is set to "Do not erase data of flash memory in case of failures in enabling on-chip debugging" and if you forget the security ID, you need to erase the flash memory completely. To erase the flash memory, please follow the steps below. WriteEZ5 is installed at "1.2.2 Installation of Development Tools". ① Start WriteEZ5 by selecting "Windows Start" menu, "Programs", "NEC Electronics Tools", "WriteEZ5", "V1.00", and "WriteEZ5". - 76 - TK-78K0R/KE3L+USB User’s Manual ② Set the switch and the jumper pin on the TK-78K0R/KE3L+USB as follows. JP1 JP2 JP3 JP4 SW4 ③ Short 1-2 Short 1-2 Short Short Debug Writer SW1 1 2 3 4 5 6 7 8 ON ON ON ON ON OFF OFF OFF Then, please connect the PC to “USB2” on the TK-78K0R/KE3L+USB with the USB cable. - 77 - TK-78K0R/KE3L+USB User’s Manual ④ Push the「Setup」button. ⑤ Push the「PRM File Read」button. - 78 - TK-78K0R/KE3L+USB User’s Manual ⑥ Please select “78F1026.prm” in the directory of “¥PRM78F1026_V100” in the CD-ROM. ⑦ "Port" selects the COM port number where TK-78K0R/KE3L+USB is allocated. *Only the COM port number that the personal computer has is displayed in this pulldown menu. - 79 - TK-78K0R/KE3L+USB User’s Manual ⑧ "Erase" The deletion of the flash memory begins when the button is pushed. ⑨ If Flash EEPROM has been erased successfully, “chip erase finish” will be displayed as shown below. - 80 - TK-78K0R/KE3L+USB User’s Manual ※ ID Code The ID Code is a mechanism to prevent an unwelcome third party from accessing your source code by initiating the debugger. Therefore, it is recommended to modify the ID Code from the default value to secure your original source code. However, once you modify it, then, if you forget the security ID or mistakenly over-write 0x00(value) to the address of 0xC3, the debugger ID78K0R-QB is unable to access to the CPU via OCD interface. In this case, you have to start over from erasing all data in the Flash EEPROM. Then, you can define the new ID Code. You may load your source code from the debugger with a load module file. - 81 - TK-78K0R/KE3L+USB User’s Manual 5.5 Circuit diagram From following page, it shows the circuit diagram of the demonstration kit. - 82 - VDD VDD XT1 XT2 X2 C8 3pF GND SSP-T7-FL 3.7pF R1 0 C5 39PF X1 Not Mount Not Mount TP2 VDD LC-2 Not Mount TP1 LC-2 C7 4pF Y2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 2 2 2 2 C13 0.1uF FLMD0 GND ID_NC DD+ VBUS 5 4 2 3 1 0.1uF BLM41PG750S C11 + 4.7uF/25V Not Mount C10 0.1uF 9 SW1-8 2 10 SW1-7 11 L1 P17 P20 P22 P24 P26 P43 P41 P142 P144 P13 P15 P130 P10 P12 P50 P52 P60 P62 USBVDD2 1M R55 0.47uF C6 EVDD VDD CHS-08B 6 SW1-6 CHS-08B 7 CHS-08B 8 EVDD VDD T_RESET P41 P40 RESET VDD EVDD +12V C9 EVDD P71 P73 P75 P77 P31 P02 P03 T_RESET FLMD0 P111 USB1 UX60A-MB-5ST HIF3H-50DA-2.54DSA 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 HCM49-20.000MABJ-UT C4 39PF Y1 P70 P72 P74 P76 P140 P04 P110 CN1 CN2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 C53 0.47uF 4 6 8 EVDD 2 TP3 LC-2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 R4 2 EVDD 1 P120 1.5K P120 P120/INTP0/EXLVI P43 P42/TI04/TO04 P41/TOOL1 P40/TOOL0 RESET P124/XT2 P123/XT1 FLMD0 P122/X2/EXCLK P121/X1 REGC VSS EVSS VDD EVDD U5 P21 P23 P25 P27 P42 P40 P143 P120 P14 P17 P16 P11 P51 P53 P61 P63 SN74LVC3G07DCT U8C P120 P43 P42 P41 P40 RESET XT2 XT1 FLMD0 X2 X1 Not Mount HIF3H-50DA-2.54DSA 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 CN2 2 24 2 24 4 U6 SN74LVC1G126DCK 1 R2 1 R3 P60 P61 P62 P63 P31 P77 P76 P75 P74 P73 P72 P71 P70 CN1 FG4 FG3 FG2 FG1 FG4 FG3 FG2 FG1 2 1 P140 P142 P143 P144 P02 P03 P04 P130 P20 P21 P22 P23 P24 P25 P26 P27 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 2 EVDD 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 P111 P110 P10 P11 P12 P13 P14 P15 P16 P17 P53 P52 P51 P50 0.1uF C12 EVDD P31 0.1uF C3 AVREF UPD78F1026 AVSS AVREF P111 P110 P10/SCK00 P11/SI00/RXD0 P12/SO00/TXD0 P13/TXD3 P14/RXD3 P15/RTCDIV/RTCCL P16/TI01/TO01/INTP5 P17/TI02/TO02 P53/TI00 P52/TO00 P51/INTP2 P50/INTP1 P140/PCLBUZ0/INTP6 P142/SCK20/SCL20 P143/SI20/RXD2/SDA20 P144/SO20/TXD2 P02/SO10/TxD1 P03/SI10/RXD1/SDA10 P04/SCK10/SCL10 P130 P20/ANI0 P21/ANI1 P22/ANI2 P23/ANI3 P24/ANI4 P25/ANI5 P26/ANI6 P27/ANI7 P60/SCL0 P61/SDA0 P62 P63 P31/TI03/TO03/INTP4 P77/KR7/INTP11 P76/KR6/INTP10 P75/KR5/INTP9 P74/KR4/INTP8 P73/KR3 P72/KR2 P71/KR1 P70/KR0 USBP USBM USBPUC 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 5 - 83 3 P111 P111 3 3 P16 Volume PWM 2 2 P11 P12 AVREF VDD P110 P110 AVREF P20 P21 P22 P23 P50 P51 P52 P53 P20 P21 P22 P23 P50 P51 P52 P53 PWM RxD TxD 1 11 2 3 4 5 6 7 8 9 1 11 2 3 4 5 6 7 8 9 OE 19 18 17 16 15 14 13 12 Date: Size A3 Title 1 2 3 4 5 6 7 8 1 2 3 P70 P71 P72 C2 0.1uF Tuesday , March 16, 2010 Document Number TS-TCS00463 TK-78K0R/KE3C+USB (LEFT) (PUSH) (UP) 16 15 14 13 12 11 10 9 CN1F8K-271 MR2 C1 0.1uF EVDD 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9 CN1F8K-271 MR1 EVDD SN74LVC574ADGV Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 19 18 17 16 15 14 13 12 SN74LVC574ADGV EVDD CLK D1 D2 D3 D4 D5 D6 D7 D8 U4 OE Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 EVDD CLK D1 D2 D3 D4 D5 D6 D7 D8 U2 20 VCC GND 10 20 VCC GND 10 1 2 1 2 AVREF U1 DP_A COM_A U3 DP_A COM_A 6 5 4 Sheet 1 7 9 7 9 of (DOWN) (RIGHT) 7SegB LA-301MB DP A B C D E F G 7SegA LA-301MB DP A B C D E F G SKRHABE010 SW2 6 1 10 8 5 4 2 3 6 1 10 8 5 4 2 3 4 P73 P74 Rev 2.0 EVDD EVDD TK-78K0R/KE3L+USB User’s Manual 0.1uF C22 GND ID_NC DD+ VBUS USB2 UX60A-MB-5ST 1 5 4 2 3 1 SW3 2 1 100 BLM41PG750S C17 + 4.7uF/25V SKQMBB R11 L2 2 10K R8 USBVDD 1 R6 1.5K EVDD 1 2 MR3 R19 2 1 100K R22 1 1 2 3 4 1.5K RESET 2 CN1E4K-105J 8 7 6 5 2 PD5 PD6 PD2 PD1 PD0 4 3 5 1 2 C21 P41 RxD6USB 100K R20 EVDD 0.1uF C19 0.1uF 3 2 5 1 A2 A1 DIR VCCA U11 SN74LVC2T45DCU EVDD USBPUC USBM USBP USBREGC Vdd Vss REGC P121/X1/OCD0A 4 P16/TOH1 P15 P14/RxD6 P13/TxD6 P12/SO10 P11/SI10 P10/SCK10 B1 VCCB 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 C23 0.1uF C20 0.1uF PD2 C24 0.1uF USBVDD USBVDD USBVDD EVDD 6 7 8 UPD78F0730MC P61 P60 P32/INTP3/OCD1B P31/INTP2/OCD1A EVdd EVss P33/TI51/TO51 P17/TI50/TO50 GND B2 P122/X2/EXCLK/OCD0B FLMD0 RESET P120/INTP0/EXLVI P00/TI000 P01/TI010/TO00 P30/INTP1 U9 USBVDD 15 14 13 2 27 2 27 11 10 9 8 7 6 5 4 3 2 1 12 PD1 PD0 (Shield) FLMD0 P41 RESET 0.47uF 0.47uF 1 10K FLMD0U 1 10K CSTCE16M0V53-R0 Y3 2 C18 1 R16 1 R17 TPU4 TPU5 1.5K R9 USBVDD C16 SN74LVC1G125DCK 4 U10 2 R12 2 R13 SN74LVC3G07DCT U8B USBVDD EVDD 8 C15 0.1uF EVDD MINICUBE2 I/F EVDD 2 4 6 8 10 12 14 16 HIF3FC-16PA-2.54DSA 1 T_RESET 1 TPU3 1 PD6 PD5 1 R15 TPU2 TPU1 1 1 100K R5 2 1.5K RxD6USB 2 EVDD EVDD 4 1 8 5 7 3 7 16 SW1-1 USBVDD TPU6 TPU7 SN74LVC2G125DCU U7B 3 SN74LVC3G07DCT U8A TPU8 TPU9 SW4 1 2 4 5 6 8 Date: Size A3 Title ↓Debug/Writer ↑K0R<-->K0USB CHS-08B 1 U7A 6 15 SW1-2 R21 100K P40 P12 1 1 1 Sheet TxD6USB Wednesday , January 27, 2010 Document Number TS-TCS00463 TK-78K0R/KE3C+USB EVDD EVDD P11 14 SW1-3 CHS-08B 3 4.7K R7 CHS-08B 2 C14 0.1uF EVDD SN74LVC2G125DCU SSSS223600 10K R18 USBVDD TxD6USB FLMD0U 100K R14 100K R10 EVDD 1 7 RESET SW FG4 FG3 FG2 FG1 FG4 FG3 FG2 FG1 1 3 8 4 8 4 1 1 1 GND RES SI VDD SO 6 7 8 9 10 11 12 13 FL0 RESET_IN CLK_IN 5 3 1 FP1 1 2 1 2 1 - 84 2 1 1 3 5 7 9 11 13 15 1 P40 2 of RESET FLMD0 4 1 1 Rev 2.0 TK-78K0R/KE3L+USB User’s Manual 1 1 2 P31 1 1 2 XXX 1 P31 AGND R52 10K 2 AGND 2 AGND R42 24K 2200pF C31 AGND R53 0.1uF C42 AVDD U15 SN74LVC1G07DCK R51 4 1 AVDD AVDD 12K R47 AGND 6800pF 1000pF AGND C41 C40 2 NF1 NFM41PC204F1H3 1 3 R49 1000pF 1000pF 24K C37 1 C36 24K 2 R34 AGND 3 Y VCC 4 5 1K 12 13 2 AGND 0 AGND 12 CHS-08B 5 AGND AGND Volume 2 AGND 1.0uF AGND 2 AGND C35 1 0.1uF C47 2 1 C43 C45 0.22uF 2200pF C30 R41 36K 2 AGND 18K R48 1.0uF AGND 1 2 FFC-2AMEP1 JP1 1800pF C39 2 AGND 36k R36 22K R25 1000pF 1 AVDD AVDD 1000pF C34 36K R35 10uF/25V + C46 4.7uF/25V R50 10K C25 C44 1 R27 22K VR1 CT6-EP10K(103) 1 3 R45 10K 33K R24 R40 30K 1 SW1-5 AGND U13D 14 LMV324M AVDD AGND 0.1uF C28 AVDD SN74LVC1G14DCK GND A + NC 1 2 2 10 9 AGND 3 7 4 2 8 U13C AVDD HP Sense By pass AGND 8 5 LM4865MM Vo2 Vo1 R44 10K R38 12K AGND U13A 1 LMV324M AVDD 2 AGND DC Vol/SD -Vin U14 AGND R30 XXX 3 2 33K R23 LMV324M AVDD R29 20K R28 20K AVDD 1 4 11 1 1 2 1 2 2 AGND R26 10K 1 2 4 11 P16 1 2 4 11 R33 Volume PWM FFC-2AMEP1 JP4 P16 1 2 1 2 1 1000pF C32 39K R31 2 CON2 J3 1 2 1 C29 AGND 5 6 0.1uF C27 AVDD 2200pF R39 39K 2 AGND 20K R46 1200pF C38 2 AGND 39K R32 1000pF C33 1 AGND + C26 4.7uF/25V 1 2 R43 10K R37 10K 1 3 2 Date: Size A3 Title J1 SPEAKER OUTPUT AGND LGY 6502-0900FC RIGHT AGND U13B 7 LMV324M AVDD 4 11 PWM IN 1 EVDD 1 2 1 2 5 3 1 VDD 2 1 2 1 2 1 2 GND 1 2 1 2 U12 + - 1 + - - 85 6 + - + - AVDD SW5 Sheet 5 2 SSSS222700 Wednesday , January 27, 2010 Document Number TS-TCS00463 TK-78K0R/KE3C+USB Audio 6 3 4 1 3 of 4 Rev 2.0 TK-78K0R/KE3L+USB User’s Manual - 86 - USBVDD USBVDD2 3 1 + 1 2 3 CON2 1 2 C48 4.7uF/25V J2 +12V CN3 HEC0470-01-630 FFC-3AMEP1 2 JP2 + 3 8 7 C51 10uF/25V 0.1uF C49 6 2 U16 T TAB U17 LM1117MPX-3.3 2 VIN VOUT TPS2148IDGN EN1 EN2 LDO_EN + GND OUT1 OUT2 VIN/SWIN1 LDO_OUT GND 1 USB Power 1-2:Debug USB 2-3:V850 USB 3 C52 10uF/25V 5 1 4 + C50 10uF/25V 3 1 VDD FFC-3AMEP1 2 JP3 Power 1-2:USB 2-3:AC Adapter Date: Size A3 Title VDD 13 SW1-4 LED1 PG1112H R54 330 Wednesday , January 27, 2010 Document Number TS-TCS00463 TK-78K0R/KE3C+USB POWER CHS-08B 4 Sheet 4 of 4 Rev 2.0 TK-78K0R/KE3L+USB User’s Manual