hi with 8 leds connected to the port B of a picaxe 28x2 i obitain a strange behavior..
look at this piece of code:
when it run on a picaxe with a trimmer on analog input 0 if i give all 5V (value 255) on pin 0 the led on PIN 7 of portB is on.
if i test it with the simulator and manually give the value of 255 all portB output are set to 0, included the PIN7!!!
that's strange! ehere is the problem? in the simulator or in the picaxe?
bye
look at this piece of code:
Code:
#slot 0
#no_data
#no_table
dirsb = %11111111
do
readadc 0,b0
debug b0
b0=b0/32 max 8
b2=1
if b0=0 then
b2=1
goto last
endif
for b1=1 to b0
b2=b2*2
next
last:
pinsb=b2
loop
if i test it with the simulator and manually give the value of 255 all portB output are set to 0, included the PIN7!!!
that's strange! ehere is the problem? in the simulator or in the picaxe?
bye