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