any schematic? any pin left unconnected? how far the whole thing is from your motor?
you know kind of stuff like that....
isee you have GPIO.3 unconnected and set as an input. could this pin wake up you PIC like a Wake up on pin change as stated in table 3-2?
OPTION register is already set for that by default. Register 4-2
and to me, your program should end with a STOP... unless it may do some strange thing.

Originally Posted by
PBP manual, explanation of END
Stop program execution and enter low power mode. All of the I/O pins remain in their current state. END works by executing a SLEEP instruction continuously in a loop. An END or STOP or GOTO should be placed at the end of every program to keep it from falling off the end of memory and starting over.
Last edited by mister_e; - 5th March 2007 at 23:02.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks