Hi Mac,
The COP was not disabled, however doing so does not seem to help. A bit more on my setup; I'm able to connect (P&E Multilink), download, and single step. I'm expecting the PTA pins which are being setup as outputs to change state as I step through the code. Nothing happens as I pass through those statements. I'm also able to change the PTA registers when I use the 'R' (show register) debug command and see the pins change state. One thing that also concerns me is that when I let the code run, I'm getting updates that indicate that the clock freq is changing (Frequency change to ~50526208hz, ..., etc).
Here's the entire code:
#include <hidef.h>
#include <MC9S08QG8.h>
void main(void) {
SOPT1_COPE = 0; //disable COP
//WC4 Sensor TestinG
PTAD_PTAD0 = 1; //set PTA0 HI
PTADD_PTADD0 = 1; //set PTA0 as an output
PTADS_PTADS0 = 1; //set PTA0 to High Drive Strength
PTAD_PTAD1 = 1; //set PTA1 HI
PTADD_PTADD1 = 1; //set PTA1 as an output
PTADS_PTADS1 = 1; //set PTA1 to High Drive Strength
PTAD_PTAD2 = 1; //set PTA2 HI
PTADD_PTADD2 = 1; //set PTA2 as an output
PTADS_PTADS2 = 1; //set PTA2 to High Drive Strength
PTAD_PTAD3 = 1; //set PTA3 HI
PTADD_PTADD3 = 1; //set PTA3 as an output
PTADS_PTADS3 = 1; //set PTA3 to High Drive Strength
for(;
{
PTAD_PTAD2 =~ PTAD_PTAD2; //complement PTA2 output
}
}
Thanks,
dandy