kctan
- 23rd November 2005, 14:39
i am new and i write the input code in microcode studio plus like this
i using PIC16F877A
define osc 20
trisa = %111111
trisb = %00000000
x var byte
start:
if porta.0 = 1 then
portb.0 = 1
else
portb = %00000000
endif
when i simulate in proteus 6, i got nothing at output LED
when i was pressed a switch in proteus, it got signal go in and the voltage is 5.33 after when at open switch i find that porta.0 pin still got voltage that is 3.44 wat is the problem
wat's wrong with my coding?
define osc 20
trisa = %111111
trisb = %00000000
x var byte
start:
x=0
while porta.0 =1 and x = 10
portb.0 = 1
x=x+1
wend
with this code i'am also cannot work so wat is my problem in input?
does my program write wrong?
i using PIC16F877A
define osc 20
trisa = %111111
trisb = %00000000
x var byte
start:
if porta.0 = 1 then
portb.0 = 1
else
portb = %00000000
endif
when i simulate in proteus 6, i got nothing at output LED
when i was pressed a switch in proteus, it got signal go in and the voltage is 5.33 after when at open switch i find that porta.0 pin still got voltage that is 3.44 wat is the problem
wat's wrong with my coding?
define osc 20
trisa = %111111
trisb = %00000000
x var byte
start:
x=0
while porta.0 =1 and x = 10
portb.0 = 1
x=x+1
wend
with this code i'am also cannot work so wat is my problem in input?
does my program write wrong?