MCT HC08 User manual

HC08 Welcome Kit
Hardware-
Version 2.01
User Manual
June 30 2003

Copyright (C)2000-2003 by
MCT Elektronikladen GbR
Hohe Str. 9-13 D-04107 Leipzig
Telefon: +49-(0)341-2118354
Fax: +49-(0)341-2118355
Email: [email protected]
Web: http://www.elektronikladen.de/mct
This manual and the product described herein were designed
carefully by the manufacturer. We have made every effort to avoid
mistakes but we cannot guarantee that it is 100% free of errors.
The manufacturer's entire liability and your exclusive remedy shall
be, at the manufacturer's option, return of the price paid or repair or
replacement of the product. The manufacturer disclaims all other
warranties, either expressed or implied, including but not limited to
implied warranties of merchantability and fitness for a particular
purpose, with respect to the product including accompanying written
material, hardware, and firmware.
In no event shall the manufacturer or its supplier be liable for any
damages whatsoever (including, without limitation, damages for loss of
business profits, business interruption, loss of business information, or
other pecuniary loss) arising out of the use of or inability to use the
product, even if the manufacturer has been advised of the possibility of
such damages. The product is not designed, intended or authorized for
use in applications in which the failure of the product could create a
situation where personal injury or death may occur. Should you use the
product for any such unintended or unauthorized application, you shall
indemnify and hold the manufacturer and its suppliers harmless against
all claims, even if such claim alleges that the manufacturer was negli-
gent regarding the design or implementation of the product.
Product features and prices may change without notice.
All trademarks are property of their respective holders.
HC08 Welcome Kit

Contents
21Autostart Function ......................................
21FL08 Commands .......................................
20Serial Communication ...................................
20Overview ............................................
208. Flash Loader FL08 ...................................
19Additional HC08 Development Tools ........................
19Additional Information on the Web ..........................
18PLL Initialization ......................................
18Startup-Code ..........................................
187. Application Hints ....................................
17Power Supply .........................................
17User RS232 Port .......................................
15Monitor Mode Interface ..................................
15Clock Generation ......................................
14Controller Core and Input/Output ...........................
14Schematic Diagram .....................................
146. Circuit Description ...................................
115. Connectors .........................................
9Solder Bridges .........................................
9Jumpers ..............................................
94. Jumpers and Solder Bridges ............................
73. Parts Location Diagram ................................
52. Quick Start ..........................................
4Package Contents .......................................
3Technical Data .........................................
31. Overview ............................................
User Manual
1

249. Memory Map .......................................
22Redirected Interrupt Vectors ...............................
22Startup Behaviour ......................................
HC08 Welcome Kit
2

1. Overview
The HC08 Welcome Kit provides you with a small microcontroller
board that helps to evaluate the Motorola MC68HC908GP32. It is a
cost-effective, off-the-shelf solution which provides a stable hardware
platform for starting an HC08 application development.
The competitive price and the compact size of the evaluation board
make it ideal also for low- to mid-volume series applications.
A comprehensive range of development tools (debuggers, assem-
blers, C compilers) are available to help making software development
for the HC08 an easy process.
Technical Data
wMotorola MC68HC908GP32 8-bit Microcontroller (QFP44)
package, with up to 33 I/O-Pins
w9.8304 MHz Oscillator (removable, socketed), Bus Clock up to
8 MHz
walternatively: PLL-based clock generation with 32 kHz Crystal
w32 KB Flash Memory, 512 Byte RAM
wSPI - synchronous serial interface
w4x 16-Bit Timer (Input Capture/Output Compare/PWM)
w8 Channel 8-Bit A/D-Converter
wall I/O-Lines are available via header connectors on the board
wMonitor Mode Interface for In-System Programming (ISP)
wAdvanced features: Remote Power-Cycle and Remote Break
make debugging much easier
wSerial Interface including RS232 driver to connect a PC or a
serial LCD
wIndicator LED
w5V On-Board Voltage Regulator and connector for Wall Power-
Plug
User Manual
3

