EmbeddedRelated.com
Forums

PIC with 2 ADC module

Started by Fiona Soon March 3, 2006
--- In piclist@picl..., "rtstofer" <rstofer@...> wrote:
>
> --- In piclist@picl..., Fiona Soon <fionasoon2001@> wrote:

> >   Now the question is, if i want to write
codes for 2 ADC module,
> (yes, i know PIC16F877 has multiple AN0-6 input), but there is only
> one TXREG register and TX pin. How can i acquire 2 analog signal at
> the same time and send them out to two serial port? 

I'm afraid you'll probably have a problem. There is one  ADC module, 
having a multiplexing input scheme. So you can't measure two analog 
signals "in the same time" as you requested, only if you're
sampling 
and hold - exactly in the same time- those two analogic signals 
outside the pic and then read succesively the voltage from the each 
sampling capacitor with two different analogic inputs. Using two 
serials does not solve your problem as long as the time required for 
one AD measurement is about 20uS.
So anyway using one PIC, you'll have at least (20uS + memory storing 
time) between two succesive (and not simultaneous) AD readings. 

greetings,
Vasile