Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8 Bit ADC IC but only using 4 bits

Status
Not open for further replies.

max1525

New Member
I need a 4 bit ADC IC however I know this doesn't exist and while I could possible build a 4 bit flash ADC, I'm wondering if it would be possible to use an 8 bit ADC IC and just use the 4LSB? If this is possible what would be the disadvantages of this?
 
You can use any four contiguous bit you like, it all depends on the resolution that you require.

JimB
 
You can use any four contiguous bit you like, it all depends on the resolution that you require.JimB
As fourtytwo says - you would normally use the 4MSB
4321xxxx Vref=5V then you can measure 0 to 5V in 312mV steps. (over voltage = F in hex)
x4321xxx Vref=5V then you can measure 0 to 2.5V in 156mV steps. (over voltage will give strange numbers)
xx4321xx Vref=5V then you can measure 0 to 1.25V in 78mV steps. (over voltage will give strange numbers)
xxx4321x Vref=5V then you can measure 0 to 0.625V in 39mV steps. (over voltage will give strange numbers)
xxxx4319 Vref=5V then you can measure 0 to 0.312V in 19.5mV steps. (over voltage will give strange numbers)
 
4321xxxx Vref=5V then you can measure 0 to 5V in 312mV steps. (over voltage = F in hex)
x4321xxx Vref=5V then you can measure 0 to 2.5V in 156mV steps. (over voltage will give strange numbers)
xx4321xx Vref=5V then you can measure 0 to 1.25V in 78mV steps. (over voltage will give strange numbers)
xxx4321x Vref=5V then you can measure 0 to 0.625V in 39mV steps. (over voltage will give strange numbers)
xxxx4319 Vref=5V then you can measure 0 to 0.312V in 19.5mV steps. (over voltage will give strange numbers)

Exactly.

If you want to do a be a bit more adventurous shuffling the bits around, you could do something like
4x3x2x1x
or
x4x3x2x1
Different ranges and resolutions.

Look at the ADC in the PIC 16F887 for example.
It is a 10bit ADC, it is read in two registers ADRESH and ADRESL, which can be loaded left justified or right justified.
On several projects I have loaded them "left justified" so that the top 8 bits are in ADRESH and the bottom 2 bits are in ADRESL.
I then just read ADRESH and ignore ADRESL to read 0 to 5v with 8 bits resolution.

As long as you know what you are doing with the bits, various permutations are possible.

JimB
 
If you want to do a be a bit more adventurous shuffling the bits around, you could do something like
4x3x2x1x
or
x4x3x2x1
Different ranges and resolutions.
On reflection, that is a truly bad idea!

Lesson learned:
Don't have good ideas when you are tired!

JimB
 
It is a 10bit ADC, it is read in two registers ADRESH and ADRESL, which can be loaded left justified or right justified.
On several projects I have loaded them "left justified" so that the top 8 bits are in ADRESH and the bottom 2 bits are in ADRESL.
I then just read ADRESH and ignore ADRESL to read 0 to 5v with 8 bits resolution.
If the op selects right justify then the required 4 bits are in ADRESH.

Mike.
 
If the op selects right justify then the required 4 bits are in ADRESH.
In the example I gave, if right justify is selected, only the top two MS bits will be in ADRESH.

Apart from which, the OP never mentioned using a PIC.
It was I who mention PICs in a misguided (?) burst of enthusiasm.

JimB
 
I hope no-one mentioned this:

If you use the 4 LSB(least significant bits) of the ADC, you will get the accurate result up to 2 on the power of 4 == 16 divisions.

The downfall: after that you will keep resetting the 4 LSB bits because you can have "1 0000" and so on. This means that the voltage will be for 17 divisions, but you will get "0" on the 4 LSB bits.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top