Code Tags verwenden ! (PicNick, Mod)Code:$regfile = "m32def.dat" $crystal = 16000000 $baud = 9600 Dim W As Integer Config Portc.0 = Output Config Portc.1 = Output Config Portc.2 = Output Config Portc.3 = Output Config Portc.4 = Output Config Portc.5 = Output Config Portc.6 = Output Config Portc.7 = Output Config Adc = Single , Prescaler = Auto , Reference = Internal Start Adc Portc.0 = 1 Portc.1 = 1 Portc.2 = 1 Portc.3 = 1 Portc.4 = 1 Portc.5 = 1 Portc.6 = 1 Portc.7 = 1 Do W = Getadc(0.) If W = 230 Then Portc.0 = 0 Else Portc.0 = 1 If W = 250 Then Portc.1 = 0 Else Portc.1 = 1 If W = 270 Then Portc.2 = 0 Else Portc.2 = 1 If W = 290 Then Portc.3 = 0 Else Portc.3 = 1 If W = 310 Then Portc.4 = 0 Else Portc.4 = 1 If W = 330 Then Portc.5 = 0 Else Portc.5 = 1 If W = 220 Then Portc.6 = 0 Else Portc.6 = 1 If W = 210 Then Portc.7 = 0 Else Portc.7 = 1 Loop End
Ist dieser Quellcode gut um mit einer 1n4148 diode temperatur zu messen oder hat jemand ein besserren quellcode?? Oder einige verbesserungsvorschläge...
Lesezeichen