Searching \ for '[PIC]: USART sharing?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=usart
Search entire site for: 'USART sharing?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: USART sharing?'
2001\10\29@060629 by JP

flavicon
face
Hi, as the 877 only has one USART I need to share it.  I need to have it recieving data from my GPS feed and sending data to a Serial LCD display, these do not need to communicate at the same time but I will need to isolate the GPS while writing to the LCD as I could corrupt the programable memory in the GPS.

Any ideas on how I can do this?

Thanks,
JP.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@064940 by Gerhard Fiedler

flavicon
face
At 11:04 10/29/2001 +0000, JP wrote:
>Hi, as the 877 only has one USART I need to share it.  I need to have it
>recieving data from my GPS feed and sending data to a Serial LCD display,
>these do not need to communicate at the same time but I will need to
>isolate the GPS while writing to the LCD as I could corrupt the
>programable memory in the GPS.

This has been here a few days ago... you can use a number of options,
depending on what hardware you have around. If you use separate line
drivers, you can use two gates for the send lines and open always only one.
Or you can use CMOS switches. Or you can use some kind of transistor logic
to hold the inactive tx line -- which may also allow you to go with only
one line driver. Best choice depends on your preferences, what line driver
you use and the rest of the circuit...

ge

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@070734 by Byron A Jeff

face picon face
On Mon, Oct 29, 2001 at 11:04:40AM -0000, JP wrote:
> Hi, as the 877 only has one USART I need to share it.  I need to have it
> recieving data from my GPS feed and sending data to a Serial LCD display,
> these do not need to communicate at the same time but I will need to isolate
> the GPS while writing to the LCD as I could corrupt the programable memory
> in the GPS.
>
> Any ideas on how I can do this?

I do have one question: Are both units operating at the same bit rate?

The first idea that came to mind is to simply use a 74HC08 AND gate to
gate the USART signal. For example with transmitting take Tx and tie it
to the inputs of two AND gates. Then take two other PIC I/O pins and tie them
to the other gate inputs. The two PIC pins can then gate Tx on by setting the
I/O pin high and block Tx by setting it low.

Hope this helps,

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@081655 by Dale Botkin

flavicon
face
On Mon, 29 Oct 2001, JP wrote:

> Hi, as the 877 only has one USART I need to share it.  I need to have
> it recieving data from my GPS feed and sending data to a Serial LCD
> display, these do not need to communicate at the same time but I will
> need to isolate the GPS while writing to the LCD as I could corrupt
> the programable memory in the GPS.

Are you ONLY receiving from the GPS, and ONLY transmitting to the LCD?  If
so you have a no-brainer, just connect TxD to the LCD and RxD to the GPS,
assuming both can operate at the same bit rate.  Just a thought.

Dale
--
Hallo, this is Linus Torvalds and I pronounce Linux as Leennuks.
Hallo, this is Bill Gates and I pronounce 'crap' as 'Windows'.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@094755 by Thomas McGahee

flavicon
face
I believe you would want to use an OR gate instead of an AND gate,
as you want the output of the gate to be Marking HIGH when it
is disabled. I posted a GIF of this setup on 10/23/01. The
control signal is LOW to enable, HIGH to disable (force Marking
High on output).

If you want to get really cheap, or you want to save board space,
or simply don't want to use another IC, you can make an OR gate
from two diodes and a resistor. Connect the cathodes together to
form the output. Add a pullDOWN resistor (1k works well) to
GROUND from the joined cathodes. The two anodes become the OR
gate's inputs. Whenever either input is HIGH, the output will
go high. Thus, if the "control" input is held high, the
outputs is forced HIGH, which is the Marking state. If the
"control" input is held LOW, then the output follows the
state of the other input, which is the "data" input.

Two of these OR gates can be connected so that the two
data lines are both connected to the TX line. Each control
line goes to its own PIC i/o pin. The two outputs will
follow the TX line if their respective control line is
LOW. Otherwise they will be Marking HIGH.

Fr. Tom McGahee

{Original Message removed}

2001\10\29@094805 by JP
flavicon
face
That is a very good idea, I will have to explore that avenue.  Thanks.

----- Original Message -----
From: "Byron A Jeff" <spam_OUTbyronTakeThisOuTspamCC.GATECH.EDU>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Monday, October 29, 2001 12:05 PM
Subject: Re: [PIC]: USART sharing?


