CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Hi-res software implemented ADC in 16Fxxx ?? Who knows how?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Lucidan



Joined: 05 Feb 2008
Posts: 7

View user's profile Send private message

Hi-res software implemented ADC in 16Fxxx ?? Who knows how?
PostPosted: Wed Feb 13, 2008 7:54 am     Reply with quote

I'm looking for a way to make a 16-bit ADC, without using built-in ADC, since those have only 10-bit resolution.

Who can help me?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 8:42 am     Reply with quote

Pick your favorite chip company, Maxim, Analog Devices, National Semiconductor, Texas Instruments, etc. go to their web site and use their product selection wizards. Also check the CCS examples files.

Note Maxim (www.maximic.com) is very good about free samples!
_________________
The search for better is endless. Instead simply find very good and get the job done.
Lucidan



Joined: 05 Feb 2008
Posts: 7

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 9:04 am     Reply with quote

Thanks, but i'm looking for a way to implement this in the PIC (software), with a minimum of external components needed.
Franck26



Joined: 29 Dec 2007
Posts: 122
Location: Ireland

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 1:30 pm     Reply with quote

Hi Lucidan,
If you want to implement a software ADC, you will have to use a R/2R resistor network and an analog comparator (analog comparator are already implemented in some pic).
But there is no point to do it if you want a 16 bits ADC, because of the resitors tolerance: you will have something worse than 10 bits...

For a 16 bits ADC, the only (good) solution is to use anintegrated ADC, to have a good reference voltage and a good layout.

Good luck.
kolio



Joined: 06 Feb 2008
Posts: 26

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 1:39 pm     Reply with quote

You can try with so called "dual slope adc" circuit. Slope ADCs are always slower, but more precise (depends on timer resolution). Check this link for some theory:
http://www.mines.edu/Academic/courses/physics/phgn317/lect11/sld008.htm
You'll need to build a circuit with several external components:an analog switch ,integrating opamp, constant current source, temperature-stable resistors and capacitors. The comparator is most probably available in PIC16 and the timer definitely :-) The hard part is signal conditioning at the input - you'll need some active filtering with an opamp if the measured signal is not battery voltage level for example, but the load cell of an electronic scales.
My first job 14 years ago was to build an electronic scales with dual integration circuit. But then I found Intersil ADC ICL71-something...

P.S. If your project is not educational or hobbi, better listen what Sherpa told you and purchase an ADC right now Very Happy
Guest








PostPosted: Wed Feb 13, 2008 2:29 pm     Reply with quote

Microchip has an application note AN700 that describes the following,

(text from Microchip.com)
This application note describes how to implement an Analog-to-Digital (A/D) Converter function using a member of the PIC16C6XX series of microcontrollers. Although these microcontrollers do not have a built-in A/D Converter like other controllers from Microchip, the comparator function, internal voltage reference and timers can be used to digitize an analog signal. Some of the standard PICmicros have a comparator module, consisting of two comparators, both of which can be connected to PORTA in a variety of configurations. The internal voltage reference divider can be used with the comparators to establish thresholds. Additionally, one of the comparator inputs can be configured to the RA2 port allowing for the use of an external voltage reference. By combining these elements, a first order modulator and first order filter can be designed, emulating the function of an analog-to-digital delta-sigma conversion. This method of conversion is quickly implemented in firmware with very few additional external components. Consequently, the cost of hardware implementation is minimal, particularly for such a high resolution converter solution. The input range is very flexible and adjusted with external resistors. Although this method is not particularly strong in terms of DC accuracy, it is well suited for ratiometic applications.

HTH - Steve H.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Feb 14, 2008 8:28 am     Reply with quote

Read Microchip application note AN512. It tells how to build an A/D conversion mechanism with minimal hardware. It also describes the limitations of such a system and why you will never get 16 useful bits from it. AN512 is a good education about what can and can not be done by software.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group