| Author |
Message |
musa.h
Joined: 26 Oct 2005 Posts: 6
|
28 Jan 2008 23:49 Analog to Digital Conversion on 8051 |
|
|
|
|
Hi all,
I am using the ADC0820 on an 8051 for temperature sensing on an 8051 microcontroller (the Atmel 89C51RB2 to be exact). I only require 5-bit resolution though, but the ADC0820 is an 8-bit converter. Can I use only the 5 LSB pins on the ADC and ignore the other 3 or do I have to use all 8?
Thank You very much,
Musa
|
|
| Back to top |
|
 |
Google AdSense

|
28 Jan 2008 23:49 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
laktronics
Joined: 06 Jan 2007 Posts: 945 Helped: 156
|
29 Jan 2008 4:47 Re: Analog to Digital Conversion on 8051 |
|
|
|
|
Hi,
Yes, you can use, but use five MSBs and not LSbs.
Regards,
Laktronics
|
|
| Back to top |
|
 |
musa.h
Joined: 26 Oct 2005 Posts: 6
|
29 Jan 2008 15:37 Re: Analog to Digital Conversion on 8051 |
|
|
|
|
Thank You very much Laktronics. Can you explain why I'd have to use the 5 MSBs and not the LSBs please? I don't understand that part.
Thank You!
|
|
| Back to top |
|
 |
andre_teprom
Joined: 07 Nov 2006 Posts: 171 Helped: 11 Location: BRAZIL - Rio de Janeiro
|
29 Jan 2008 15:52 Re: Analog to Digital Conversion on 8051 |
|
|
|
|
| LSB adds precision to measured temperature. If you get just 5 MSB, the value have associated to it, a bigger error.
|
|
| Back to top |
|
 |
laktronics
Joined: 06 Jan 2007 Posts: 945 Helped: 156
|
29 Jan 2008 18:59 Re: Analog to Digital Conversion on 8051 |
|
|
|
|
Hi,
It is true that by throwing away the three LSBs, your precision of measurement gets reduced from 1/256 to 1/32. But by asking for a 5bit resolution you are OK with it.
Now let us consider the issue of why 5MSBs and not 5 LSBs. Let us consider a 10bit AD converter with a full scale value of 10Volts. The weightage of the MSB in this case will half the full scale=5V. So if you apply 5V to this ADC, the MSB will be set and all other bits will be zero. Now if you throw away the MS three bits, you will get the answer as Zero. If you take five MS bits, you will still get the correct answer. But because you have thrown away three LSBs, your digital value will change next only when the input changes by 1/32 of full scale 10V = 0.3V approx.
Regards,
Laktronics
|
|
| Back to top |
|
 |
omidgold
Joined: 05 Jun 2006 Posts: 86 Helped: 3
|
16 Feb 2008 18:20 Analog to Digital Conversion on 8051 |
|
|
|
|
| you can us e 89c2051 with analog comparator it is very simple to change without any a/d
|
|
| Back to top |
|
 |
mongoose
Joined: 17 Feb 2008 Posts: 12
|
18 Feb 2008 19:14 Re: Analog to Digital Conversion on 8051 |
|
|
|
|
Hi,
Are you looking for the code.
Ben Erasmus
|
|
| Back to top |
|
 |