gremlins in my pic!!

MrDEB

Well-Known Member
a real simple test code to make sure all the leds are operational but have gremlins in my code or pic?? must be a full moon
when I first apply power all the leds light. Then they all go off and then start cycling on/ off as per code. This should work?? Must have something really dumb in my code??

 
If you have the SE version of swordfish, I would check that "SetDigitalIO.bas" has the ability to turn off the ADC on PORTB otherwise you need to edit the Config to disable the PBADEN bit!!

EDIT!! Sorry I saw the PORTB =0 and assumed PORTB...

I would use the Latch rather than the port register LATC.bits(x) =0;
 
May sound obvious but you have decoupling capacitors on the PIC voltage rail ? They do weird things when they aren't adequately decoupled.
 
May sound obvious but you have decoupling capacitors on the PIC voltage rail ? They do weird things when they aren't adequately decoupled.
I nominate for under stament of the year award . lol
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…