Wenn ich auf eine Taste am atmega16 drücke, sollte dieses auf dem lcd ein Wort schreiben. Aber ohne dass ich drücke schreibt es das wort 3mal. Wenn ich drücke dauert es einige zeit bis es etwas tut. Es schreibt das Wort dann aber auch 3mal.
Hier der Bascom Quellcode:
Danke im VorausCode:$regfile = "m16def.dat" $crystal = 8000000 $baud = 19200 $framesize = 32 Config Adc = Single , Prescaler = 32 Config Portd.2 = Input Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portc.0 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.3 , E = Portc.5 , Rs = Portc.4 Config Lcdbus = 4 Config Single = Scientific , Digits = 2 Config Int0 = Falling Enable Interrupts Enable Int0 On Int0 Spannungsausgabe_auf_tastendruck Dim Batterypower As Integer Cls Locate 1 , 1 Lcd "gestartet" Do Batterypower = Getadc(0) Print Batterypower Wait 1 Loop Spannungsausgabe_auf_tastendruck: Locate 2 , 1 Lcd "hallo" Wait 1 Cls Return
naxos
Edit von BASTIUniversal: Bitte, bitte Code-Boxen verwenden!!







Zitieren

Lesezeichen