wReset push button (Power-On Reset)
wWire-wrap area 6x12
wcompact size: 100mm x 60mm (approx. 4" x 2.4")
Package Contents
wEvaluation Board with HC908GP32
wRS232 Cable (Sub-D9)
w9.8304 MHz canned oscillator
wintegrated High-Speed Flash Loader FL08
wUser manual (this document), schematic diagram
HC08 Welcome Kit V2.0
HC08 Welcome Kit
4

2. Quick Start
Nobody likes to read big manuals. For that reason we will summa-
rize the most important things in the following section. If you need
additional information, please refer to the more detailed sections of this
manual.
Here is how you can start:
wPlease check the board for any shipping damage
wCheck the Jumpers: the default position of JP1 (MON) and JP2
(AUTO) is open, JP3 (VENA) and JP4 (RRST) must be in
position 1-2
wCheck the solder bridges: factory default for BR1 and BR2 is
position 1-2, BR3 is open, BR4 and BR5 are closed
wConnect the Controller Module via RS232 to a PC. The connec-
tion between the HC08 Welcome Kit (connector X3) and the PC
is simply made using the included flat ribbon cable.
wStart a terminal program on the PC. An easy-to-use terminal
program is OC-Console which is available at no charge from our
Website!
wSelect a communication speed of 115200 Baud. Disable all
hardware or software protocols. Activate the *-handshaking (the
terminal must wait for the character "*" before sending another
S-Record line)
wConnect a Power supply of 8 to 12 VDC to X1 (central pin
carries +5V, GND outside)
wNow FL08 will start, a High-Speed Flash Loader software
which was programmed into Flash before shipping
wIf necessary, erase the Flash memory using command "X"
wStart the download using command "L"
wSend the S-Record file (OC-Condole command "Transfer")
User Manual
5

wNow the program is being loaded into Flash. During this
process, an increasing number of handshake characters becomes
visible. After reception of an S9 line, the programm will be
started
wTo restart the program (after reset) either type "G" or close the
AUTO jumper (JP2). Note: the user program must start at
address $8000 in this case.
We hope you will enjoy working with the HC08 Welcome Kit!
HC08 Welcome Kit
6

3. Parts Location Diagram
Component side
User Manual
7

Solder side
HC08 Welcome Kit
8

4. Jumpers and Solder Bridges
To locate jumper positions, please refer to the parts location
diagram (see above).
Jumpers
JP1: MON (Monitor Mode)
open* User Mode (user program or FL08 Flash Loader)
closed Monitor Mode (programming/debugging via
MON08)
JP2: AUTO (Autostart)
open* start Flash Loader FL08
closed after Reset, FL08 immediately branches to address
$8000 to execute user program
JP3: VENA (Voltage Enable)
1-2* standard control mode for IC4
2-3 reserved for LIN option
JP4: RRST (Remote Reset)
1-2* enable Remote Reset via serial /DTR line
2-3 disable Remote Reset
Solder Bridges
The following solder bridges are located at the solder side of the
board:
BR1, BR2: RS232 TxD/RxD Select
1-2* RS232 configured as "Device"
(for connection to a PC etc.)
2-3 RS232 configured as "Host"
(for connection to a serial LCD etc.)
User Manual
9

BR3: LCD Power Supply (SER1)
open* VCC not available on RS232 port
(standard Sub-D connector layout)
closed VCC available on RS232 port
(at Pin 9 of the Sub-D connector)
BR4: OSC
open external Oscillator IC3 delivers clock
(required for Monitor Mode)
closed* Clock generation by 32 kHz crystal and PLL
(remove IC3 in this case!)
BR5: OSC
open reserved for LIN option
closed* Controller pin RxD is connected with RS232
transceiver IC2
* = Factory Default Setting
HC08 Welcome Kit
10

5. Connectors
Power Supply Connector X1
+central pin
-outside
Monitor Mode Connector X2
X2
n.c.
109
GND
n.c.
87
n.c.
n.c.
65
PC_TxD
n.c.
43
PC_RxD
n.c.
21
n.c.
User RS232 Connector X3
X3
n.c.
109
GND
(VCC)
87
n.c.
n.c.
65
Tx (Rx)
n.c.
43
Rx (Tx)
n.c.
21
n.c.
User Manual
11

