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.
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
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.
Bookmarks