PDA

View Full Version : error in timing with pause command



peterdeco1
- 25th October 2012, 16:16
Hello Everyone. I have a weird problem with the pause command on a 12F675. This code snippet should make GPIO.4 high for 10 seconds but only goes high for less than 8. I'm using the internal oscillator like I always do but never had this much error in timing. Any ideas? Thank you.

High GPIO.4
Pause 10000
Low GPIO.4
Pause 100
GoTo start

jmgelba
- 25th October 2012, 18:47
Does your oscillator and OSC settings match?

Try:

LENGTH VAR WORD
LENGTH = 10000

High GPIO.4
PAUSE LENGTH
LOW GPIO.4
PAUSE 100
GoTo Start

peterdeco1
- 5th November 2012, 16:53
Sorry to take so long to get back to you jmgelba. I didn't get a chance to try it at work yet. We were clobbered with hurricane Sandy and our company has been closed. I'll try it shortly. Thank you.