Pic = 12F629
Code: Select all
program TestSetbit
' MikroBasic 7.3 beta.
' Config = default.
' I have two leds connected to gpio.0 and gpio.1.
' You can't have both leds to flash if you unrem both "SetBit"
' REMing one SetBit... will make the other work.
' if you use gpio = 3 then both leds will flash.
main:
trisio.0 = 0
trisio.1 = 0
while 1
'gpio = 3
setbit(gpio,0)
setbit(gpio,1)
delay_ms(1000)
ClearBit(gpio,0)
ClearBit(gpio,1)
delay_ms(1000)
wend
end.