ner code:
Code:
$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 16000000
$baud = 9600
Print
Print "**** RN-Control 1.4 *****"
Print "Programm: ADC-Test-1"
Print
Sound Portd.7 , 400 , 450 'BEEP
Sound Portd.7 , 400 , 250 'BEEP
Sound Portd.7 , 400 , 450 'BEEP
'ADC Konfiguration
Const Ref = 5 / 1023 ' = 5.0 / 1024.0
Config Adc = Single , Prescaler = Auto , Reference = Internal
Do
Start Adc
Dim W As Word
Dim Volt As Single
'Hautprogramm
Porta.0 = 1
W = Getadc(0)
Volt = W * Ref
Print "ADC-Pin 0: Wert " ; W ; " Volt: " ; Volt
Wait 1
Loop
End
keine besserung
Lesezeichen