Searching \ for ' [PIC] RS232 BUS ?' 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=rs232
Search entire site for: 'RS232 BUS ?'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] RS232 BUS ?'
2001\07\02@153620 by Patrick J

flavicon
face
Hi, I am investigating the possibillity to have 4 PIC 16F877 connected
to the same PC on a RS232 'bus'.
I am using MAX220CPE, can they be connected in parallell or will they go
up in flames ?

/PJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\07\02@172137 by Byron A Jeff

face picon face
On Mon, Jul 02, 2001 at 09:37:19PM +0200, Patrick J wrote:
> Hi, I am investigating the possibillity to have 4 PIC 16F877 connected
> to the same PC on a RS232 'bus'.
> I am using MAX220CPE, can they be connected in parallell or will they go
> up in flames ?

Yes. RS-232 is point to point. If you want a bus configuration you should
take a look at RS-485.

If you really want RS-232, instead of using a bus configuration, instead
wire in a ring. So instead of:

  +------------+-------------+------------+----------------+ <- RS232
  |            |             |            |                |
-------      -------       -------      -------         -------
| PC  |      |Node1|       |Node2|      |Node3|         |Node4|
-------      -------       -------      -------         -------

Do this:

-------      -------       -------      -------         -------
| PC  |----->|Node1|------>|Node2|----->|Node3|-------->|Node4|--v
-------      -------       -------      -------         -------  |
 ^                                                              |
 +--------------------------------------------------------------+

Where the PC talks to Node 1, Node 1 to Node 2, and so forth.

It will be slower than the bus, but works with the technology.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\07\02@173427 by Douglas Butler

flavicon
face
part 1 2176 bytes content-type:text/plain; charset="us-ascii" (decoded 7bit)

If you want to copy a "standard" way of doing this look at how
Paroscientific uses multiple RS232 sensors in a single sensor loop.  I
have attached a link to one of their manuals.  If you cant get it, go to
http://www.paroscientific.com and look for the manual for digiquartz sensors.

Sherpa Doug

> {Original Message removed}
part 2 146 bytes content-type: application/octet-stream; name="Digiquartz (decode)

part 3 144 bytes
--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\07\02@175419 by Bob Ammerman

picon face
If all of the following are true:

- The PC is going to act as a master

- The F877's will only speak when spoken to

- The F877's are physically  close to each other (ideally sharing the same
power supply).

Then there is a low-cost simple way to be your network...

Take the TD signal from the PC and route it thru the RS232 to TTL channel of
the MAX220 to the RD signals of all four PICS.

Connect a signal diode (IN4148 is fine) from the TD pin of each of the PICs
to the TTL to RS232 channel of the MAX220. The cathode of the diode should
be connected to the PIC pin.

Connect a 10k resistor from the junction of all the diodes with the MAX220
pin to the positive supply rail.

Connect the output of the TTL to RS232 channel of the MAX220 to the PC.

All the F877's will be able to 'hear' the PC.

The PC will be able to 'hear' any F877.

As long as only one F877 at a time 'talks' everything will be well.

If more than one F877 tries to talk at the same time the PC will get garbled
data, but no hardware damage will be done.


Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\07\03@133658 by Harold M Hallikainen

picon face
       You can also do a cheap short distance serial bus using TTL levels right
out of the PIC. In a dental product, I have a couple PICs in the desktop
unit, then another in the handheld unit. The handheld device does two way
communications with the desktop using three wires (+5V, ground, data). At
each end, the data line goes through a current limit resistor to the
receive input of the PIC. A diode is between the transmit pin of the PIC
and the receive pin such that the transmit pin can pull the receive pin
down, but not up. A pull-up resistor is in the desktop unit from the data
line to +5V. The current limit resistor is small enough so we do not get
significant drop across it during normal operation. Communications is
packet based, with each end having an address. This way each end knows to
ignore data that it has sent and only receive data from the other end.
This is a polled system where the desktop sends a packet and the handheld
unit responds with a packet. The handheld unit is receiving two data
bytes (representing two digits on a 7 segment display - one bit is one
segment). The handheld unit transmits one byte representing the state of
two push button switches.
       I'm also looking at another application where we'd use ALOHA sharing of
the bus. Here, one unit receives data from several transmitters. Each PIC
drives an opto isolator that has an open collector output. These are all
tied together with a pull-up resistor at the receiver. Each transmitter
randomly transmits its data. Due to the short data burst and the long
period of time between transmissions, we assume the bus is available
(similifying hardware). If we miss a packet now and then due to
contention, no harm is done. The lack of a receiver on the transmit units
simplifies the hardware since we need the opto isolation for the
transmitting units.

Harold


On Mon, 2 Jul 2001 17:21:09 -0400 Byron A Jeff <spam_OUTbyronTakeThisOuTspamCC.GATECH.EDU>
writes:
{Quote hidden}

FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

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


2001\07\04@083137 by Patrick J

flavicon
face
Yes, this was also suggested by Bob Ammerman and it sounds just like the way
to go for my purpose: 4 sensors connected to 4 PICs so parameters can be
adjusted aut. by the PC. Actual output from the sensors wont go through
RS232 since they must be read in sync and responstime is an issue.

I have also looked into RS485 as Byron refered to in his reply. I am not sure
how that works, but I found some RS485 tranciver ICs. Speed is 250kbps
to 4mbps.

Does 485 use some special protocol, or can I just the TX/RX from the PIC
to the 485 tranciver ?
PIC1 <-> RS485 tranciver <==== 485 BUS ====> <- RS485 tranciver <-> PIC2

/PJ

From: "Harold M Hallikainen
>         You can also do a cheap short distance serial bus using TTL levels
right
> out of the PIC. In a dental product, I have a couple PICs in the desktop
[snip]

> > Hi, I am investigating the possibillity to have 4 PIC 16F877
> > connected to the same PC on a RS232 'bus'.
[snip]

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


2001\07\04@151337 by Byron A Jeff

face picon face
On Wed, Jul 04, 2001 at 07:46:37AM +0200, Patrick J wrote:
> Yes, this was also suggested by Bob Ammerman and it sounds just like the way
> to go for my purpose: 4 sensors connected to 4 PICs so parameters can be
> adjusted aut. by the PC. Actual output from the sensors wont go through
> RS232 since they must be read in sync and responstime is an issue.

Well as Bob pointed out, as long as the parts are in close proximity, that
wire-or TTL can do the job.

>
> I have also looked into RS485 as Byron refered to in his reply. I am not sure
> how that works, but I found some RS485 tranciver ICs. Speed is 250kbps
> to 4mbps.

Don't worry about the speed. The real bottom line of RS-485 is the fact
that it's true multistation. Up to 32 nodes can be connected to the same
pair of lines.

>
> Does 485 use some special protocol, or can I just the TX/RX from the PIC
> to the 485 tranciver ?
> PIC1 <-> RS485 tranciver <==== 485 BUS ====> <- RS485 tranciver <-> PIC2

Exactly as you describe. The only catch is that only one transmitter can
be selected at a time. This has a couple of hardware and software implications:

Hardware: Each node, including the PC, must have a way to select the direction
of the transceiver. For the PICs it's fairly simple: use another I/O pin for
direction control. However for PC's it's a bit tougher. The easiest way to
do it is to have a one-shot that selects transmit whenever the TX goes low and
times out after two character times or so. So transmit is selected as long
as you're transmitting characters, then it automatically reverts to receive
once transmit ends.

Software: Add code to select the direction. Start in receive, wait until the
PC talks to you then transmit. That's the basic protocol.

BAJ
{Quote hidden}

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


2001\07\06@132433 by Harold M Hallikainen

picon face
On Wed, 4 Jul 2001 07:46:37 +0200 Patrick J <EraseMEinfospam_OUTspamTakeThisOuTDATECH.SE> writes:
{Quote hidden}

       The EIA485 transceivers just handle the electrical part of the job. It's
your job to figure out a protocol. You have to drive the enable pin on
each transmitter at the appropriate time so you don't get contention on
the bus. The simplest method is using polling. Have a master unit poll
each slave unit. The slaves transmit only when asked. I also use slew
rate limited chips (like the MAX488). These help reduce transmission line
reflections. You also need to use cable with the appropriate
characteristic impedance (typically 110 ohms) and terminate each end of
the cable. The Maxim datasheets have lots of good info on this.
       For short low speed runs, though, I'd just do an "open collector bus."

Harold

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

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


2001\07\11@145011 by uter van ooijen & floortje hanneman

picon face
> Hi, I am investigating the possibillity to have 4 PIC 16F877 connected
> to the same PC on a RS232 'bus'.
> I am using MAX220CPE, can they be connected in parallell or will they go
> up in flames ?

The only 'official' way to do this (assuming you want the PC to talk to the
PICs and the PICs to the PC, not PICs to PICs) is to daisy chain the
devices: Downstreams from the PC each devices converts the V24 to TTL (to
feed the PIC) and the TTL back to V24 (to feed the next device). Upstreams
each device converst what it receives from the previous device to TTL, adds
(or substracts, check the polarity) its own signal, and converts it to V24
again for the next device or the PC. When I have the time I'll modify
WISP/Wbus to use this principle, seem the current Wisp/Wbus for a cheaper
but much less reliable way to chain V24 devices.

Wouter

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


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