Das folgende Programm funktioniert einwandfrei:
Sobald ich "Input S" setze und ohne "if-Schleife" irgendeinen Integer Wert abfrage, geht nichts. Habe auch die Mhz verändert und bekomme dann Falsche Werte. Also daran glaube ich kann es nicht liegen.Code:$regfile = "M32DEF.DAT" ' Mega32 $crystal = 14745600 ' StAVeR-40 XTAL $baud = 9600 Dim S As Integer ' Sende Integerwert Dim Mybaud As Long Config Porta = Output 'Config Portd.0 = Input Do Print "hello" 'Wenn Input Integer 1 dann Porta.0 = 1 Porta.1 = 1 Porta.2 = 1 Porta.3 = 1 Porta.4 = 1 Porta.5 = 1 Porta.6 = 1 Porta.7 = 1 Wait 2 Porta.0 = 0 Porta.1 = 0 Porta.2 = 0 Porta.3 = 0 Porta.4 = 0 Porta.5 = 0 Porta.6 = 0 Porta.7 = 0 Wait 2 Loop







Zitieren

Lesezeichen