Hello,
I have not got too much experience with the 9S08GT16A, but perhaps I can help a little bit.
First of all, to be able to erase or program the Flash EPROM in the 9S08 MCUs, the address and data busses that are connected to the Flash EPROM must be stable. This means that you cannot use the Flash EPROM for executing the program so it must be moved outside. This is mostly done in RAM. Some of the latest 9S08 have EEPROMs that are separate from the Flash EPROMs and are therefore very nice for storing erase/programming routines.
The 9S08GT16A does not have any special EEPROM, so the RAM must be used.
When using the RAM two kinds of approach can be used. Either a buffer can be assigned where the program/data can be stored, or the buffers can be stored on the stack.
The simplest way is to store it in the RAM buffers, the more elegant is to use the stack instead.
As I have no 9S08GT16A code, the only thing I could offer is some 9S08QG8 software, which I believe is quite similare. And I cannot guarantee that the program is free from bugs ofcourse.
Regards,
Ake
Message Edited by t.dowe on 2009-10-27 01:15 PM