A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
I have a PIC18F452 with a 20mhz crystal. I setup timer0 interrupt with a DIV multiplier of 256 20,000,000/4/256/256 = 76 interrputs per second. I flip the state of a led each interrupt. from the led blink rate I can see that the interrupt is called once every 3 seconds or so. Like, What the **** ? Is my pic running 100 times slower than it should ? My delay functions are working perfectly. Anyone can think of a good way to test if the pic is running at the correct speed , without a scope ? (speaking of scopes, I've seen some software scopes for the PC, are they any good ?) Help. Thanks, Shachar Weis. |
|
|
|
Powering that LED 76 times a second should just give the appearence of always
being on, maybe somewhat dim. I am sure you know that, maybe you have your oscillator
setup wrong? or perhaps (well not likely but) a long initialization and then your WDT is
resetting the uC
Charles
|