hi,
your answer is "something like that"
... but as the PIC will perform the A/D conversion ... a Porta Analog input has some good chance to be in use ... if you do not use another ADC input ( PortE 0,1 or 2 for a 16F877a )
without any headaches ... it gives
Code:
Porta.5 = 0 ' Enable the Mpxer
for I = 0 to 15
Porta = (Porta & %11000001 ) + (I *2) ' Keep Porta.5 low, Porta.0,6,7 as is, and Porta1-4 select the input
Pause 5 ' to stabilize Mpxer Output voltage
ADCin Portx.y, value[I] ' Portx.y is where the Mpxer output is connected ...
'value[I] is the table location corresponding to the cell
NEXT I
.
.
.
too simple !
Alain
PS: May be someone could explain me why writing [] with UPPERCASE I inside the brackets show ...
Bookmarks