0% found this document useful (0 votes)
414 views21 pages

Megaprogrammer MC68HC908GP32: by Patrick Carlier

Uploaded by

Gius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
414 views21 pages

Megaprogrammer MC68HC908GP32: by Patrick Carlier

Uploaded by

Gius
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

MEGAPROGRAMMER

MC68HC908GP32

By Patrick Carlier
2/17

TABLE OF CONTENTS

1) INTRODUCTION...................................................................... 3

2) DISCLAIMER........................................................................... 3

3) CREDITS ................................................................................. 3

4) SOME SOLDERING TIPS ....................................................... 4

5) ASSEMBLY ............................................................................. 4
Section 1 : Pwr section ................................................................................. 4

Section 2 : Serial communications ............................................................. 8

Section 3 : pwr control circuits ................................................................. 10

Section 4 : Oscillator section . ................................................................... 11

Section 5 : Zif socket .................................................................................. 14

6) ATTATCHMENTS...................................................................17
A. Ordering stuff.........................................................................................17

B. Schematic

C. PCB layout

D. Silkscreen

E. Partlist and Prices

Megaprogrammer 06/2003 by Patrick Carlier


3/17

1) INTRODUCTION

This programmer was designed to program the Motorola MC68HC908GP32


micropocessor , in combination with a personal computer , and the progsz08 free
software by p&e micro systems .
It was developped for the Megasquirt group and it’s offspring , altough it can be used
for any MC68HC908GP32 based project .
Features are :
Single sided pcb 100*70 mm ( 3.9 * 2.7 Inch )
Uses only very comon parts . Sourcing them shouldn’t be a problem .
Supports three kinds of oscillator types , and a various number of frequencies .
Uses a wallplug adapter pwr source , any AC or DC 6 to 24V adapter will do .
Designed to use a professional ZIF socket .

2) DISCLAIMER

This project is provided as it is . Great care has been taken in designing the circuit ,
the pcb and writing this manual . Sofar it has been buid by a number of persons and
tested with succes on a various computers , including an 1.8Ghz computer with the
latest P&E software . However the designer of this unit will not assume any
responsability for hasards that came from using this unit .
Under no circumstances must it be used for devices that are related to life support
systems .

3) CREDITS

Special thanks to Ola Cristofferson ( Sweden ) , SFCillari ( The Netherlands ) and


Ingeom ( location unknown ) for their kind input in designing the schematic .

Megaprogrammer 06/2003 by Patrick Carlier


4/17

4) SOME SOLDERING TIPS

Make sure you have a nice clean working space .


Have all the tools you need available , and nothing more

On this picture , my voltmeter is missing .

More to come

5) ASSEMBLY

The assembly of the programmer is done in a number of sections .


In each section , there will be some test procedures to see if things are working .
Never go to the next section if the test fails .
Orientation : in this manual , the board is always put in front of you with the
components side up and the DB9 ( serial port ) connector in the lower left corner .
Just like it's printed in the silk screen page .

Section 1 : Pwr section


First things first : there are 5 wire bridges to be made . That’s the price you have to
pay for a single sided design . Cut the lead's of some resistors and carefully bend

Megaprogrammer 06/2003 by Patrick Carlier


5/17

them so they match the hole's in the pcb , and solder them . The solder islands for the
wire bridges are square the others are rectangular or round .

Also read "the low voltage mod " in the addendum .

5 Wire bridges . Note that these pictures don’t have the low voltage mod .

Next , choose your power source :

- You can have a high voltage source like a 12V AC or DC wallplug adapter . This is
recomended .
It’s cheap , and if you want to build a megasquirt , you can also use it to power your
stim . ( DC only )
We’ll call anything above 10 Volt’s high voltage .

- A 9Volt battery .

- A low voltage power source , like a calculator’s 6 Volt adapter . Again AC or DC


will do .
Anything below 9 Volt is called low voltage .

Megaprogrammer 06/2003 by Patrick Carlier


6/17

For High and low voltage adapters


Install and solder
D1 ( 1N400x )
D2 ( 1N400x )
D3 ( 1N400x )
D4 ( 1N400x )
PWR connector
U1 ( 7805 )
C1 ( 470µF/25V)
C2 ( 100nF )
C3 ( 10µF/63V )
U4 socket ( 16 pin )

