Bringing up the HC08 programming interface and debugging it when

By Eva Lawson,2014-11-13 13:26
11 views 0
Bringing up the HC08 programming interface and debugging it when

Bringing up the HC08 programming interface and debugging it when it doesn’t..

    Be sure that you have the most recent version downloaded and installed. That should be an .exe file called “prog08sz_interactive_install_100702.exe”. If you don’t have that, then get it and run the .exe file to install.

    Disconnect the serial cable from the target board completely. Now start up the programmer application. You should get a screen that looks like this:

On this screen change the target hardware type to class III and check the “Attempt all

    known security codes in order” button. Also be sure that the correct serial port is selected and that you are set to 9600 baud. My port is comm2 but yours could be 1 or whatever.

Now connect the serial cable, power up the board and click on “contact target with these

    settings”. When you do that you should the following message:

    That box labeled “Power Cyling Dialog” is prompting you to power off the board. This is because the HC08 core must see 9V on the IRQ line as it comes out of a Power On Reset (POR) to enter the monitor mode. Your target board does not have circuitry to power off the HC08 (as do the class I and II on the target pulldown), so you have to do it manually in response to these dialog boxes. So, power off the target board, give it a half second or so at least to fully discharge any caps you have charged up, then power it back on and press “OK”.

One of two things will happen here.

Notice in the above image, the message that says “(Failure of 68HC08 to respond

    properly. Check connections”). This means that the programmer application cannot establish contact with the target and you have either a wiring problem, or that the 9V is not being seen at IRQ pin before the HC08 powers up to 5V fully.

    Or it might say “68HC08 responded properly but ROM is secure”, which is great news. If you see this, skip to the section below marked “IF IT WORKS”

    If you got the “Failure” message, then you need to debug the interface circuit. Here’s what you need to see before you click on the OK button.

Max 232 chip should have

    1) 5V on pin 16 and ground on pin 15 (this is left off the schematic I sent you. There should be a decoupling cap of 1 uF across those pins)

    2) Max 232 chip should have 9V at pin 2

    3) pins 7 and 8 should have either +10 or 10 on them. It might be as low as +/-8V but in

    that range somewhere, depending on your PC

    4) Pin 10 should have 5V on it

    5) Pin 9 will have either 5V or 0 depending on the state of pin 8 (if 8 is negative,then 9 will be zero, if positive then 5V)

At HC08 chip

    1) You should have 5V at all VDD pins. Note you have to power ALL THREE Vdd pins. 2) You should have all three Vss pins grounded. And of course, the max 232 chip must have the same ground.

    3) You should see 7-9 V at IRQ pin.

    4) Pins A0, C0, and C3 should have 5V

    5) Pins A7 and C1 should be at ground (no more than 100 mV)

    If you have all of that, then you’re problem is most likely when you cycle power that IRQ does not have 9V before the 5V level hits. The only way to know if this is the case is to put a 2 channel oscilloscope on the chip with 1 channel on 5V and the other on the IRQ pin of the HC08, then trigger on rising edge of IRQ. If the trace shows the 5V hitting its max level before the 9V hits say about 7V, then this is a problem.

    If you don’t have a scope, you can put in a fix that will overcome this problem for sure. At switch SW5 that is a normally closed switch providing 5V to the HC08 chip add a connection to ground through a fairly small resistor, say 100 ohms. Then when you are power cycling, turn off power, hold this switch down (which will short 5V and hold it shorted to ground until you release it), then power on the system, release the switch and press OK. This will take care of that 9V cycling problem if you have it.

    Of course, you don’t have to buy a switch. You can make one for experimental purposes by connecting a 10-100 ohm resistor to ground and touching the other end to where you have the switch connected now.

    Be sure that when you do this though, that the Max232 chip is still powered and has 9V at pin 2.

    If you do all of this, you should get to the point where you have a connection to the chip.


    That means that the programmer has established contact with the target, but that the ROM has a security byte programmed and the programmer doesn’t know it. This is easily fixed by cycling power and clicking OK as directed until it either gets the security byte right (you’ll see a message saying “trying security $xxxxxxxxx”, where the x’s are

    some hex number) or it gives up and brings back the first screen shown above. In this case click on “Ignore security failure and enter monitor mode”, which will get you going.

Click OK and you should get a screen like this,

    giving you a selector dialog where you will choose a file. You want the want for the GP32 (908_gp32.08p). It will then load the programming algorithm for the GP32 part. Click on “Erase Module”, then “Quit”, then redo the process except this time, click on the “Try all known security codes” thing. Reconnect as before, click on the “Specify s record” option, point it at the s record file that you generated when you compiled your code, then “Program Module”.

Once it is done programming, select “Quit”, disconnect the serial cable, remove 9V from

    the IRQ pin and power on the device. It will execute the code you have programmed into flash.

Report this document

For any questions or suggestions please email