I'm trying to count pulses from wheel encoder. I'm using ICC12 and
MC9S12DP256. The problem I'm having is that the result (PANC1) does
not make any sense. The number are not in sequence.(ex. 179, 254, 18...)
here is my code, Please help.
printf(" %u \r",PACN1);
DDRT = 0x00; /* configure all timer port pins for input */
TCTL4 = 0x04;
ICPAR = 0x02; //set PACN1 to count W.E