gremlins in my pic!!

Status
Not open for further replies.

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;
 
Okay.... You included "SetDigitalIO.bas" but you haven't called the SetAllDigital() function..

But!! I have simulated it and it works okay... Have you a copy of "InternalOscillator.bas" to hand?
 
May sound obvious but you have decoupling capacitors on the PIC voltage rail ? They do weird things when they aren't adequately decoupled.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…