-
blink led 12f683
trying to blink led & pullin relay on a 12f683 this code doesn't work.
fanon var GPIO.0
ledflasher var GPIO.1
CMCON0=%00000111
ANSEL=%00000000
TRISIO=%111100
GPIO=%000000
Fan:
high fanon
high ledflasher
pause 1000
low fanon
low ledflasher
goto fan
end
-
Add a "Pause 1000" right before your "Goto fan" line.
Regards,
Nick
-
Try adding another pause statement. It is probably going low for about 1/4000000th of a second or so.
to this:
Code:
Fan:
high fanon
high ledflasher
pause 1000
low fanon
low ledflasher
pause 1000
goto Fan
end
Oops, yeah, what Nicmus said!
-
-
Quote:
Originally Posted by
hoyles
use: CMCON =%00000111
With the PIC12F683 it should actually be CMCON0 =%00000111
-
Sorry didn't post back sooner. It was just the other pause. Works fine now. Looked at that 1,000 times and just didn't see it. Thanks.
Mike
-
Thanks
Mike ... (and anyone else reading this!)
Congrats on getting your PIC blinking :-) YAY
Thanks a million for the feedback !
I think more than anything else it's awesome for anyone and everyone reading these posts to see your feedback , especially when things are working!
So sad how certain threads have guys helping on a problem and the thread is kind of left with someone saying they will eventually give feedback about a certain problem and then there is nothing back :-(.
Obviously feedback could take some time (yes sadly for most of us everyday life forces us to put things on hold for a while ;-) ) but it's so nice to see feedback (and/or solutions) for problems.
So this is a thank you to Mike and everyone who always provides feedback :-)
And of course a big thank you to everyone who assists and gets involved with the threads on here :-)
Kind regards
Dennis