Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] M128 ADC problem

2003-12-30 by David VanHorn

At 08:44 PM 12/30/2003 +1100, John Samperi wrote:

>At 12:29 AM 30/12/03 -0500, you wrote:
>>
>>       IN      TEMP,ADCH       ;GET 8 BIT RESULT
>>
>>I always get to this point, indicating that I am indeed talking to 
>>the ADC, since the conversion complete bit does clear.
>>At this point, I only ever get 0x00 in ACCUM.
>
>David, ADCH only has the top 2 bits IIRC (bit 8 &9),
>so reading a value which is less than 256 would give you
>00 as above in ADCH. I think I read ADCL and ADCH
>and rotate the value left twice to get an 8 bit value in one
>of the applications with the 8535.

I'm setting for left-justified, so the result should be 8 bit, and all in ADCH.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.