# 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?

#### fourtytwo

##### Active Member
No problems but you want the four msb's

#### JimB

##### Super Moderator
You can use any four contiguous bit you like, it all depends on the resolution that you require.

JimB

#### picbits

##### Well-Known Member
As fourtytwo says - you would normally use the 4MSB

#### ronsimpson

##### Well-Known Member
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)

#### JimB

##### Super Moderator
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.
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.

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

JimB

#### JimB

##### Super Moderator
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

#### Pommie

##### Well-Known Member
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.
If the op selects right justify then the required 4 bits are in ADRESH.

Mike.

#### JimB

##### Super Moderator
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

#### Pommie

##### Well-Known Member
Whoops, back to learning to count.

Mike

#### NsrMagazin

##### Member
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.