I figure it out finally. The Processor Expert code is bad. When you select the CPU bean for the 68HC908KX8 you have options to select which clock you are going to use. No matter which clock you choose the bean generates code that always selects the internal clock source. According to the documentation for the 908KX8 you can only write to the CONFIG registers once after reset. The code generated by the bean tries to write to the CONFIG2 register more than once.
Here is the code it generated:
/* CONFIG1: COPRS=0,LVISTOP=0,LVIRSTD=0,LVIPWRD=1,LVI5OR3=0,SSREC=0,STOP=0,COPD=1 */
CONFIG1 = 17; /* Set the CONFIG1 register */
/* CONFIG2: Unused=0,Unused=0,EXTXTALEN=1,EXTSLOW=0,EXTCLKEN=0,Unused=0,OSCENINSTOP=0,SCIBDSRC=0 */
CONFIG2 = 32; /* Set the CONFIG2 register */
ICGCR = 31; /* Enable the external and internal oscillator */
while(!ICGCR_ECGS); /* Wait for external oscillator stabilization */
ICGCR_CS = 1; /* Select the external clock */
Notice when it writes to the config register --> CONFIG2 = 32;
It then attempts to select the external clock 3 lines down. When I disable the PE and change the CONFIG2=32 to CONFIG=8 my board works in the debugger and standalone.
Thanks for your help.
bcde
It has been a few weeks. If I remember the last response I got was to just download the new version and get a limited license. From past experience the limited licenses caused me problems. You can't use but 1 or 2 tools in the Simulator at a time, and I can't remember the other reasons now because I have not had to deal with the limited license for a while now.
I never heard from anyone else since then. With all the time I have wasted on problems with the old version It will be worth it to upgrade if I can get the student price for the upgrade. Thanks for your help.
bcde
Ahhh Processor Expert........ far easier to read the book and become a processor expert yourself IMHO.
It works well most of the time but the time spent working out what went wrong when it doesn't knocks all the previous savings on the head. And you haven't learnt anything.
Peg
Hi,
If you can just run the simulator the press run and it works then it should power up on its own and run as well. You shouldn't have to do anything extra.
Its not going into monitor mode when you power it up on its own, is it?
BR Peg