> On Mon, Oct 29, 2001 at 11:04:40AM -0000, JP wrote:
> > Hi, as the 877 only has one USART I need to share it.  I need to have it
> > recieving data from my GPS feed and sending data to a Serial LCD
display,
> > these do not need to communicate at the same time but I will need to
isolate
> > the GPS while writing to the LCD as I could corrupt the programable
memory
> > in the GPS.
> >
> > Any ideas on how I can do this?
>
> I do have one question: Are both units operating at the same bit rate?
>
> The first idea that came to mind is to simply use a 74HC08 AND gate to
> gate the USART signal. For example with transmitting take Tx and tie it
> to the inputs of two AND gates. Then take two other PIC I/O pins and tie
them
> to the other gate inputs. The two PIC pins can then gate Tx on by setting
the
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@104544 by Byron A Jeff

face picon face
On Mon, Oct 29, 2001 at 09:43:44AM -0500, Thomas McGahee wrote:
> I believe you would want to use an OR gate instead of an AND gate,
> as you want the output of the gate to be Marking HIGH when it
> is disabled.

You know what's sad Fr. Thom? I'd written the message with it reversed (OR
instead of AND) and then I though the myself "Whoops! I got it backwards."
and changed it.

Just a reminder to go with one's first thought because it's usually right.

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\29@152748 by Douglas Wood

picon face
part 1 947 bytes content-type:text/plain; (decoded 7bit)

Attached is a circuit I use a lot on various designs to accomplish this...

Douglas Wood
Software Engineer
dbwoodspamKILLspamkc.rr.com

Home of the EPICIS Development System for the PIC and SX
http://epicis.piclist.com

{Original Message removed}
part 2 24972 bytes content-type:application/pdf; (decode)

part 3 154 bytes
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\31@125836 by JP

flavicon
face
suppose I could do that but it would mean calculating the hedating to
waypoint calculations and distance to waypoint calculations on the PIC.

{Original Message removed}

2001\10\31@133506 by Dale Botkin

flavicon
face
On Mon, 29 Oct 2001, JP wrote:

> suppose I could do that but it would mean calculating the hedating to
> waypoint calculations and distance to waypoint calculations on the PIC.

Oh...  I must have missed something in your original post, I thought you
were just receiving data from the GPS and sending it to the LCD.  So you
really need to send *and* receive to one or both devices?  Where would the
distance and heading calculations be happening now?

Dale

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]: USART sharing?'
2001\11\01@164344 by JP
flavicon
face
Sorry I was not too clear.
Send and recieve from the GPS and send only to the LCD.  The calc are done
within the GPS unit.  I have decided to use the solution posted by Doug Wood
as it seems the best way around the problem.


{Original Message removed}

2001\11\01@170445 by David Huisman

flavicon
face
I have not seen all the previous posts an maybe someone has already
suggested the following (please accept my apology if this is a repeat of
someone's previous post).

I would use the onboard UART to receive NMEA string data from the GPS head
(you can set your code to detect only required strings ($RMC etc).
The TX port of the UART can be used for configuring the GPS and sending it
initial coordinates for quicker TTF. (Time to Fix)

Then I would bit-bash any of the other pins on the micro for controlling the
LCD.

Best Regards

David Huisman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\11\01@180502 by JP

flavicon
face
It was really just for the ease of use of the usart compared to bit bashing
on other pins.


----- Original Message -----
From: "David Huisman" <EraseMEdavid.huismanspam_OUTspamTakeThisOuTADVMININGTECH.COM.AU>
To: <PICLISTspamspam_OUTMITVMA.MIT.EDU>
Sent: Thursday, November 01, 2001 10:04 PM
Subject: Re: [PIC]: USART sharing?


> I have not seen all the previous posts an maybe someone has already
> suggested the following (please accept my apology if this is a repeat of
> someone's previous post).
>
> I would use the onboard UART to receive NMEA string data from the GPS head
> (you can set your code to detect only required strings ($RMC etc).
> The TX port of the UART can be used for configuring the GPS and sending it
> initial coordinates for quicker TTF. (Time to Fix)
>
> Then I would bit-bash any of the other pins on the micro for controlling
the
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...