-->

ADC Interfacing 0804 (with 8051)

By
ADC Interfacing 0804  (with 8051)
Download here the datasheet download 

The easiest way to do analog to digital conversion is to use an IC such as the ADC0804 that does the work for you. The analog voltage is applied to pin 6 and the result is available at pins 11 through 18. We will connect pin 1 and 2 (Chip Select and Read) to ground so that the chip is always enabled. (If you wanted to use more than one ADC you could use this pin to control which chip is currently enabled). 
Connect pin 7 (Vin - ) to ground. The ADC0804 includes an internal oscillator which requires an external capacitor and resistor to operate. Connect the 150 pF capacitor from pin 4 (CLOCK IN) to ground and the 10k ohm resistor from pin 4 to pin 19 (CLOCK R).

ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a single channel IC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to a maximum of 255. The step size can be adjusted by setting the reference voltage at pin9. When this pin is not connected, the default reference voltage is the operating voltage, i.e., Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the analog input, the output varies by 1 unit. To set a particular voltage level as the reference value, this pin is connected to half the voltage. For example, to set a reference of 4V (Vref), pin9 is connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255). 
For getting More information Look Here


Interfacing adc

Circuits

Code 
#include <REGX51.H>
#define output P2
sbit wr = P1 ^ 1;
sbit rd = P1 ^ 0;
sbit intr = P1 ^ 2;
void delay(unsigned int msec)
{
int i, j;
for (i = 0; i < msec; i++)
for (j = 0; j < 1275; j++);
}
 
 
void adc()
{
rd = 1;
wr = 0;
delay(1);
wr = 1;
while (intr == 1);
rd = 0;
delay(1);
intr = 1;
}
 
 
void main()
{
while (1) {
 
adc();
{
delay(100);
}
}
}
 

More Posts

gElectron. Powered by Blogger.

Contributors

16x2 LCD Interfacing with STM32,STM32F103C6

 16x2 LCD  Interfacing with STM32,STM32F103C6 lcd_init(); LCD_LINE1; lcd_String(" GeElectron"); LCD_LINE2; lc...

Contact Form

Name

Email *

Message *

Contact us

Name

Email *

Message *

Follow Us

https://www.facebook.com/gElectron-393939667321867/ FBbox/https://www.facebook.com/IVYthemes

Comments

[blogger]

MKRdezign

Test
google.com, pub-8429441124104529, DIRECT, f08c47fec0942fa0
[blogger]

Latest

[recent][newsticker]

Technology

Top Ads

RECENT COMMENTS

Subscribe Via Email

Subscribe to our newsletter to get the latest updates to your inbox. ;-)


Your email address is safe with us!

RECENT COMMENTS