IBM H8 User Manual

HTEB1 User manual
Hitachi
H8/Tiny 3664F
LowCost
Evaluation Board
User Manual
Issue 0.2 Page 1 07/2002
HTEB1 User manual
PREFACE
Product Warranty The warranty period against defects in materials and workmanship are as set out in the accompanying Customer Information sheet.
Limitation of Warranty The foregoing warranty does not cover damage caused by fair wear and tear, abnormal storage conditions, incorrect use, accidental misuse, neglect, corruption, misapplication, addition or modification or by the use with other hardware or software, as the case may be, with witch the product is incompatible. No warranty of fitness for a particular purpose is offered. The user assumes the entire risk of using the product. Any liability of embesso GmbH is limited exclusively to the replacement of defective material or workmanship.
Trademarks All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organisations. Microsoft is a registered trademark and Windows and Windows NT are trademarks of Microsoft Corporation. IBM is a registered trademark of International Business Machines Corporation.
Cautions This document may be, wholly or partially, subject to change without notice. All rights reserved. No one is permitted to reproduce or duplicate, in any form, a part or this entire document without embesso GmbH written permission.
Restrictions Please refer to the restrictions of all components and tool suppliers.
Hardware Considerations Grounding: This hardware is designed for use with equipment that is fully grounded. Ensure that all equipment used is appropriately grounded. Failure to do so could lead to danger for the operator or damage the equipment. Electrostatic Discharge Precautions: This hardware contains devices that are sensitive to electrostatic discharge. Ensure appropriate precautions are observed during handling and accessing connections. Failure to do so could result in damage to the equipment. Electromagnetic Compatibility: This product can cause radio frequency noise when used in the residential area. In such cases the user of the equipment my be required to take appropriate countermeasures under his responsibility.
Support Support by embesso GmbH is provided only for the supplied hardware. Any software tools are supported from their supplier. Please notice that maybe some software tools coming with this kit are only unsupported freeware and no support will be given. For embesso support please contact: support@embesso.com
HTEB1 User manual
Table of Contents
PREFACE ..............................................................................2
Table of Contents ..................................................................3
1 Overview .........................................................................4
1.1 System Development Kit content.................................... 4
1.2 Hardware description ....................................................4
1.3 Features...................................................................... 5
1.4 Board overview ............................................................ 6
1.5 Jumpers and switches ...................................................7
1.6 Connectors ..................................................................9
1.7 Start-Up instructions..................................................... 12
2 Development Environment ................................................. 15
2.1 Creating a program using IAR-EWH8 ..............................15
2.2 Download the code using FDT ........................................ 23
2.3 Workflow.....................................................................31
3 Examples ......................................................................... 32
3.1 Key’s and LED’s............................................................ 33
3.2 LCD ............................................................................36
3.3 SCI............................................................................. 39
3.4 A/D + PWM .................................................................41
3.5 AT-Keyboard-Interface.................................................. 44
Appendix A: CD-R content ......................................................51
Appendix B: Schematic...........................................................52
Appendix C: Board layout .......................................................53
Issue 0.2 Page 3 07/2002
HTEB1 User manual
1 Overview
1.1 System Development Kit content
Thank you for purchasing our product. If you take care on the different hints in this manual you will have great success in software development with this microcontroller. Please refer to the documents listed in appendix.
The System Development Kit contains the following parts:
Evaluation-Board HTEB1 CD-ROM User manual (this document) RS232 cable (1.8m, DSub9, male­female)
4 plastic feet for the HTEB1
Carefully remove the board from the shipping carton. Check first if there are any damages before power on the evaluation board.
1.2 Hardware description
The Hitachi-Tiny-Eval-Board (HTEB1) is a low cost multifunctional evaluation board for the Hitachi Tiny H8/3664F microcontroller. It can be used stand alone for software development and testing or as a simple target board. You can use the Flash-Download-Tool (FDT) for programming the target code or work with a debug system (E10T) at the provided connector. The board allows the designer immediately to start with the software development before his own final target system is available.
This eval-kit provides some additional hardware e.g. 8 LED’s, a 2*16 Character LCD, 4 key’s, a PC-AT-keyboard connector, an I2C-connector and more for hard- and software evaluation. All peripherals are used by some software application notes. Please refer chapter 3.
HTEB1 User manual
1.3 Features
Contains H8/3664F microcontroller
In-Circuit serial Flash programming
All resources available for evaluation
All pins routed to connectors
9.8304 MHz main crystal
32.768 kHz sub crystal
UART interface with MAX232 level converter and SubD-9 (female)
connector
8 User LEDs
2*16 characters LCD with LED backlight (switchable)
Additional connector for external LCD
4 user keys
PC-AT-Keyboard interface
2 potentiometer connected to A/D-channel 0/1
Reset button
1 switch user/prog(programming)
E10T-debug-connector
+5V voltage regulator on board
Issue 0.2 Page 5 07/2002
HTEB1
Prog/Run
User manual
1.4 Board overview
2*16 char LCD with LED backlight
Ext.-LCD connector
Contrast
8 user LEDs
DA connector
RS232 connector SubD0 female
Power 7,5 V­9V DC
I2C connector
E10T connector
Crystal socket
AT/PS2 keyboard connector
+
-
P1 = ADC 0
P2 = ADC 1
4 user keys Reset button
Figure 1 Board overview
switch
HTEB1 User manual
1.5 Jumpers and switches
JP1 is used for switching the serial interface from 1:1 to crossed connection. If you connect a 1:1 cable (like the cable that comes with the kit) use the default setting. If you connect a crossed cable set the jumper to alternate setting.
JP3 is used for the LCD-LED backlight. If the jumper is closed (1-2) the backlight will be ON. Remove the jumper (=open) if backlight operation is not necessary.
JP2 is used for I2C interface
JP4 is used as an output for the DAC or for PWM
JP1 Operation
1-3, 2-4 1:1 operation 1-2, 3-4 Crossed connection
JP3 Operation
Closed LED backlight ON Open LED backlight OFF
JP2, I2C-CON Operation
1+5V 2SDA 3SCL 4GND
JP4, D/A CON Operation
1 D/A Output (PWM) 2GND
Issue 0.2 Page 7 07/2002
HTEB1 User manual
S_PROG/RUN switches between RUN- and PROG(PROGRAMMING) mode.
KEY_1 (T1) to KEY_4 (T4) are user keys.
RESET_KEY (T7) is for reset.
Orientation Operation
LEFT PROG(programming) mode RIGHT RUN mode
Main crystal (Q1) can be changed to another frequency. Therefore a crystal socket is provided. Please refer to the microcontroller hardware documentation for recommended devices. The crystal type should be a HC49 / HC49U type. Eventually change the capacitors C6/C7 if necessary. If you change the crystal frequency take care on possible changes by flash download tool (see FDT manual).
Figure 1.5 crystal socket
HTEB1 User manual
1.6 Connectors
X1, Serial communication, SubD-9 female X2, Power connector, for cable connection X4, MiniDIN (PS2)
X2, Pin Operation
1GND 2 DC power supply,
7,5 – 9 VDC, approx. 180mA with LED backlight
X1 (SubD9), Pin Operation Remark
1 (DTR,DSR, DTS) Connected to X1.4, X1.6 2 TXD Connected to JP1.1 3 RXD Connected to JP1.3 4 DTR Connected to X1.1, X1.6 5GND 6 DSR Connected to X1.1, X1.4 7 RTS Connected to X1.8 8 CTS Connected to X1.7 9 n.c. Not connected
X4 (Mini-Din)
µC-Pin Operation
Pin
1 P17 (can be Data or Clk) 5 P16 (can be Clk or Data) 3GND 4Vcc 2,6 n.c.
Issue 0.2 Page 9 07/2002
HTEB1 User manual
OnBoard LCD (IC4) X3, external LCD-connector (057-016-1)
X5, E10T debug connector (Sys-Con)
LCD Modul (IC4) pin
X3 (LCD-CON) (057-016-1)
µC­pin
Operation
pin
31 -GND 42 -Vcc 5 3 - contrast (=P3) 6 4 P75 RS (register select) 7 5 P74 R/W (read / write) 8 6 P20 EN (enable) 97 P50D0 10 8 P51 D1 11 9 P52 D2 12 10 P53 D3 13 11 P54 D4 14 12 P55 D5 15 13 P56 D6 16 14 P57 D7 1 15 - Backlight + 216 -GND
X3 pinout
X5 (SYS-CON), pin
µC-pin Operation
X5 pinout
1 P87 Debug pin 5 P86 Debug pin 7 /NMI /NMI 11 P85 Debug pin 13 /RESET reset control 8Vcc 2,4,6,10,12,14 GND 3,9 n.c. Not connected
Issue 0.2 Page 10 07/2002
HTEB1 User manual
SV1,SV2, SV3,SV4 connectors with microcontroller signals
SV1 SV2 SV3 SV4 PIN Operation PIN Operation PIN Operation PIN Operation
1,2 GND 1,2 GND 1,2 GND 1,2 GND 3 n.c. 3 n.c. 3 n.c. 3 P51 4 n.c. 4 n.c. 4 n.c. 4 P50 5 P14 5 P22 5 P76 5 n.c. 6 P15 6 P21 6 P75 6 n.c. 7 P16 7 P20 7 P74 7 n.c. 8 P17 8 P87 8 P57 8 n.c. 9AN4 9P86 9P56 9n.c. 10 AN5 10 P85 10 P12 10 n.c. 11 AN6 11 P84 11 P11 11 n.c. 12 AN7 12 P83 12 P10 12 n.c. 13 AN3 13 P82 13 P55 13 GND 14 AN2 14 P81 14 P54 14 /RESET 15 AN1 15 P80 15 P53 15 VCL 16 AN0 16 /NMI 16 P52 16 n.c. 17,18 Vcc 17,18 Vcc 17,18 Vcc 17,18 Vcc
HTEB1 User manual
1.7 Start-Up instructions
1.7.1 Installing the HTEB1
Installing the HTEB1 requires a power supply and a serial connection to a host computer (common PC). The serial communications cable for connecting the HTEB1 to a host computer is supplied and has 1:1 connectivity.
PC with COM1/2
Power supply 7,5-9V DC
Figure 1.8 shows how to connect the HTEB1 to a PC and to a power supply
1.7.2 Power Supply
The HTEB1 hardware requires a power supply of 7,5V DC at minimum. Please don’t use a power supply with more the 9V DC because the on board voltage regulator becomes very hot!
The HTEB1 power consumption is about 180mA with LCD-backlight ON. Since total power consumption can vary widely due to external connectors, H8/3664F port state, use a power supply capable of providing at least 300mA at +7,5V DC.
The design includes circuitry for reversed polarity protection.
Please watch on GND (ground) connection between power supply, eval­board and PC.
Issue 0.2 Page 12 07/2002
HTEB1 User manual
1.7.3 Test program
The HTEB1 is supplied with a short demo application when delivered. If you power up the eval-board for the first time, you will see a start up message and some LEDs lighting.
If no message appear, please set the switch “Prog/Run” to “Run-Mode” (right position) and power up the board or, if already done, press the reset-button.
The demo application contains a small “Running-Light” application. The keys can be used for control the state, P2 is used as speed control. First press the key T3 (RUN) for starting demo application. Then you can check the functionality by pressing the keys KEY T1 to KEY T4 or change the value of potentiometer P2.
[…]
Figure of the Demo application. “Running Light”
Any time you want to reset the application press the reset-button. If you want to reload the demo application later (after reprogrammed the eval­board) you can find the code on CD-R in the directory “X:\examples\flashdemo\runlight.a37” (For X use the appropriate char from your CD-ROM).
HTEB1 User manual
1.7.4 Software Installation
Software development on embesso-HTEB1 requires some software tools to be installed on your PC. All tools can be found on CD-R. Some of them must be installed separately. Please refer on installation / setup requirements.
You will find the following tools:
EWH8: IAR Embedded Workbench with a limited version of the IAR
C compiler for all Hitachi Tiny controllers, assembler, linker and library generator
FDT: A powerful freeware flash tool (flash-writer) from HMSE
Installation hints:
EWH8: Install EWH8 by start \programs\iar\autorun.exe . Follow
the instructions in setup and look at the readme.txt file.
FDT: Next install \programs\fdt\ftd15.exe. Then the plugin
fdt3664f.exe must be installed. Follow the setup instructions. A documentation will be found in fdt_man.pdf.
If you have installed these tools please refer to the next lessons for workflow.
NOTE: Most freeware tools are unsupported versions! Please refer to manuals or hints on website for FAQ’s!
It is strongly recommended to refer all additional documents like H8/3664F hardware manual and H8 programming manual. Please see the application notes and several readme files on CD-R. Sometimes you should watch on the Hitachi, HMSE and IAR websites for tool upgrading, news and latest versions of all tools.
Hitachi: www.hitachi-eu.com/semiconductors HMSE: www.hmse.com IAR: www.iar.com
Issue 0.2 Page 14 07/2002
HTEB1 User manual
2 Development Environment
2.1 Creating a program using IAR-EWH8
Software development can be done with a integrated embedded workbench like IAR-EWH8. This software contains an editor, some tools for organization and a tool chain for compiling, assembling and linking programs.
Start IAR Embedded Workbench on your PC. The following window will appear:
Now select File / New and select “Project”
HTEB1 User manual
Press OK and a file window will appear. Here first create a new directory (e.g. c:\MyTinyTest) and type the project filename “MyTinyTest”. After that click CREATE.
Now a new project is created and we must do some settings. In the window select under targets: “RELEASE”.
Issue 0.2 Page 16 07/2002
HTEB1 User manual
Now select release with the right mouse button. A popup appears. Select Options… and do the following settings:
In selection ICCH8/List select the List file box.
In section XLINK/Output select under Format “motorola” as the output format.
Loading...
+ 39 hidden pages