Expansion Connector X4
X4
GND
2625
GND
T2CH1
2423
T2CH0
T1CH1
2221
T1CH0
SPSCK
2019
MOSI
MISO
1817
/SS
/IRQ
1615
GND
RXD
1413
TXD
n.c.
1211
PTC6
PTC5
109
PTC4
PTC3
87
PTC2
PTC1
65
PTC0
/RST
43
GND
VCC
21
VCC
HC08 Welcome Kit
12

Expansion Connector X5
X5
GND
2625
GND
PTB0
2423
PTB1
PTB2
2221
PTB3
PTB4
2019
PTB5
PTB6
1817
PTB7
VDDAD
1615
GND
PTA0
1413
PTA1
PTA2
1211
PTA3
PTA4
109
PTA5
PTA6
87
PTA7
n.c.
65
n.c.
n.c.
43
GND
VCC
21
VCC
User Manual
13

6. Circuit Description
Schematic Diagram
The schematic diagram of the HC08 Welcome Kit is available as a
separate document to ensure optimum visibility of all details.
Controller Core and Input/Output
The Microcontroller HC908GP32 needs only a few external
components. Many peripheral functions, such as SCI, Analog/Digital-
Converter and 32 KB of Flash Memory, are integrated on-chip. The
HC908GP32 is offered in several packages. The HC08 Welcome Kit
uses the 44-pin, QFP version of the 68HC908. This package has four
more I/O pins than the DIP40 version.
The operating voltage for the HC08 Welcome Kit is 5V, though the
MCU can operate down to 3V (see data sheet for details).
The reset system of the HC08 is different from other Motorola
Microcontrollers (HC11, HC12). For example, the capacitor C6 on the
reset pin of this circuit could never be used in an HC11 system. The
HC908GP32 has an integrated LVI (low voltage inhibit) circuit, so an
external reset controller is not required.
As an optical indicator, a LED is connected to port pin PTC2. A
driver circuit is not required because this port pin has a drive capability
of up to 25mA.
The I/O pins of the microcontroller are accessible on the expansion
connectors X4 and X5. When connecting any external components, the
requirements to activate the Monitor Mode should be considered (see
below).
HC08 Welcome Kit
14

Clock Generation
The oscillator IC3 generates a frequency of 9.8304 MHz. This
clock is delivered to the OSC1 input of the microcontroller. The solder
bridge BR4 must be open in this mode. The external clock from IC3 is
required for Monitor Mode operation (programming, debugging via
MON08), but can also be used for normal operation mode, i.e. running
a user program (User Mode).
Alternatively, the PLL module of the HC908GP32 can be used as
the clock source. For this purpose, Q1, C1, C2, R1 and R2, together
with the circuitry in the controller, form a Pierce-Oscillator which is
generating a 32768 Hz clock. This clock is the input signal for the PLL,
which produces the internal bus clock (up to 8 MHz). The parts R3, C3
and C4 form a filter combination for the PLL. In order to activate the
PLL mode, the "canned" oscillator IC3 must be removed and solder
bridge BR4 must be closed.
The HC08 Welcome Kit is shipped with the High-Speed Flash
Loader FL08 residing in Flash memory. FL08 uses the PLL to generate
a bus clock of 7.3728 MHz.
To utilize the PLL, some initialization steps are required. Please
refer to the HC908GP32 data book for a comprehensive discussion of
the PLL functions. For your convenience, a setup example is provided
in the "Application Hints" section of this manual.
Monitor Mode Interface
For the purpose of Flash programming and software debugging, the
HC908GP32 makes use of a special operating mode named "Monitor
Mode". The difference between the Monitor Mode and the normal User
Mode, is that firmware in the GP32's internal ROM is executed instead
of the user's program. At first, this firmware examines a set of I/O pins
which are used to select some operating parameters. Finally, this
firmware establishes an asynchronous serial interface function on the
port pin PTA0. This interface works bidirectionally (half duplex) and
corresponds to the usual RS232 conventions. The baud rate is 9600
Baud. Besides the appropriate clock (9.8304 MHz), a number of port
User Manual
15

