Jay.slovak
Active Member
Please try my Code! and make sure your Reset Pin has Pull-up or is disabled, and your power is blocked with 100nF Cap!ptewright said:eblc1388 said:Jay.slovak said:I will make and send you sample code in Assembly, wait... :wink:
I do not want any assembly code. The drawing & code is related to this thread by ptewright. I just wonder about the rb0 and RB1 notation.
Sorry, I changed the output pin to rb1, just to see if the pin was broken. It didn't make a difference.
From my testing, it seems that the PIC is resetting every time it tries to drive the motor, that is why it never turns off.
So then i tried setting rb1=0 first, then rb1=1 second. When tested, the motor is off for 30seconds, then the motor turns on for about 2 seconds, and the whole thing resets, so motor is off for another 30 seconds, then it tries to turn on the motor for like a few seconds, and then automatic reset again........... :twisted:
(and obviously, if i take out the motor, then the PIC does the on/off thing properly)
why is that??? is the PIC not able to drive the mosfet???
is there a way to stop the resetting?
I didn't think that this circuit would be so complicated!!! :shock:
AND the Watch-dog timer is disabled!