- D1,D2,D3 and D4 : the banded end points toward the left side .
- U1 , the 7805 voltage regulator . First bend the leads , put the component on the pcb
and bolt it using theM3 bolt and nut . The nut has to be on the components side .
Finally solder the leads
- C1 . Watch the polarity .
- C3 . Watch the polarity .
- U4 socket . the notch faces the lower -side of the pcb . Don't put in the chip yet

For a 9Volt battery .


Install and solder
D2 ( 1N400x )
9V battery connector
U1 ( 7805 )
C1 ( 470µF/25V)
C2 ( 100nF )
C3 ( 10µF/63V )
U4 socket ( 16 pin )

Megaprogrammer 06/2003 by Patrick Carlier


7/17

Install the plus lead of your 9 volt battery connector to the left hole of D1 .
Install the minus lead of the battery connector to the right hole of D3 .
Leave the other holes from D1 D3 D4 open.

9Volt battery setup

The low voltage mod


This is a last minute modification , so I don't have any picture's of it .
Right above R7 , there is a three pole header J6 .
At first , the circuit was designed to use a 12V adapter only . But with a small
modification
a low vontage source like a calculator adapter can also be used .
Noramally , the Vtst source is taken from the 12 Volt adapter and reduced to 8.5 volt
by U3 . If a low voltage source is used , it won't be enough to drive U3 . But the
max232 produces 9.5 volt's , wich is just enough .
In case of a low voltage source , we use the max232 to powerU3 .

So , for a 12 Volt source , wire J6 to connect the center pin with the one on the left
And for a low voltage source , and a 9Volt battery , wire the center pin to the one on
the right . Use a piece of wire from a resistor , just like the 5 bridges you just made

Testing
Get a suitable AC or DC power source . Because of the rectifier bridge D1..D4, the
polarity is irrelevant .
If you use a 9 Volt battery , D2 protect's the circuit from wrong polarity .

Megaprogrammer 06/2003 by Patrick Carlier


8/17

Plug it in , and see what happens .... Nothing ? no smoke or exploding parts ? That's
the way we want it .
Use a voltmeter and measure the voltage on pin 15 and 16 of the U4 socket . Pin 15
is the negative or ground
You should read 5 Volt . If not , check the voltage on the banded end of D2 and the
M3 nut. The nut is the nagetive lead . You should read the adapter voltage minus 2,4
volts , or 9 V battery minus 0.7 volts .
Check for bad solders , polarity of the diodes and capacitors .
Note that adapters with no load will easily produce 16 Volts . This is normal and
won't harm the programmer .

Section 2 : Serial communications .


DB9 connector
Install and solder
J3 ( DB9 Female )

Firmly press the part to the pcb . Be carefull not to bend the leads .
Now solder the two retaining clip's in the 2.5 mm holes .
Finally , solder the 9 pin's , be carefull not to make any short's .

The DB9 connector, pin 14 and 13 shorted .

Testing
Get a straight trough 9 pin serial cable .and connect it to the pc .
Don't use a null modem or crossedcable . It won'twork .
Load up hypertem or similar and set it to the com port you're using
Set the hyperterm flow control option to "none" .
On the programmer , short pin 14 and 13 of the U4 socket ( see picture )

Megaprogrammer 06/2003 by Patrick Carlier


9/17

Connect the serial cable to the programmer , no pwr needed .


Now if you type any character , it schould be echoed back to the screen .
Remove the short from U4

More details on this procedure can be found on the megasquirt construction manual .

MAX 232 circuit .


Install and solder
C5 ( 1µF/50V )
C6 ( 1µF/50V )
C7 ( 1µF/50V )
C8 ( 1µF/50V )
C9 ( 1ùF/50V )
R10 ( 10K )
R11 ( 10K )
U2 socket ( 14 pin )
U4 ( MAX232 Chip )

All 1uF /50V capacitors , observe the polarity for each part .
U2 socket , the notch faces down .
Carefully put the max232 chip in it's socket , the notch facing down .

MAX232 Circuit

Testing
Put a short on the U2 socket , pin's 8 & 4 .
Apply pwr to the board , and repeat the above loopback test .
If it work's , your max 232 is functioning correctly .
Remove the short from U2

Megaprogrammer 06/2003 by Patrick Carlier


10/17

Section 3 : Pwr control circuits


Install and solder
R2 ( 10K )
R3 ( 1K )
C4 ( 10µF/63V )
R4 ( 330Ω )
D5 ( led 3mm red )
R6 ( 1K )
T1 ( BC308 )
D6 ( 1N4148 )
J2 ( 2P header )

Test : pwr the circuit , and jumper the man pwr connector . The led should burn .
Remove the jumper and connect the banded end of D6 to the ground with a wire .
( Use the nut on U1 )
The led should come on again .

Install and solder


R9 ( 10K )
R12 ( 1K )
D7 ( 1N4148 )
T3 ( BC308 )
R1 ( 1K )

Finished PWR control's

Test : pwr the circuit , and measure the voltage on the right lead of R1 .
You should read nothing . Now connect the banded end of D7 to ground .
The led comes on , and you should read something like 12 Volts . Anything above 9
volts is good .

Megaprogrammer 06/2003 by Patrick Carlier


11/17

Install and solder


R5 ( 2K2 )
R7 ( 1K )
U3 ( LM431 )
J5 ( 5P header )

Test : pwr the circuit , and measure the voltage on the icp header 's center pin .
You should read nothing
Now tie the banded end of D7 to ground , the led comes on again and you should
measure 8,5 volt's .

Install and solder


R8 ( 1K )
T2 ( BC337 )

Test : apply power and connect U2 socket pin 11 to VCC . You can find VCC on
the left pin of J2 .
The led should come on .

Section 4 : Oscillator section .

The programmer is capable of holding three different oscillator's .


You choose only 1 setup . This depends on what's available in your local store or if
you bought a kit , it depends on what's available in my local store . Oscillators can be
exchanged freely , meaning if you build the board for an osc type 3 , you can still
remove U5 from it's socket and install a caned oscillator type 1 or 2 afterwards . The
parts surrounding U5 are non interfering .

Osc 1 :
A caned oscillator dip 8 .
Has to be installed on the lower half of U4 . Pin 1 of the oscillator corresponds to the
little round pad , pin 4 of U4.
You can solder the part to the pcb ( recomended ) or use an ic socket if you want to
be able to exchange oscillators later on .

Megaprogrammer 06/2003 by Patrick Carlier


12/17

Osc 2
A caned oscillator dip 14 .
Has to be installed instead of U4 . Pin 1 of the oscillator corresponds to pin 1 of U4 .
You can solder the part to the pcb ( recomended ) or use an ic socket if you want to
be able to exchange oscillators later on .

Megaprogrammer 06/2003 by Patrick Carlier


13/17

Osc 3
An oscillator using a common crystal , and a few parts .
Install and solder
R17 ( 1M )
R18 ( 2K2 )
C17 ( 100nF )
C18 ( 30pF )
C19 ( 30pF )
U5 Socket ( 14 pin )
X3 ( crystal )
U5 ( 74HCU04 )

Plug in the 74HCU04 .


Make sure you have the right part 74HCU04
A 74HC04 WON'T WORK . The U stand's for unbuffered , and we need that to
make the oscillator work .

Test : for any kind of osc : Apply power , and measure voltage at ICP PIN5 You
should read nothing much
Short the man pwr header , you should read roughly 2,5 volts .

Megaprogrammer 06/2003 by Patrick Carlier


14/17

A word on osc frequency versus baudrate


The software from P&E supports a number of baudrate's .
On the programmer these correspond to a certain oscillator frequency . The
programmer also has the possability to choose between two dividers for the chip's
internal bus frequency . It's J4 , located near the zif socket .
This gives the following possible combinations

P&E Baudrate J4 Jumper Osc frequency


28800 X2 29.4912 Mhz
19200 X2 19.6608 Mhz
14400 X2 14.7456 Mhz
9600 X2 9.8304 Mhz
4800 X2 4.9152 Mhz

28800 X4 14.7456 Mhz


19200 X4 9.8304 Mhz
14400 X4 7.3728 Mhz
9600 X4 4.9152 Mhz
4800 X4 2.4576 Mhz

I've learned that frequency isn't that critical .


A 10 Mhz crystal will work fine at 19.200 baud with X4 and at 9.600 with X2
A 14.31818 Mhz caned oscillator will also work perfectly at 28.800 and 14.400 Baud
.
So , if you source the parts yourself , check with your parts supplier what's available .
If you have a choice , choose the highest frequency .
If none's available , choose a 10Mhz crystal or oscillator .

Section 5 : Zif socket