pins must be connected to certain logic levels, as summarized in the
following table:
HPTC3 LPTC1 HPTC0 LPTA7 HPTA0
LevelPort
Monitor Mode Levels on Ports A and C
The monitor mode interface circuit on the evaluation board
produces these levels using five pull up or pull down resistors.
Apart from the above requirements it is further necessary to supply
the /IRQ pin of the microcontroller with a higher voltage (in the range
of approx. 7 to 10V) to enter Monitor Mode. This voltage is generated
by the charge pump of the RS232 transceiver (IC2) and limited to 8.2V
using the Zener diode D4. JP1 (MON) must be set, in order to apply this
higher voltage to /IRQ.
The connection of the Monitor Mode interface to the PC is made
via X2. A ribbon cable with a 10-pin female header connector at the
device end and a 9-pin Sub-D connector at the PC end can be used.
The pinout scheme of the cable is shown in the following table:
5GNDGND93TxDR1IN52RxDT1OUT3
Sub-D9
Pin
PC
RS232
USB08
MONI
X2
Pin
Pin configuration of the Monitor Mode cable
HC08 Welcome Kit
16

User RS232 Port
In contrast to the serial Monitor Mode interface, the user RS232
port incorporates separate send and receive lines. The HC908GP32 has
a SCI hardware module for asynchronous serial communication, the
related pin names being TXD (send) and RXD (receive).
X3 is the user RS232 port connector. For a connection to a PC, the
same kind of cable is used as for the monitor mode connection. The
solder bridges BR1 and BR2 on the solder side of the PCB have to be
set to position 1-2. In this configuration, the PC works as a host, the
HC08 Welcome Kit board represents the device side.
The reverse case happens if a serial LC display is to be operated at
the user RS232 port. In this configuration, the HC08 Welcome Kit
board is the host and the LCD module represents the device side. The
necessary RxD/TxD crossing can be done externally or by setting the
solder bridges BR1/BR2 to position 2-3. At the same time, the serial
LCD can be supplied with operating voltage by closing solder bridge
BR3 (Note: this option is a deviation from the standard RS232 connec-
tor layout!). Serial alphanumeric LC displays are offered by several
vendors. We particularly recommend LC displays from Matrix Orbital
(see http://www.matrix-orbital.com).
Power Supply
Voltage regulator IC4 supplies 5V to the board from a DC voltage
of between 8 and 12V supplied to the power input connector X1.
IC4 is rated for up to 1 ampere and thus should be more than
adequate even with no special cooling measures taken. The load
current of the board is well less than 100mA.
User Manual
17

7. Application Hints
In this section some details will be given on how to program the
HC908GP32 in general and the HC08 Welcome Kit in particular.
Please be aware that, even if this manual can provide some specific
hints, it is impossible to cover all kinds of knowledge and techniques
required to design a microcontroller program. Please refer to the data
sheets of the silicon vendors and to the manuals of the software tools
you use to find additional help.
Startup-Code
Every microcontroller program starts with a number of hardware
initialization commands. For an HC908GP32 application program, only
a small number of issues are important:
wsetting the Stack Pointer
wselecting the proper base clock for the SCI (if used)
wdisabling (or using) the COP Watchdog timer
The following assembly language sequence shows an example:
entry ldhx #$00ff ; Program Entry Point
txs ; Init Stack Pointer
mov #$01,CONFIG2 ; SCI uses Bus Clock
mov #$01,CONFIG1 ; Disable Watchdog
PLL Initialization
An application program can use the PLL to generate the bus clock.
In this case, the program must take care to properly initialize the PLL
module.
The following program listing shows an example of how to initial-
ize a system with a bus clock rate of 7.3728 MHz (as used by FL08):
HC08 Welcome Kit
18
Table of contents
Other MCT Network Hardware manuals
Popular Network Hardware manuals by other brands

MikroTik
MikroTik CRS310-1G-5S-4S+IN Quick guides

ADTRAN
ADTRAN DDM+ H2TU-C Installation and maintenance practice

ATTO Technology
ATTO Technology iPBridge 2700C Installation and operation manual

3Com
3Com DUAL SPEED HUB/PS HUB CASCADE CONVERTER user guide

Compaq
Compaq StorageWorks NAS B3000 specification

HMS Networks
HMS Networks EWON FLA 3301 installation guide