Code:'Deklarationen $regfile = "m8def.dat" $crystal = 8000000 Ddrc = &B00000010 Portc = &B00000001 'LCD Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portd.4 , Db5 = Portd.5 , Db6 = Portd.6 , Db7 = Portd.7 , E = Portd.3 , Rs = Portd.2 Config Lcdbus = 4 Dim Led As Bit 'Programm Do Debounce Pinc.0 , 1 , Flag If Led = 1 Then Gosub Led_ein If Led = 0 Then Gosub Led_aus Loop End 'Subroutinen Led_ein: Portc.1 = 1 Cls Locate 1 , 1 Lcd "LED ein" Return Led_aus: Portc.1 = 0 Cls Locate 1 , 1 Lcd "LED aus" Return Flag: Toggle Led Return
Lesezeichen