Install and solder the following parts :
R13 ( 10K )
R14 ( 100K )
R16 ( 10K )
C10 ( 100nF )
C11 ( 10nF )
C12 ( 33nF )
C13 ( 100nF )
C14 ( 100nF )
C15 ( 25µF/63V)
J4 (3P header and jumper )
Put U2 in it's socket
The MCU socket , either a zif or some loose contact's .

Megaprogrammer 06/2003 by Patrick Carlier


15/17

The use of a zif socket :


Zif socket's ( zero insertion force socket's ) are expensive . In fact the price of the
socket is about 1/3 the cost of the entire programmer . If you intend to use the
programmer more then a few times on thesame processor ... buy one . Processor
leads are easily damaged .
If you don't want to buy a zif , you can use some loose ic contacts . In that case , you
only need to put
15 contact's on the board . Don't put on more as you'll only put more stress on the
processor .
To know wich pad's needs contact's , look at the pcb , and see wich pad's have a lead

PAd nr's are : 1,2,3,5,6,7,8,10,14,19,20,31,32,33,and 40.


Note that on the pic below , pad Nr 9 has a contact . It's not really needed , its just
easier to solder the entire row .

No zif .

Megaprogrammer 06/2003 by Patrick Carlier


16/17

ZIF !

Final test's
Hook up power , short the man pwr .
Check the voltage 's at the following pin's of the MCU socket .

1 and 2(gnd ) 5 Volt


31 and 32(gnd) 5 Volt
20 and 19(gnd) 5 Volt

Now the big moment has arrived ..........


Disconnect the man pwr , and put in a MC68HC908GP32 chip .
Connect the serial cable and start progsz08 .
Choose the correct baudrate , according to your oscillator frequency and the position
of the div jumper .
If the jumper is shortening the center and the lower pin , then you're wired for X4 if
the jumper is shortening the center and the upper pin , it's X2 .
If it all goes right , the programer should connect on the first attempt

Good luck !!

Patrick Carlier

Megaprogrammer 06/2003 by Patrick Carlier


17/17

6) ATTATCHMENTS

A. Ordering stuff

I will be able to provide PCB, partial kits, full kits and assembled and tested units.
Contact me at p.carlier@pandora.be.

If there is enough demand I'll organise a group buy for the PCB . I can get real good
prices for 50 pieces.

Megaprogrammer 06/2003 by Patrick Carlier


motola - SHEET
8 7 6 5 4 3 2 1

PLACE JUMPER FOR MANUAL POWER


USUALLY NOT NEEDED

J6 : HEADER FOR 12V/9V SELECTION


MAN-PWR
1N4004

1N4004
1 12V
D1
D2
J1

J2
2
12V
3
R1

2
1
D D
J6 VT

BC308AP
1
1N4004
1N4004

1K
12V VCC VDD 2
78L05 U1
D3

D4
3

T1
HDR_3
GND

3
+ C1 IN OUT C2 + C3
R4 R5 9V
+ C4

10K

330E
R2

2K2
CAT
- 470uF 100nF
- 10uf R6
- 10uF

LM431ACZ
LED 5MM VER. RED

1K
GND

U3
R7
U2.A

1K
Ü

D5

1K
REF
2 R3

AN
A
3
Y
1
G
74HC125

1
1N4148
GND

BC308AP
D6
VCC GND
VT
GND

T3
C + C6 1uF/50V C

10K
C5 U2.D R9 VDD
1uF/50V Ü
9V - - 12

R8
A
11 BC337AP C10
Y 1K R13 R14
13 T2 U6
16

GND 1uF/50V G

100K
+

1K
VCC

10K
2 V+ V-6
- C9 74HC125 100nF
1 40
C7 1uF/50V VDDA PTA7
1 4 R10 R11 R12 2 39
J3 C1+ C2+ VSSA PTA6
1 + + GND 3 38
VDD GND CGMXFC PTA5
10K

10K

2 + 4 37
U4 R16 OSC2 PTA4
3 5 36
MAX232 OSC1 PTA3
4 - 3 5 - C8 74HC125 6 35

10K
C1- C2- GND RST PTA2
5 7 34

1N4148
1uF/50V G R15 PTC0 PTA1
6 14 11 10 8 33 VDD

D7
T1_OUT T1_IN Y PTC1 PTA0
7 7 10 8 C13 9 32

