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!
----- Original Message -----From: JCullinsTo: p...@yahoogroups.comSent: Friday, March 03, 2006 1:18 PMSubject: Re: [piclist] PIC with 2 ADC moduleMost pic chips that have analog will have 5 to 8 analog inputs.Pic16f818, 819, 872 873, 877. There are are many morethan 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 10usfor each read.Jim
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
--- 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)
--- 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)