Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
ZX-24X ADC resolution

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
spamiam



Joined: 13 Nov 2005
Posts: 666

Posted: 25 August 2010, 18:00 PM    Post subject: ZX-24X ADC resolution Reply with quote

I was looking at the specifications of the ZX-24X. It says that the ADC resolution is 10 bits. The ATXmega device it uses is capable of 12 and 8 bits resolution. I presume that the 2 least siginficant bits of the 12 bit sample are lost in order to maintain compatibility with the ZBasic standard 10 bit software.

Is this true that the 2 bits are lost? If so, is it possible to read the ADC register directly to get the full 12 bits? Is it possible to know when there is a new ADC result available, rather than just re-read the old result?

-Tony
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 25 August 2010, 20:30 PM    Post subject: Re: ZX-24X ADC resolution Reply with quote

spamiam wrote:
Is this true that the 2 bits are lost?

No, the result returned is a 12-bit value but there are issues on the xmega chip that render the result accurate only to 10 bits or so. There have been several discussions on AVR Freaks about this defect.

spamiam wrote:
Is it possible to know when there is a new ADC result available, rather than just re-read the old result?
A new result will never be available until some time after a new conversion cycle is begun. Although GetADC() doesn't use it, you can configure the ADC on both mega and xmega devices to "free run", meaning that as soon as one conversion is completed it automatically begins another. In this mode, you have to read bits of the status register to know when a new result is available. The device datasheet describes what is necessary to do to implement this mode.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group