10K
T2_OUT T2_IN A C11 C12 PTC2 VSSAD
8 9 10 31 + C15
PTC3 VDDAD
9 13 12 Ü 11 30 C14
R1_IN R1_OUT PTC4 AD7
DELTA_9HM 8 9 U2.C 100n 12 29
R2_IN R2_OUT 10nF 33nF TXD AD6
U2.B 13 28 - 25uF
RXD AD5
GND Ü GND 14 27 100nF
IRQ1 AD4
5 15 26
15

A PTD0 AD3
6 16 25 GND
Y PTD1 AD2
4 GND VDD 17 24
G PTD2 AD1
U5.A GND 18 23
PTD3 AD0
1 74HC125 19 22
VSS PTD5
1 2 20 21
B A Y VDD PTD4 B
C16

1
2
3
74HCU04

J4
U5.B
100nF 68HC908GP32
1 DIV
3 4 VDD
A Y GND
74HCU04 J4 CHOOSE DIV2/DIV4 FACTOR
100nF OSCILLATOR
U5.F
1
13 12
A Y C17
R17

X1 ?
GND 74HCU04
GND
1M
VDD
U5.E 1 5 VDD
NC OUT
1 U5.C U5.D
11 10 4 8 1 1
A Y GND VCC
5 6 9 8
A Y A Y
74HCU04
R18
74HCU04 74HCU04
GND
2K2

X2 ?
X3 VDD
VDD
1 8 CHOOSE ONLY 1 OSCILLATOR CONFIGURATION
A NC OUT A
C18 - C19
7 14
GND VCC OSC1 : CANED DIP8 MEGAPROGRAMMER
30pF 30pF OSC2 : CANED DIP14 COPYRIGHT 06/2003
GND OSC3 : DISCRETE WITH CRYSTAL PATRICK CARLIER
GND
1
2
3
4
5
ICP

GND
J5

U5 ,C18,C19,X3,R17,R18
ARE NOT NEEDED IF A CANED OSC. IS USED

ICP HEADER

8 7 6 5 4 3 2 1

Page 1 of 1 (04-Jun-2003)
MEGAPROGRAMMER PARTLIST AND PRICES IN EURO ( • )
Prices are from my local shop , and are indicative

Part Descr Qty Price Total


C1 470uF 1 0,5352 0,5352
C11 10nF 1 0,1788 0,1788
C12 33nF 1 0,1788 0,1788
C15 25uF 1 0,0888 0,0888
C18,C19 30pF 2 0,0888 0,1776
C2,C14,C16,C17,C10,C13 100nF 6 0,1392 0,8352
C3,C4 10uf 2 0,1956 0,3912
C5,C6,C7,C8,C9 1uF/50V 5 0,1188 0,594
D3,D4,D1,D2 1N4004 4 0,093 0,372
D5 LED 5MM VER. RED 1 0,144 0,144
D6,D7 1N4148 2 0,12 0,24
J1 PWR Con 1 1,104 1,104
J2 HDR 2 1 0,036 0,036
J3 DELTA_9HM 1 0,6276 0,6276
J4,J6 HDR 3 2 0,048 0,096
J5 HDR 5 1 0,084 0,084
R1,R3,R6,R7,R8,R12 1K 6 0,06 0,36
R14 100K 1 0,06 0,06
R15,R2,R16,R9,R10,R11,R13 10K 7 0,06 0,42
R17 1M 1 0,06 0,06
R18,R5 2K2 2 0,06 0,12
R4 330E 1 0,06 0,06
T2 BC337AP 1 0,108 0,108
T3,T1 BC308AP 2 0,18 0,36
U1 78L05 1 0,4884 0,4884
U2 74HC125 1 0,684 0,684
U3 LM431ACZ 1 1,368 1,368
U4 max232 1 2,4972 2,4972
U5 74HCU04 1 0,612 0,612
U2 , U5 socket 14 p socket 2 0,24 0,48
U4 socket 16 p socket 1 0,36 0,36
M3 bolt and nut 1 1,2 1,2
16 IC contact's replacing the zif 1 1,7556 1,7556
X1 caned osc dip 8 XTAL-1 1 0 0
X2 caned osc dip 14 2,54 Mhz 1 0 0
X3 x-tal 10mhz crystal 1 2,0904 2,0904
PCB Etched and drilled pcb 1 11,028 11,028

TOTAL 29,7948

ZIF SOCKET 40P zif socket 1 19,66


Shipping and handling outside europe 1 7

Megaprogrammer , copyright 06/2003 Patrick Carlier

You might also like