Dim Adc_value AsWord Config Adc =Single , Prescaler=Auto , Reference=Avcc
ConfigPortb.0=Output
Led AliasPortb.0 '----------------------------------------------------------------------------- Do
Waitms10
Adc_value =Getadc(3)
SelectCase Adc_value
Case1024To500
Reset Led
Case500To0
Set Led
EndSelect Loop
End
This is only a sample. I needed moore steps between 1024 -0
If I wrote "If Adc_value <500 and Adc_value >0 then" ..everything work.
Finally I finish this small programm another way but want to know what I do wrong.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum