EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

PIC with 2 ADC module

Started by Fiona Soon March 3, 2006
Hello All,
Can someone tell me which PIC has 2 ADC module? Can they run simultaneously although with a few ms of delay due to program sequencing?
 
Thank you.
 


Relax. helps detect nasty viruses!

Most pic chips that have analog will have 5 to 8 analog inputs.
Pic16f818, 819, 872 873, 877. There are are many more
than listed here. 
 Mosf PIC16F series as listed here will be be 10 analog as well.
and yes you can read any one are all one after the other. takes approx 10us
for each read.
Jim
 
 
 
On 3/3/2006 12:06:09 AM, Fiona Soon (f...@yahoo.com) wrote:
> Hello All,
> Can someone tell me which PIC has 2 ADC module? Can they run
> simultaneously although with a few ms of delay due to program sequencing?
>
> Thank you.>
> -
> Relax. and follow the
> instructions>
> SPONSORED LINKS
> Microcontroller [link: groups.yahoo.
> com/gads?t=ms&k=Microcontroller&w1=Microcontroller&w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=Pic+microcontrollers&c=6&s2&.
> sigu8D0WTcCC_wz2NML1-Q] Microprocessor [link: groups.yahoo.
> com/gads?t=ms&k=Microprocessor&w1=Microcontroller&w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=Pic+microcontrollers&c=6&s2&.
> sig=jWbBHutp0PsKo377UAUUMg] Microchip pic [link: groups.yahoo.
> com/gads?t=ms&k=Microchip+pic&w1=Microcontroller&w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro&w6=Pic+microcontrollers&c=6&s2&.
> sig=cxg8HXTXLd38eREw0NTdfg]
> Microcontrollers [link: groups.yahoo.
> com/gads?t=ms&k=Microcontrollers&w1=Microcontroller&w2=Microprocessor&w3=Microchip+pic&w4=Microcontrollers&w5=Picmicro

----- Original Message -----
From: JCullins
To: p...@yahoogroups.com
Sent: Friday, March 03, 2006 1:18 PM
Subject: Re: [piclist] PIC with 2 ADC module

Most pic chips that have analog will have 5 to 8 analog inputs.
Pic16f818, 819, 872 873, 877. There are are many more
than listed here. 
 Mosf PIC16F series as listed here will be be 10 analog as well.
and yes you can read any one are all one after the other. takes approx 10us
for each read.
Jim
 
I think he wanted two separate ADC modules, not inputs.
 
Leon
--
Leon Heller, G1HSM
l...@bulldoghome.com
http://webspace.webring.com/people/jl/leon_heller/


Try the selector guide at Microchip.com:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeIdt

--- Fiona Soon <fionasoon2001@fion...> wrote:

> Hello All,
>   Can someone tell me which PIC has 2 ADC module? Can they run
> simultaneously although with a few ms of delay due to program
> sequencing?
>    
>   Thank you.
>    
> 
> 		
> ---------------------------------
> Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
	My software has no bugs, only undocumented features.

--- In piclist@picl..., "Leon Heller" <leon.heller@...>
wrote:
>
>   ----- Original Message ----- 
>   From: JCullins 
>   To: piclist@picl... 
>   Sent: Friday, March 03, 2006 1:18 PM
>   Subject: Re: [piclist] PIC with 2 ADC module
> 
> 
>   Most pic chips that have analog will have 5 to 8 analog inputs.
>   Pic16f818, 819, 872 873, 877. There are are many more
>   than listed here. 
>    Mosf PIC16F series as listed here will be be 10 analog as well.
>   and yes you can read any one are all one after the other. takes 
approx 10us
>   for each read.
>   Jim
> 
> I think he wanted two separate ADC modules, not inputs.
> 
> Leon

I thought Fiona was a girl's name up until now ;-)

She stated a couple of mS delay between channel reads was acceptable, 
so unless the aim is to read two voltages simultaneously most pics 
with A/D will be able to handle the task.

Chris B
(Without a failing 's' key !)
GM4UCD
	
Hello Chris, Chart and Cullins,
 
Of course, Fiona is a girl!01.gif
 
I have written codes for one channel 10bit ADC by setting all the relavent register (SPBRG, ADCON0, RCSTA and etc.) and move two packets of data out (8 bit and 2 bit respectively) to the TXREG through the TX pin.
 
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? Don't i need two TX pin?
 
My example code to share is in the attachment if anyone interested.
 
Thank you.
 
Fiona



Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.


--- In piclist@picl..., Fiona Soon <fionasoon2001@...> wrote:
>
> Hello Chris, Chart and Cullins,
>    
>   Of course, Fiona is a girl!
>    
>   I have written codes for one channel 10bit ADC by setting all the
relavent register (SPBRG, ADCON0, RCSTA and etc.) and move two packets
of data out (8 bit and 2 bit respectively) to the TXREG through the TX
pin.
>    
>   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? Don't i need two
TX pin?
>    
>   My example code to share is in the attachment if anyone interested.
>    
>   Thank you.
>    
>   Fiona

Frankly, I would find a processor with the proper hardware.  Many
devices have 2 UARTS including the Atmel ATmega128 and related
devices.  I am certain that there are PICs that have 2 UARTS, as well.

However, you could always bit-bank a serial stream to any pin.  Code
for doing this is all over the Internet.  You might look over at
www.piclist.com.

Richard
	
--- In piclist@picl..., Fiona Soon <fionasoon2001@...> wrote:
>
> Hello Chris, Chart and Cullins,
>    
>   Of course, Fiona is a girl!
>    
>   I have written codes for one channel 10bit ADC by setting all the
relavent register (SPBRG, ADCON0, RCSTA and etc.) and move two packets
of data out (8 bit and 2 bit respectively) to the TXREG through the TX
pin.
>    
>   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? Don't i need two
TX pin?
>    
>   My example code to share is in the attachment if anyone interested.
>    
>   Thank you.
>    
>   Fiona
>   

Doing a parametric search of 8 bit PICs at www.microchip.com yields 20
devices in the 18f series with dual AUSARTs or dual EUSARTs.  All have
MANY A/D channels between 11 and 16.

I suppose there is a reason you can just send the data out 1 USART by
just reading a channel, sending the data, reading another channel,
sending that data, etc.

Richard
	
--- In piclist@picl..., Fiona Soon <fionasoon2001@...> wrote:
>
> Hello Chris, Chart and Cullins,
>    
>   Of course, Fiona is a girl!
>    
>   I have written codes for one channel 10bit ADC by setting all the 
relavent register (SPBRG, ADCON0, RCSTA and etc.) and move two packets 
of data out (8 bit and 2 bit respectively) to the TXREG through the TX 
pin.
>    
>   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? Don't i need two TX pin?
> 

i think that i understand your concept.
So okay it's a case of using a pic with 2 Uarts and nearly all of them 
have multichannel A/D's

If you can attach your serial data receivers to the same output though 
you can get a lot of mileage out of what you have.....

Read A2D input 0 > Saved_A2D_0
Read A2D input 1 > Saved_A2D_1
Read
.
.
.
.

Movf Saved_A2D_0 > txreg
Movf Saved_A2D_0 > txreg
Movf
.
.

Loop back to the top after a pause...don't want to swamp the serial bus

If your serial receivers are something of your own design they can all 
share the same serial line, either by looping through the TX-RX UART on 
each device or by buffering the output from the sender and connecting 
all receivers to the single buffer. The chained devices being the 
preffered way because if each device knows it's own position in the 
chain it knows which byte in the stream is relevant to itself.

Chris,
(Currently chaining upto 255 16F690's)
	
Thanks guys!
 
I think i will opt to choose a PIC with 2 UART which is a more trivial solution.
 
Thank you.


Chris <f...@aol.com> wrote:
--- In p...@yahoogroups.com, Fiona Soon <fionasoon2001@...> wrote:
>
> Hello Chris, Chart and Cullins,
>   
>   Of course, Fiona is a girl!
>   
>   I have written codes for one channel 10bit ADC by setting all the
relavent register (SPBRG, ADCON0, RCSTA and etc.) and move two packets
of data out (8 bit and 2 bit respectively) to the TXREG through the TX
pin.
>   
>   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? Don't i need two TX pin?i think that i understand your concept.
So okay it's a case of using a pic with 2 Uarts and nearly all of them
have multichannel A/D's

If you can attach your serial data receivers to the same output though
you can get a lot of mileage out of what you have.....

Read A2D input 0 > Saved_A2D_0
Read A2D input 1 > Saved_A2D_1
Read
.
.
.
.

Movf Saved_A2D_0 > txreg
Movf Saved_A2D_0 > txreg
Movf
.
.

Loop back to the top after a pause...don't want to swamp the serial bus

If your serial receivers are something of your own design they can all
share the same serial line, either by looping through the TX-RX UART on
each device or by buffering the output from the sender and connecting
all receivers to the single buffer. The chained devices being the
preffered way because if each device knows it's own position in the
chain it knows which byte in the stream is relevant to itself.

Chris,
(Currently chaining upto 255 16F690's)


Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.


The 2024 Embedded Online Conference