Hi Wilson,
Even at the min frequency of 30 events per second the time between events is ~33ms while you're talking about 800ms?
Are you actually talking about 30-800 events per minute?
/Henrik.
Hi Wilson,
Even at the min frequency of 30 events per second the time between events is ~33ms while you're talking about 800ms?
Are you actually talking about 30-800 events per minute?
/Henrik.
Hi Wilson.
Yes, you can connect an external clock source to either TMR0 or TMR1 on the 16F877A.
If, however, you're talking about connecting a 32.768kHz crystal directly then only TMR1 has that capability (it's got an internal oscillator circuit specifically for this purpose). TMR1 is 16bits wide so you'd get 2 overflows per second. A prescaler of 2:1 will allow you to fit your 800ms in one go.
/Henrik.
@Wilson
as Henrik points out you have a problem. Even if you mean 600 times per minute thats still every 100ms. The countdown timer will barely have stated before your next event happens.
You need to state the problem in detail. Perhaps drawing a waveform diagram might help.
George
Bookmarks