Posted: Sat Nov 22, 2014 6:10 pm Post subject: ADC noise (solved)
Solved! Although the periphery was disconnected from the PWM outputs,
the smoothing network was still connected resulting in power supply glitches when changing N.
Hi,
I am having a strange problem reading the ADC of Attiny841.
In the following code part I chose between increasing N via the For...Loop or setting N=100.
The ADC mode is free running.
Code:
Top: For N =1To255
N=100'<----Chose remarking or not remarking this statement
Ocr2a = N
Ocr2b = N
Waitus50
W =0
W1 = Adc
If W1.9 =1Then W1 = W1 Or&HFE00
W = W + W1
Print #1 , W ;Chr(13); Next Goto Top
Remarking the line N=100 the ADC values fluctuate by about 50 LSB.
Not remarking the line N=100 the ADC fluctuates only by about 5 LSB.
Is there any idea what might cause this problem (and how to fix it)?
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