View Single Post
  #8   Spotlight this post!  
Unread 24-01-2006, 16:08
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Missing teeth with kit tooth counter

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.)