Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Regarding design of ADC

Status
Not open for further replies.

NARENDRA1234

Advanced Member level 4
Joined
Mar 9, 2010
Messages
114
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Location
pune
Activity points
2,009
ii am designing 12 bit ADC.its MCP3204/3208.i am attaching its datasheet.we want to convert valtage range from .2v to .8 volts into digital signal fwhich will bi given to microcontroller.so how to do it?how its calculations are done?
 

Attachments

  • adc.pdf
    409.9 KB · Views: 85

Hi Narendra,
Assuming your PS voltage is 5V

1) Use low ripple LDO to convert Power supply voltage to somewhere between 2.5V to 3.3V from 5V. and connect O/P of LDO to Vref pin
2) Now use signal processing/filters to make I/P signal noise free and also amplify the max I/P to 90-95% of Vref. (eg. 0.8V to 3.2V for your application and then connect it to any channel I/P
3) To configure channels as well as serial communication go through 5.0 section of data-sheet.

I hope this is useful
 

is it necessary to uce LDO? how to calculate op of ADC?
 

Hi Narendra,
It is not necessary, normally it is used to reduce noise in Vref by additional regulator so that ADC O/p will be noise free.
To calculate ADC O/P,
For 12 bit ADC, max count is 4096.
Now 4096 is equal to Vref,
so in your case, for given I/p you can calculate O/p count = (Vinput*4096)/Vref. eg. For For 3.3V Vref & 1V I/P, O/p will be 04D9 Hex

I hope this is clear...
 

Hi.

first..you can used directly 5V as a reference to the ADC. the formula is ADC = (4096 * Vin)/Vref... where the 4096 is equal to 2^12. for example ADC = (4096 * 0.8V)/5V... the ADC value should be... 655 decimal or 28F. However, the range of ADC is small if you used a 5V as a reference voltage... so that manojdharap suggest to lower your reference voltage to 2.5 to 3.3V. thus ADC = (4096 * 0.8V)/3.3V... equal to 993 in decimal or 3E0.
 

ok..thnks man i got an idea..now suppose i have an input of 0.8volts and i want to it to be converted to 400 numbet into decimal and displayed it on LCD.i have PIC with inbuilt ADC and LCD display.how will it can be done?

---------- Post added at 12:40 ---------- Previous post was at 12:38 ----------

ok..thnks man i got an idea..now suppose i have an input of 0.8volts and i want to it to be converted to 400 numbet into decimal and displayed it on LCD.i have PIC with inbuilt ADC and LCD display.how will it can be done?
 

what model of micro (PIC) would you used? its 8bits, 16bits or 32bits?

i'm using PIC 18 series and HI-TECH C code software to program the micro...

#include <pic18.h>
#include <hitech.h>
#include <adc.h>

int ADC_VALUE; /* The value from the analog - digital convertor */
void main(void)
{
TRISA=0x3f; /* PORTA as Anlog input */
TRISD=0x00; /* PORTD as output */
while(1)
{
ADCON0=0b1000011; /*the osc F bits 7-6 | the channel bits 5-3 | start bit2 | none bit 1| A2D on when "1" bit 0| */
ADCON1= 0x00; /* 10 bit / 8 bit convertor when "0x10" 10 bit - "0x00" 8 bit */

ADIE = 0; /* Masking the interrupt */
ADIF = 0; /* Resetting the ADC interupt bit */
ADRESL = 0; /* Resetting the ADRES value register */
ADRESH = 0;
GODONE=1; /* Staring the ADC process */
while(GODONE); /* Wait for conversion complete */
ADC_VALUE = (ADRESH); /* Getting HSB of CCP1, in 8 bit mode only
ADRESH in 10 bit mode need the ADRESL to
perform the first 8 bits, THE ADRESH perform the 8
last bits*/

PORTD = ADC_VALUE; /* perform in PORTD the Value */
}
}


Moreover, it is the direct convertion of your analog sample to readable digital sample (ADC convertion only). if you would like to display your sample in a LCD... just call the variable ADC_VALUE... example:

lcd_puts("%d",ADC_VALUE);

remember on LCD...you must first initialize the LCD before it work! :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top