Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] Vref on ATTiny861a

2010-01-21 by Dennis Clark

Try disconnecting the external Aref when using an internal reference and
see if that clears it up.  The data sheet shows these all being
switchable, but there may be conflicts.  I'd disconnect the Aref and hang
a bypass cap off of it for the internal ref like that data sheet says and
see what happens.

DLC

> Dave,
>
> I ramp the physical voltage into the port 0 up, and at about 5V, it hits
> the 1023 level.  So that's why I conclude it's referencing only the Avcc
> which I have tied to +5.
>
> I have tried every combination of the Vref settings, one by one.
> Including the 2.5V, the 1.1v internal, etc.  I get the same response
> (meaning full scale at 5v) in each case.
>
> I have to believe that the chip does not that kind of significant bug -
> and I have also got to believe that the compiler works on this chip just
> as it's done on a couple of others.
>
> The most logical conclusion is that I am overlooking some footnote in a
> register explanation or something that is specific to this chip...
>
> Regards,
> JB
>
>
> From: Dave McLaughlin
> Sent: Thursday, January 21, 2010 9:36 PM
> To: AVR-Chat@yahoogroups.com
> Subject: RE: [AVR-Chat] Vref on ATTiny861a
>
>
>
> Hi Jeff,
>
> What results are you seeing from the ADC with this code?
>
> What voltage have you got on Vref?
>
> What else have you tried?
>
> Dave.
>
> From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
> Of Jeff Blaine AC0C
> Sent: 21 January 2010 17:47
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] Vref on ATTiny861a
>
> I am having a tough time getting this chip to respond to any other ADC
> voltage reference than the default AVcc.
>
> The code snip is really simple... Below, using the MakroC Pro compiler,
> however the results seem to be the same if I do the same using ASM
> instructions instead of their bit-level defines.
>
> I must be overlooking something. It seems so simple, driving me nuts that
> it's not working right. I have used the same compiler and basic code to
> get
> a mega328 to work.
>
> Appreciate any suggestions the group may have.
>
> Thanks/jeff
>
> REFS0_bit = 1; // 001 invokes external Vref as ADC reference
> ADEN_bit = 1; // enable adc
> ADSC_bit = 1; // start conversion
> while(adsc_bit);
> lb=ADCL; // get lower byte
> ub=ADCH; // get upper byte
> adc_rd0 = (256*ub) + lb; // build number
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


-- 
Dennis Clark
TTT Enterprises

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.