I'm using MicroCodeStudio as software and uic00b & icsp as hardware.
My question is ;
I'm 1st time bought an uic00b, did i need to setting up something in (PICkit 2)?
Following is my program BUT im not sure whether it's correct or not~
input/MCLR= 2 switchs
output=leds
4MHz as OSC, 30pF x2
- CODE: SELECT_ALL_CODE
define OSC 4
trisa = %11111111
porta = %11111111
adcon1 = 7
flag var byte
flag = 0
trisb = %00000000
portb = %00000000
START
pb1:
if porta.2 = 0 then lampu1
goto lampu1
lampu1:
high portb.0
PAUSE 30
LOW portb.0
high portb.1
PAUSE 30
LOW portb.1
high portb.2
pause 30
low portb.2
goto lampu1
end
At the end, when the +5v supply is given to this circuit, the program r run automatically even i nvr press pb1(porta.2)~