AT90USBKEY2 External ADC reference voltage

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear all,
I want to use ADC of At90usb1287. In the datasheet it is mentioned that reference voltage can be 0-Vcc. I want to give 1.023V reference voltage to Aref pin. I have set ADMUX- Ref0 Ref1 bits to 00. From the schematic of usbkey I found Aref pin connected to the C4 capacitor, so I connected external voltage between that pin and common ground pin. Is it correct? Do I need some special modification in the circuit in order to use external reference voltage for ADC? Is 1.023V appropriate for
Kindly help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The datasheet is the reference. I seem to recall the min vref is 1.1V - the datasheet will confirm. Otherwise, yes, you connect an external reference to vref.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have done without success, and I think at90usb1287 has 2.56V internal reference voltage. Can anyone tell me if I want to connect external 1.023V for reference, what I should connect to AVcc, Aref, Agnd pins? If anyone has used at90usbkey with external adc reference voltage then it will be more helpful...
Thanks..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Avcc and agnd are already connected on the at90usbkey. What reference chip are you using and how have you connected it? The avr has an internal reference, but you choose if you want to use it, external or avcc. What code have you been using?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Initially, I used 3.3V and 5V from At90usbkey to generate 1.023V using resistor pot. I found it not working, the ADC value always shows 3FF with that(even connected to ground), then I connected variable power supply, it works with that. So, anyone can guide me the best way to generate 1.023V.
If I can generate from VBus from usbkey then it saves component but if not then its ok to have some precise source.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

In the datasheet it is mentioned that reference voltage can be 0-Vcc.

As hinted above, that doesn't sound right. Where did you see that in the datasheet?

My datasheet shows

Quote:

Table 31-5. ADC characteristics
...
VREF Reference Voltage Single Ended Conversion 2.0V-AVCC
...

which totally explains your symptoms.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Quote:

My datasheet shows

Quote:

Table 31-5. ADC characteristics
...
VREF Reference Voltage Single Ended Conversion 2.0V-AVCC
...

which totally explains your symptoms.

You are absolutely right, however last night I gave Vref=1.078Vand Vin=0.724V and got ADC=686 which is correct value, I wonder how its working...Need to reconfirm again...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A low reference wont stop it working but the performance will be degraded.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ya, correct.