Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AT91SAM7SE ADC Problem with First Conversion
PostPosted: Tue Aug 10, 2010 9:36 pm 
Offline

Joined: Fri Jul 17, 2009 8:55 pm
Posts: 2
Hi Everyone,

I'm using the ADC with a sample-and-hold circuit. There is no buffer to the ADC input, just a 0.01uF capacitor. I have set SHTIM and STARTUP to the correct values. Every conversion yields the correct result EXCEPT for the first conversion after a reset. I have looked at the ADC input on a scope during the first conversion and have seen that the analog voltage level shifts positively during the conversion. It almost looks like the ADC pin is either sourcing current or dumping charge into the capacitor. Again, this only happens on the first conversion. I am using a software trigger to start the conversion and waiting for the EOC bit. I've seen this with a SAM7SE256 and a SAM7SE512. Has anyone seen anything like this?

Thanks,

Pat

_________________
Pat Broughton
Fives North American Combustion Inc.


Top
 Profile  
 
 Post subject: Re: AT91SAM7SE ADC Problem with First Conversion
PostPosted: Wed Aug 11, 2010 3:45 pm 
Offline

Joined: Thu Feb 25, 2010 5:02 pm
Posts: 88
Hello,

How soon are you performing the first conversion out of reset?

The pull ups on the IO lines are ON until you reconfigure them (ie. set up for ADC).

You may be seeing the residual pullup voltage on the line for your ADC channel.

You could try setting the ADC line as input and disabling the pullups then give a slight delay before configuring the ADC channel (i.e. enough time that the pullup voltage on the line has had time to discharge, TC).

Or you could just throw away the first couple of readings... :wink:

Regards,

_________________
Duane P. Fridley, IEEE CSDP
Viable Bytes, Inc.


Top
 Profile  
 
 Post subject: Re: AT91SAM7SE ADC Problem with First Conversion
PostPosted: Thu Aug 26, 2010 10:46 pm 
Offline

Joined: Fri Jul 17, 2009 8:55 pm
Posts: 2
Thanks for the suggestion, Duane. Actually, the AD pin I'm using is not multiplexed with the PIO controller; it is solely an AD pin. I have no idea what could be causing this, and I've noticed that, depending on the physical microcontroller sample, the first conversion can be "a lot" wrong or just "a little" wrong. I think your second suggestion will have to be the solution - just ignore the first conversion!

Thanks,

Pat

_________________
Pat Broughton
Fives North American Combustion Inc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to: