"20MHz crystal seems to be 1.22 KHz (per Microchip manual)" via a search.
So I downloaded the datasheet but I didnt see any type of refence chart with that data for 4mhz.
I want to get in the range of 10hz or so.
btw I have a 16f876
Nick
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
Posted: Mon Oct 04, 2004 10:02 pm
You have to use the formulas in the datasheet to calculate the minimum possible frequency. For a 4MHz crystal it would be about 240Hz.
If you need a 10Hz wave you'll need to implement it using Timer/Compare interrupts.
J_Purbrick
Joined: 16 Sep 2003 Posts: 9
Posted: Tue Oct 05, 2004 11:04 pm
"20MHz crystal seems to be 1.22 KHz (per Microchip manual)" was a quote from one of my postings! To get a complete sentence, it should have read something like, "The slowest PWM rate you can achieve with a 20MHz crystal seems to be 1.22 KHz (per Microchip manual)".
If you want to use the built-in PWM generator you'd have to run it with a ridiculously slow oscillator to get 10Hz. Better to do it in software.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum