![]() |
Re: Help needed timing a pulse (2004 Robovation)
Quote:
-Kevin |
Re: Help needed timing a pulse (2004 Robovation)
Your problem is almost certainly that you're clearing the timer in the wrong order for a 16-bit Read/write mode. In this mode TMR1H is a buffer. so you write to the buffer first, then write to TMR1L. Your code for RB7_State == 1 should be:
TMR1H = 0x00; // MSB-TMR1 TMR1L = 0x00; // LSB-TMR1 As it is, your high bits aren't being cleared, so the value is effectively random, which is what you're seeing. |
Re: Help needed timing a pulse (2004 Robovation)
Switching the clear order worked!
Thank you to everyone! |
Re: Help needed timing a pulse (2004 Robovation)
Good, simple information about CCP programming here http://ww1.microchip.com/downloads/e...Doc/41214a.pdf
|
| All times are GMT -5. The time now is 20:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi