Hi mackrackit,
With CHAN0 = ADRESH all LED's lit in sequence.Try hard coding the value for "CHAN0".
With CHAN0 = 255 D0 lits.
With CHAN0 = 193 D1 lits.
with CHAN0 = 129 D2 lits.
with CHAN0 = 65 D3 lits.
So using greater than> the sequence still followed!
Then using <than and ADRESH D0 lit.Try reversing the values from the original but use < with the ADC active.
With CHAN0 = 253 D0 lit.
With CHAN0 = 191 D0 lit.
With CHAN0 = 127 D0 lit.
With CHAN0 = 63 D0 lit.
So using less <than only D0 lit! across all settings. I wasn't expecting that I must admit, I thought it would work the same as > only in reverse.
mackrackit,is the reason only led0 lights because the ADC isn't using the MSB's when doing the conversion, or something like that. Or have I simply made a mistake here.
Dave
Bookmarks