Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dim LED1 as PORTD.1,
LED2 as PORTD.0,
LED3 as PORTC.3,
LED4 as PORTC.2,
LED5 as PORTC.1
// add more leds here
public sub set_led(ledno as byte, setting as bit)
select (ledno)
case 1
LED1 = setting
case 2
LED2 = setting
case 3
LED3 = setting
case 4
LED4 = setting
case 5
LED5 = setting
// add more leds here
end select
end sub
public sub toggle_led(ledno as byte)
select (ledno)
case 1
toggle(LED1)
case 2
toggle(LED2)
case 3
toggle(LED3)
case 4
toggle(LED4)
case 5
toggle(LED5)
// add more leds here
end select
end sub
SUB Prg_1()
Ch_1 = 1
Ch_2 = 0
Ch_3 = 1
Ch_4 = 0
Ch_5 = 1
Ch_6 = 0
Ch_7 = 1
Ch_8 = 0
Ch_9 = 1
Ch_10 = 0
Ch_11 = 1
Ch_12 = 0
Ch_13 = 1
Ch_14 = 0
Ch_15 = 1
Ch_16 = 0
Ch_17= 1
Ch_18= 0
Ch_19= 1
Ch_20= 0
DELAYMS(speed)
Ch_1 = 0
Ch_2 = 1
You're really a troll aren't you? No one can spend 10 years trying to code and not learn anything.
I, for the second time, will ignore you forever more. Somehow, you drew me in again.
Bye.
Mike.
Learn by doing!!! You have been posting here for 10 years!!!! I really find it hard to believe, but it appears to be true, that you have learnt absolutely nothing in this time. People spend the time and give you solutions to your problem and you completely ignore it. Instead you find some other ludicrous thing to post. I can only conclude that you must be trolling.I have tried your suggestion so why get Po'ed if I don't use it??
I tried it and it works well but not for what I am doing. If I didn't have to use so many different ports then yes. your example works well.
As for learning, yes I have learned alot from examples.
As I mentioned before, I take a code example, deconstruct it to see what makes it work then I learn from that.
It's the learn by doing