i did a beautiful system with the pic16f690 but now i was required to low my pwm to 2 hertz so i changed the OSC to 31khz with:
setup_oscillator(osc_31khz) and its worked fine BUT:
BUT MY DELAYS BECAME LONGER THAN THEY SHOULD BE !
when i do delay_ms(1000) he waits for couple of seconds..
at the start i did : use delay(clock=31000).
why does my delays became longer ??
thanks a lot.
Ttelmah Guest
Posted: Sun May 17, 2009 8:01 am
They probably didn't.
Remember that at 31KHz, the chip is only executing 7750 instructions per second. Something simple like just multiplying two 16 bit integers together, will take over 31mSec. I'd guess you have other things going on, which at the higher speed, only take a few mSec to complete, which at this slow rate, are 'adding up' to give the extra time....
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