Hallo, habe foldenden Code :
Jetzt soll der AVR, wenn ich TasteC.1 drücke, immer 1 hochzählen. Also von 0 auf 1, und wenn ich nochmal drücke von 1 auf 2 usw.Code:$regfile = "8535def.dat" $crystal = 4000000 $baud = 9600 Config Porta = Output Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Porta.3 , Rs = Porta.1 Config Lcd = 16 * 2 Dim Zeit As String * 2 Config Portc = &B11111100 Portc.2 = 1 Portc.3 = 1 $eeprom Cls Cursor On Lcd "Sekunden" Lowerline Lcd "" Wait 1 Main: If Pinc.1 = 0 Then Goto Zeitplus If Pinc.0 = 0 Then Goto Zeitminus Goto Main Tasterstart: Goto Main Tasterprog: Goto Main
Wenn ich TasteC.0 drücke, immer 1 runterzählen. Also von 2 auf 1, und wenn ich nochmal drücke von 1 auf 0
Die Tasten funktionieren schon, nur das hoch und runterzählen klappt net. Hat jemand einen Tip, wie ich am besten damit anfange ?
mfg Kay







Zitieren

Lesezeichen