hallo
dein fehler liegt daran das du einfach mal den porta als input deklarieren must.
dann probiers mal so:
Code:$regfile = "m32def.dat" $crystal = 16000000 Config Porta = Input Config Portc = Output Dim a As Word Enable Interrupts Start Adc Do a = Getadc(0) If a > 0 Then Portc.7 = 1 Else Portc.7 = 0 If a > 128 Then Portc.6 = 1 Else Portc.6 = 0 If a > 256 Then Portc.5 = 1 Else Portc.5 = 0 If a > 384 Then Portc.4 = 1 Else Portc.4 = 0 If a > 512 Then Portc.3 = 1 Else Portc.3 = 0 If a > 640 Then Portc.2 = 1 Else Portc.2 = 0 If a > 768 Then Portc.1 = 1 Else Portc.1 = 0 If a > 896 Then Portc.0 = 1 Else Portc.0 = 0 Waitms 10 Loop End







Zitieren

Lesezeichen