Additional 28/40X1 ADC channels?

MFB

Senior Member
I now have an urgent (been waiting for the 40X2) application that needs six ADC channels and would like to know if it is possible to enable any of the 28X1 additional analog inputs (AN8-AN13) shown on the PIC16F886 data sheet? It seems quite easy to enable additional analog channels on the 14M and -not so easily- on the 18X. I have not been able to find any documentation about doing this on the 28 or 40X1 and would very much appreciate any relevant information.
 

westaust55

Moderator
I do not think that it is posible with the 28X1 or 40X1 to access the additional pins with Analogue capabilities.

To change a pin to an analogue function, you need access to the ANSEL and/or ANSELH special function registers (SFR's) but the registers required ($188 and $189) are outside the range of the PEEK and POKE commands (range = $0 to $0FF)
 

westaust55

Moderator
Untested but a scheme similar to the attached was proposed recently.

If the analogue device load is only a few milli-amps then you may net even need the transistor switches.

There may be some degradation of the signals due to some loading of the unpowered device. In fact, some degradation is likely its more a case of how much.

If you wish to stick with your 28X1 with its 5 Analog inputs then this may be worth a try.
 

Attachments

MFB

Senior Member
Thanks for the advice. Looks like the best way to get those extra analog channels will be to move up to the 40X1.
 

MFB

Senior Member
Adding a mux

For what its worth, the approach that I have used in the past, to provide additional analog channels, is to place a MAX4639 dual 4:1 multiplexer in front of the four 28X1 ADC inputs. By connecting the multiplexer’s four control lines together and toggling them from a PICAXE output it is possible to rapidly scan eight analog input channels, in banks of four.

An alternative would have been to use a MAX4638 single 8:1 multiplexer but this would have needed three PICAXE outputs and been slower to scan. However, it would free another three ADC inputs to give a total of 11 analog channels. Either way, it needs an additional chip compared with using a n(admittedly larger) PICAXE 40X1.
 
Top