Serial Multiplexing

Started by July 1, 2004
I have 2 serial ports on my 18F458, but the problem is that I need
3. Is there anyway I can multiplex 2 lines into one of the ones on
the PIC?

Thanks.



In a message dated 7/1/2004 11:27:47 AM Eastern Daylight Time, h...@yahoo.com writes:


I have 2 serial ports on my 18F458, but the problem is that I need
3.  Is there anyway I can multiplex 2 lines into one of the ones on
the PIC?


Why do you need three?  Are you sending data to 3 different places?  If so, you can  use an "address" with one of  your two lines so it will be received by a specific receiver.  For instance:

serout pin, baud, ["A", data]

then serin pin, baud, [wait("A"), data]

Sid



I am sending/receiving data to 3 different places. How can I use
the address feature with CCS C Compiler? --- In , Newzed@a... wrote:
> In a message dated 7/1/2004 11:27:47 AM Eastern Daylight Time,
> honamos@y... writes: > > I have 2 serial ports on my 18F458, but the problem is that I
need
> > 3. Is there anyway I can multiplex 2 lines into one of the ones
on
> > the PIC?
> >
>
> Why do you need three? Are you sending data to 3 different
places? If so,
> you can use an "address" with one of your two lines so it will
be received by
> a specific receiver. For instance:
>
> serout pin, baud, ["A", data]
>
> then serin pin, baud, [wait("A"), data]
>
> Sid




In a message dated 7/1/2004 12:03:53 PM Eastern Daylight Time, h...@yahoo.com writes:


I am sending/receiving data to 3 different places.  How can I use
the address feature with CCS C Compiler?


I don't know anything about C compilers, but I use this system to send data to 12 different places using a single serout line.  Look at the "Wait" command - that's the one that will let you "address"  a specific destination.

Sid



I did this with an 18F242, 1 UART and 2 destinations. I used MAX323
switches to switch between the 2 targets. Each target port had a '323
on it to turn it on or off. The PIC made sure only one was selected
at a time. A custom handshaking scheme was required, but otherwise it
worked.

--Joe Jansen

On Thu, 01 Jul 2004 15:24:33 -0000, <> wrote:
>
> I have 2 serial ports on my 18F458, but the problem is that I need
> 3. Is there anyway I can multiplex 2 lines into one of the ones on
> the PIC?
>
> Thanks. > to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
> Yahoo! Groups Links



How did you wire it? The OP did not specify whether he was using
RS-232, RS-485, or what. I assume that you had 485/422, since RS-232
is a point to point protocol. Yes, I realize that there are hacks out
there that have been used, but it becomes incumbent on each of the
'client' devices to implement the addressing scheme.

--Joe Jansen
----- Original Message -----
From: <>
Date: Thu, 1 Jul 2004 12:14:36 EDT
Subject: Re: [piclist] Re: Serial Multiplexing
To:

In a message dated 7/1/2004 12:03:53 PM Eastern Daylight Time,
writes:
I am sending/receiving data to 3 different places. How can I use

the address feature with CCS C Compiler? I don't know anything about C compilers, but I use this system to send
data to 12 different places using a single serout line. Look at the
"Wait" command - that's the one that will let you "address" a
specific destination.
Sid

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

________________________________

Yahoo! Groups Links
To



In a message dated 7/1/2004 12:23:41 PM Eastern Daylight Time, j...@gmail.com writes:


How did you wire it?  The OP did not specify whether he was using
RS-232, RS-485, or what.  I assume that you had 485/422, since RS-232
is a point to point protocol.  Yes, I realize that there are hacks out
there that have been used, but it becomes incumbent on each of the
'client' devices to implement the addressing scheme.


Point to point with a 220 ohm resistor in series.

Sid