Hi,
I created a very simple project for a 28-pin MC9RS08LE4 in CodeWarrior V6.3 with the Processor Expert.
I pasted the _EntryPoint( ) and main( ) below. All I do is set port A and C as outputs and toggle the pins high/low in a loop.
Both port C pins toggle, but none of the port A do.
I've also tried toggling ports C and D with no luck.
I'm using a PE Multilink Universal. Right now I have 4 pins solderd to the PCB - Vcc, GND, PTB0 and PTB1.
I've replaced the chip, tried various internal clock settings, tried enabling pull-ups, high drive strength - nothing works.
Why does only Port C work?!
Thanks for any suggestions you can give me,
Gordo.
void _EntryPoint(void){ /* ### MC9RS08LE4_28 "Cpu" init code ... */ /* PE initialization code after reset */ /* Common initialization of the write once registers */ /* SOPT: COPE=0,COPT=1,STOPE=0,??=0,??=0,??=0,BKGDPE=1,RSTPE=0 */ setReg8(SOPT, 0x42); /* SPMSC1: LVDF=0,LVDACK=0,LVDIE=0,LVDRE=1,LVDSE=1,LVDE=1,??=0,BGBE=0 */ setReg8(SPMSC1, 0x1C); /* System clock initialization */ if (*(unsigned char* __paged)CONVERT_TO_PAGED(0x3FFA) != 0xFF) { /* Test if the device trim value is stored on the specified address */ ICSTRM = *(unsigned char* __paged)CONVERT_TO_PAGED(0x3FFA); /* Initialize ICSTRM register from a non volatile memory */ ICSSC = *(unsigned char* __paged)CONVERT_TO_PAGED(0x3FFB); /* Initialize ICSSC register from a non volatile memory */ } /* ICSC1: CLKS=0,RDIV=0,IREFS=1,IRCLKEN=1,IREFSTEN=0 */ setReg8(ICSC1, 0x04); /* Initialization of the ICS control register 1 */ /* ICSC2: BDIV=0,RANGE=0,HGO=0,LP=0,EREFS=0,ERCLKEN=0,EREFSTEN=0 */ setReg8(ICSC2, 0x00); /* Initialization of the ICS control register 2 */ /*** End of PE initialization code after reset ***/ __asm jmp _Startup ; /* Jump to C startup code */} void main(void) { // PE_low_level_init(); PTADD = 0xFF; PTCDD = 0xFF; while(1) { PTAD = 0xFF; PTCD = 0xFF; PTAD = 0x00; PTCD = 0x00; } /*** Don't write any code pass this line, or it will be deleted during code generation. ***/ /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
Apparently all GPIO port pins need pull-ups except Port C ...?