Never trust a PIC at boot, it's output level is hard to predict. you should set it yourself at the top of your code and add a little delay
Code:
PORTA = 0
PORTB = 0
trisa = %00010000
trisb = %00000000
PAUSE 50 ' settle time
loop:
It's not a bad idea to enable the Power Up timer in your Configuration fuses as well.
Code:
@ __CONFIG _XT_OSC & _PWRTE_ON & _WDT_OFF & _CP_OFF
http://www.picbasic.co.uk/forum/showthread.php?t=543
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks