maybe because your Pauseus 244 is way too high? try to remove it.
maybe because your Pauseus 244 is way too high? try to remove it.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
This is right. It should be 40.
But.
I found out that the circuitry itself acts as a huge capacitor compared to this one.
I replaced it with 58 pF and threw away my calculations. Now it's time
to experiment....
I am using it ratiometrically but the same value doesn't seem to exist two times.
Somehow the capacitor has to have time to charge, having a too high value for Pauseus doesn't affect the measurement, it makes sure that the cap is surely charged. But here I cannot know when it's surely charged, but this must be more than zero.Code:Wert: ADCWert = 0 Trisa.3 = 0 High Porta.3 ;Pauseus 800 Trisa.3 = 1 WHILE Porta.3 = 1 ADCWert = ADCWert + 1 WEND Trisa.3 = 0 Low Porta.3 ;To make UC = Vss Pauseus 100 ;To make UC = Vss RETURN
I did some testing. This is the result: Max = maximum value of the resistor, InB = In Between. Pause = Pause to load the cap.
It should be in the form of x² or -x². But both show strange behaviour.Code:Max InB Min Min InB Max Pause 3 46336 54273 16388 8965 48132 30980 Pauseus 5 39433 54025 11274 64777 11529 27145
Do you have an idea ?
Bookmarks