Hallo Barracuda_cy,
probier mal das:
Code:
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 14745600
$baud = 9600
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.4 , Db6 = Portc.5 , Db7 = Portc.6 , E = Portc.2 , Rs = Portc.0
Dim B1 As Byte
Config Portc.0 = Output
Config Portc.1 = Output
Led1 Alias Portc.0
Led2 Alias Portc.1
dim old_val as byte
dim new_val as byte
old_val = 1
new_val = 0
do
b1 = inkey()
if b1 <> 0 then
Select case b1
case 65
set led1
if old_val <> new_val then cls : locate 1,1 : lcd "LED A"
old_val = 65
case 66
set led2
if old_val <> new_val then cls : locate 1,1 : lcd "LED B"
old_val = 66
case 67
reset led1
reset led2
if old_val <> new_val then cls : locate 1,1 : lcd "LED aus"
old_val = 67
end select
new_val = old_val
end if
loop
end
Gruß
Chris
Lesezeichen