Quote:
|
Originally Posted by Joe Ross
Have you verified it worked with Kevin's default code? It's best to start with a known good program.
|
I didn't realize kevin
had code for tooth counters.
Quote:
|
Originally Posted by Joe Ross
Since it sounds like you're getting very deep into counters and timers and such, it's going to be virtually impossible to help you without seeing the code.
|
Aye. I did find the problem.
Basically, TMR0 was set to wait longer than 26.2ms, and every slow loop I restarted it. Meaning it never went off.
As it also turns out, the counts for the timer are also screwy. We're going to look at the whole system with an oscilliscope tonight.
(BTW, this isn't very clear from the PIC18 manual and 8722 datasheet. When using TMR0, and likely other 16-bit registers, you read the low byte first and the high byte second. Writing is the opposite way, write high byte first and low byte second.)