Touch Key Workshop v3.0 User’s Guide Revision: V1.00 Date: ������������ May 23, 2014 Touch Key Workshop v3.0 User’s Guide Table of Contents 1 Development Platform Introduction and S/W Installation................................... 3 Characteristics........................................................................................................................ 3 System requirements.............................................................................................................. 3 S/W Installation....................................................................................................................... 4 2 Touch Key Workshop S/W Functions and Operation......................................... 10 S/W Development Flow........................................................................................................ 10 Quick Start............................................................................................................................ 10 Create a new project........................................................................................................................ 10 Add keys and components...............................................................................................................11 Key or component property setting.................................................................................................. 12 Change the key or component pin setup......................................................................................... 13 S/W Functional Description.................................................................................................. 13 Menu Functional Description........................................................................................................... 13 Toolbox Window............................................................................................................................... 15 Project Window................................................................................................................................ 15 Global Option Window..................................................................................................................... 16 Properties Window........................................................................................................................... 17 3 Touch Key Tuning S/W Functions and Operation............................................... 18 Quick Start............................................................................................................................ 18 Touch Key Tuning ........................................................................................................................... 18 S/W Functional Description.................................................................................................. 19 Touch Key Signal Observation Area................................................................................................ 20 Tuning Window................................................................................................................................ 21 Global Option Window..................................................................................................................... 22 Scope Window................................................................................................................................. 22 Menu Functional Description........................................................................................................... 22 4 Component Generation......................................................................................... 23 Component Library System File Maker................................................................................ 23 Maker instructions............................................................................................................................ 24 Component programming................................................................................................................ 28 5 Appendix A............................................................................................................. 29 6 Appendix B............................................................................................................. 30 Rev. 1.00 2 of 31 May 23, 2014 Table of Contents System Configuration............................................................................................................. 3 Touch Key Workshop v3.0 User’s Guide Development Platform Introduction and 111 S/W Installation The HOLTEK Touch Key Workshop V3 is a third generation platform, using an intuitive drag and drop methodology for touch switch project implementation. It fully integrates the touch software library, compiler function, key signal monitor and parameter adjustments functions. Development Platform Introduction and S/W Installation Characteristics ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ Supports BS82xxx, BS83xxx, BS84xxx Flash series MCUs Provides friendly and intuitive operation interface Easy key sensitivity and parameter adjustment Integrated compiler Integrated touch control and peripheral library Advanced users defined component libraries System requirements ▆▆ ▆▆ PC with USB interface Operation system: Microsoft Windows® XP or above System Configuration USB 10-pin connector e-IsoLink Rev. 1.00 3 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ▆▆ ▆▆ S/W Installation ●● Step 1 When starting the software installation, the following welcome dialogue will be displayed after which ‘Next’ should be selected to proceed with the installation. Rev. 1.00 4 of 31 May 23, 2014 Development Platform Introduction and S/W Installation S/W Components • Holtek Touch Key Workshop: Used for MCU key setup, touch parameter setup, program generator and compiler functions • Holtek Touch Key Tuning: key signal monitor, sensitivity adjustment and touch parameter adjustment H/W Components • e-IsoLink: Used for OCDS, In Circuit Programming (ICP) and data uploading • Target board: Used for functional verification Touch Key Workshop v3.0 User’s Guide ●● Step 2 Setup the installation folder, the default folder is “C:\Program Files\Holtek MCU Development Tools\Touch Key Workshop”, and click “Next” to continue the installation. Development Platform Introduction and S/W Installation Rev. 1.00 5 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 3 Setup the start menu folder, the default folder is “Holtek MCU Development Tools\Holtek Touch Key Workshop”, and click “Next” to continue the installation. Development Platform Introduction and S/W Installation Rev. 1.00 6 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 4 To add a desktop shortcut, check “Create a desktop icon”. Development Platform Introduction and S/W Installation Rev. 1.00 7 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 5 Confirm the settings, click “Back” to return to the the previous steps to modify if necessary, or click “Install” to complete the installation. Development Platform Introduction and S/W Installation Rev. 1.00 8 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 6 The completion dialogue will be shown after the installation is completed. If the “Launch Holtek Touch Key Workshop” box is checked, the S/W will be executed after the ‘Finish’ button is clicked. Development Platform Introduction and S/W Installation Rev. 1.00 9 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Touch Key Workshop S/W Functions and 222 Operation S/W Development Flow Basic Setting Set the project name, project path and MCU option Tuning1 Functional Setting Set keys, Add components function Finish Advanced users HT-IDE3000 Finish Note: needsadditional additional“Tuning” Scope components. Note: Tuning Tuning needs component. Quick Start Create a new project 1. In the “Project Name” location in the project window, enter a project name. 2. In the “Project Location” set the project path, the default path is the same as that of the HTIDE3000. After the project has been created, it will generate a new subdirectory with the same project name in the directory to store any related files. 3. Choose the MCU that is to be used in the project. 4. Choose the touch library version. Note: If there is an old project in start interface, you can click "New" to create a new project, and then operate according to the above steps 1 to 4. Rev. 1.00 10 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation Normal users Touch Key Workshop v3.0 User’s Guide Touch Key Workshop S/W Functions and Operation Add keys and components 1. Add a key Method 1 Drag a “KEY” from the toolbox to the IC pin position labeled KEY, as shown below: Release the left mouse button and it will change to the condition shown below where the original PB0 name changes to the key function. Rev. 1.00 11 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Method 2 Drag a “KEY” from the toolbox into the IC block shown by the dotted box. The touch keys will be automatically arranged in a KEY1, KEY2 ...etc order. Key or component property setting When dragging a key or a component from the toolbox, its property settings will be displayed in the properties window. The following figure shows the key threshold value setting. If the properties window is blank, this means that the key has not had any properties setup. Rev. 1.00 12 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation 2. Add a component Drag a component from the toolbox into the IC block, shown by the blue box in the diagram to complete the settings. Touch Key Workshop v3.0 User’s Guide Change the key or component pin setup The already setup pins, shown in red, can be directly dragged to other I/O pins which have a KEYx label. When dragged the pin colour will change to green. If the colour turns red, then the pin setup is complete. If the colour of the dragged pin does not change to red, then this means that the pin could not be changed. S/W Functional Description Menu Functional Description Rev. 1.00 13 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation For example, to change the SDA pin in the Scope component to PC7, just drag the SDA directly to PC7 pin until the colour turns red. Touch Key Workshop v3.0 User’s Guide View Menu Functions In this menu various information can be selected for display on the workshop working area. Functions such as Toolbox, Properties, Global Options, Project, MCU Resource, Output and Help, can be selected for display in the corresponding Window. In the Available Language section, select the appropriate language for workshop use from a choice of presently available, Traditional Chinese, Simplified Chinese and English. Rev. 1.00 14 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation Home Menu Functions ▆▆ New: Create a new project ▆▆ Open: Open an already saved project file ▆▆ Save: Save the current edited project ▆▆ Build: Build project • Download: If checked, the program will be downloaded to the board after successful compilation. The board must not be connected to an external power supply or batteries when downloading. • OCDS mode: If checked, components must not be setup on the pins labeled OCDSSDA and OCDSSCK. ▆▆ HT-IDE3000: Advanced users can use the HT-IDE3000 to continue to develop the project. After executing the HT-IDE3000, the Touch Key Workshop will be switched off automatically. If the user's computer is not installed with the HT-IDE3000, then it will be in a gray state. ▆▆ Tuning: This is used to fine tune the Touch Keys to obtain the optimal sensitivity and touch parameter adjustments. If TUNING components are not chosen, such as TUNING_IIC and TUNING_UART, this column will be in a gray state. ▆▆ Register e-Link: Note that the e-Link must be registered before use. If registered, it will be in a gray state. ▆▆ Upgrade the e-Link F / W: This will upgrade the e-IsoLink firmware, or change the e-link to be used for other purposes other than touch keys. Touch Key Workshop v3.0 User’s Guide Toolbox Window Here keys and components are provided for users to add functions. Touch Key Workshop S/W Functions and Operation Project Window ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ Rev. 1.00 Project Name: Enter the project name. Note that after a "Save" operation the project name can not be changed later. Project Location: Set the project path, the default path is the same as the HT-IDE3000. MCU: Choose the MCU that is to be used. Library Application: Choose the touch software library version. MCU Configuration Options: For normal users, the MCU options are not required to be setup so the default options can be used. Click the red framed block below to make changes if necessary. 15 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Global Option Window Name Debounce Times Range 50ms~190ms Auto Calibration Period 62.5ms~937.5ms High Sensitive 0=Normal Sensitive. 1=High Sensitive (check) Maximum Key HoldTime Disable. 4 sec~60 sec One Key Active 0=Off; 1=On (check) Fast Response1 0=Off; 1=On (check) Auto Frequency Hopping1 0=Off; 1=On (check) Power Save1 0=Off; 1=On (check) Noise Protect1 0=Off; 1=On (check) Moving Calibration1 0=Off; 1=On (check) Note: 1. Here it is necessary to check Advance Mode. 2. Options will vary according to the library version. Rev. 1.00 16 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation The global option window provides the touch key parameter for user setup. The available touch key parameters are shown in the accompanying table. Touch Key Workshop v3.0 User’s Guide Properties Window When dragging a component, its properties can be set in the properties window or by clicking on the added component to change its properties. If a component does not require additional settings, then the properties window will be blank. The key properties are setup as follows: Rev. 1.00 17 of 31 May 23, 2014 Touch Key Workshop S/W Functions and Operation The Key trigger threshold value has a range of 8~255. Check “Apply all key” and adjust the threshold values of the other keys. Touch Key Workshop v3.0 User’s Guide 333 Touch Key Tuning S/W Functions and Operation The Touch Key Tuning functions provide users with a software interface to observe the key signals as well as providing a platform for touch key sensitivity and parameter adjustment. The platform allows users to observe the results immediately after adjustment. In addition to being used via the Holtek Touch Key Workshop, the tuning software can also be used independently. Touch Key Tuning 1. After running from within the Touch Key Workshop the tuning software menu screen is shown as follows: 2. After executing the tuning software, the following screenshot will be displayed. It is necessary to select the target board and e-IsoLink transmission protocol first, which is set in the "Protocol" section of the software with a default protocol of IIC. After this the power supply for the target board can be setup. Rev. 1.00 18 of 31 May 23, 2014 Touch Key Tuning S/W Functions and Operation Quick Start Touch Key Workshop v3.0 User’s Guide S/W Functional Description 3 1 4 1. Touch Key signal observation area 2. Tuning Window 3. Global Option Window 4. Scope Window Rev. 1.00 19 of 31 May 23, 2014 Touch Key Tuning S/W Functions and Operation 2 Touch Key Workshop v3.0 User’s Guide Touch Key Signal Observation Area From the touch key signal observation area, whether the pin is defined as a touch key or I/O pin, it can be observed within this area. If the pin is used as an I/O pin, then it will be grayed out as shown below. If the pin is used as a touch key then users can click on the key to observe it in more detail. When the key is pressed, it will be displayed in red, as shown in the diagram, here KEY1 is pressed and the key flag is setup in the program. Rev. 1.00 20 of 31 May 23, 2014 Touch Key Tuning S/W Functions and Operation Key State Display The actual detected difference is shown in the green block, the greater the difference is, the more the green area is. Touch Key Workshop v3.0 User’s Guide The displayed numbers in the key icon are described in the following diagram. Key No. Offset Cap. Threshold Background Signal Tuning Window The Tuning Window can observe a single key signal value and adjust the key sensitivity. Switch Key Count of the Key pressed time Reset time & count Single Strength Adjust sensitivity of Key 8~255 Rev. 1.00 21 of 31 May 23, 2014 Touch Key Tuning S/W Functions and Operation Original Signal Touch Key Workshop v3.0 User’s Guide Global Option Window The Global Option Window provides touch key parameters which the user can change. Users can observe the adjusted results immediately after the setup values are changed. Refer to Page 16, Global Option Window, for the touch key parameters. Scope Window Functional Description ▆▆ Automatic Scale: If checked, the software will automatically setup the Y-axis display range, otherwise the Y upper and lower limits will need to be setup manually. ▆▆ Start/Stop: Start or stop the Scope display. ▆▆ Reset: Clear the waveform and reset the pressed key count value and time in the tuning window. Menu Functional Description ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ ▆▆ Rev. 1.00 New: Create a new Touch Key Workshop project Open: Open a previously saved Touch Key Workshop project file Save to INC/H: Touch Key setting output saved to HXT_REFERENCE.inc Register e-Link: The e-Link must be registered before use. If this area is highlighted, then the e-Link has already been registered. Upgrade firmware: Upgrade the e-IsoLink firmware, or change the usage for non- Touch Key e-Link use. Power: Set the e-IsoLink to provide power to the target board. There are 5V, 3.3V or external power supply options. Protocol: Select the communication protocol between the target board and the e-IsoLink. There are two kinds of interface, IIC and UART. If the "TUNING_IIC" in the Touch Key Workshop is selected, then the IIC protocol will be used. If "TUNING_UART" is selected, then the UART protocol will be used. 22 of 31 May 23, 2014 Touch Key Tuning S/W Functions and Operation The Scope can display the key values. Users can check the list on right side of the Scope window to observe the corresponding selected key waveforms. Touch Key Workshop v3.0 User’s Guide 444 Component Generation Touch Key Workshop is an open platform, in which advanced users can create their own component library, which can be shared with other users. Component Library System File Maker Rev. 1.00 23 of 31 May 23, 2014 Component Generation Users can execute the "Component Library System File Maker" in the start menu to call up this creation function. Touch Key Workshop v3.0 User’s Guide Maker instructions ●● Step 1 – Pin setting Component Generation 1. Specify the component name, and it will appear in the toolbox of the Touch Key Workshop. 2. Specify the folder name for the component library path. The folder is required for proper placement of the component system files, the related program code files and the component help documents. Its root directory is the “McuLibrary\Peripherals” directory under the platform installation path. As an example, if the platform installation path is “C:\Program Files\Holtek MCU Development Tools\Touch Key Workshop”, then the folder should be located in “C:\ Program Files\Holtek MCU Development Tools\Touch Key Workshop\McuLibrary\Peripherals”. 3. “Component pin setup” will setup the component pins combined with the MCU I/O pins. These settings also affect the software display. If the component does not have a corresponding pin, then it is not necessary to implement this setup. 4. After setting the “Component pin setting”, the right side can be clicked in sequence for the detailed settings. Rev. 1.00 24 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 2 – Global Option Component Generation After setting, the software screen is shown in the accompanying diagram. Rev. 1.00 25 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide ●● Step 3 – Library Component Generation 1. Select the development language: C language or assembly language. The C language compiler can only use the V2 version at the present time. 2. Set the component used code file in the source file. If “Yes” is selected to “Add to HT-IDE3000’s Project”, then the HT-IDE3000 will add the files to the project, as shown in the following figure. 3. If the source files’ content is blank, when “Save” is first executed, it will generate .C/.ASM, .AEX and .CEX with the name of the component directory automatically. For example, the component directory sets “LEDX4_V10” and the development language selects “asm”, then it will generate “LEDX4_V10.asm”, “LEDX4_V10.AEX” and “LEDX4_V10.CEX” in the component directory. Rev. 1.00 26 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Component Generation 1. The MCU name which supports the component should be setup in the “Misc” area. 2. The component description files can be setup in the “Help Document” area. With regard to documents, it is recommended that PDF files are used and that they should be placed in the component library location. Rev. 1.00 27 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Component programming ▆▆ ▆▆ Rev. 1.00 28 of 31 May 23, 2014 Component Generation ▆▆ Program structure: users need to implement two subroutines named using the component names. • <component name>_INITIAL: For the component initialization at power on. e.g. LEDX4_V20_INITIAL • <component name>: Component functional program entry e.g. LEDX4_V20 File naming rule: The files need to be named the same as the folder. File structure: It is necessary to provide at least three kinds of files with extension names as follows: • .C/.ASM: Place the main program for the component. If the development language is the C language, then the extension name is .C. If the development language is assembly language, then the extension name is .ASM. • .AEX: Use assembly language syntax to locate the label of the external output. e.g. EXTERN _LEDX4_V20_INITIAL:NEAR EXTERN _LEDX4_V20:NEAR • .CEX: Use C language syntax to locate the function name of the external output. e.g. extern void LEDX4_V20_INITIAL(); extern void LEDX4_V20(); Touch Key Workshop v3.0 User’s Guide 555 Appendix A The e-IsoLink F/W will automatically identify the MCU type used for evaluation and define the e-IsoLink pin. Two examples follow: (A) I2C ICP OCDS 1 2 3 4 5 6 7 8 9 10 — SDA — SCL — — — VDD — GND — — — — ICPDA ICPCK — VDD — GND — — — — O2D O2C — VDD — GND (B) Pin I2C ICP 1 2 3 4 5 6 7 8 9 10 — SDA — SCL — — — VDD — GND — ICPDA — ICPCK — RESB — VDD — GND The MCU pin usage is as follows: MCU Class (A) (A) (A) (B) (A) (A) (B) (A) (A) (B) (A) (A) BS82B16-3 BS83A04A-3 BS83A04A-4 BS83B12-3 BS83B12A-3 BS83B12A-4 BS83B16-3 BS83B16A-3 BS83B16A-4 BS83C24-3 BS84B08A-3 BS84C12A-3 Rev. 1.00 29 of 31 May 23, 2014 Appendix A Pin Touch Key Workshop v3.0 User’s Guide 666 Appendix B Evaluation back board cautions: If evaluation back board is connected with a battery, the power cannot be turned on during or before downloading, otherwise it will affect programming. If there is no any operation for about 2 minutes after the power is turned on, the power will be automatically turned off. Appendix B Rev. 1.00 30 of 31 May 23, 2014 Touch Key Workshop v3.0 User’s Guide Appendix B Copyright© 2014 by HOLTEK SEMICONDUCTOR INC. The information appearing in this Data Sheet is believed to be accurate at the time of publication. However, Holtek assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise. Holtek's products are not authorized for use as critical components in life support devices or systems. Holtek reserves the right to alter its products without prior notification. For the most up-to-date information, please visit our web site at http://www. holtek.com.tw. Rev. 1.00 31 of 31 May 23, 2014