Searching \ for '[PIC]: Simple (but not perfect) data collision avo' 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/memory.htm?key=data
Search entire site for: 'Simple (but not perfect) data collision avo'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Simple (but not perfect) data collision avo'
2002\02\13@200409 by Edson Brusque

face
flavicon
face
Hello PICple,

   as I'm doing communication between various devices in an half-duplex
RS485 network, I'm thinking in a way to avoid data collision.

   As I'm using the hardware USART of the PICs, the big danger is that
while the PIC is receiving a data on the serial input, the software pull
down the DRS (drive/receive select) line on the 75176 (driver) and put
something on TXREG. It will do this because there's no way to know that
there's an incoming byte on the RX pin until the byte is completely
received. The RCIF Flag is set only when the byte have completely arrived on
the RX pin.

   So, I think that I could tie the RX pin to the RB0/INT pin, so that when
an start bit arrives at the RX pin, pulling it LOW, an interrupt is
generated. In this interrupt I set a bit variable (BUS_BUSY) to inhibit
serial output. When I receive an RCIF interrupt, I reset BUS_BUSY, so the
serial output routine could know it can send the data.

   If the RB0 pin isn't available, we would pull the RX pin for about the
duration of 10 bits to have confidence that we could start sending data.

   Is this an standard way to implement data collision? Would this be
reliable? What do you think.

   Best regards,

   Brusque

-----------------------------------
Edson Brusque
Research and Development
C.I.Tronics Lighting Designers Ltda
Blumenau  -  SC  -  Brazil
http://www.citronics.com.br
Say NO to HTML mail
-----------------------------------

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


2002\02\13@202800 by Barry Michels

flavicon
face
The Optomux protocol avoids collisions by using a master that talks to 1
slave at a time or global broadcasts to all slaves, like time sync.  No
slave can take the bus unless the master tells it to.  If the slave fails to
respond within 200ms, that permission is revoked and the master will give it
to the next slave.

Several devices use variations of this protocol.  Johnson Controls' N2 bus,
for example.

http://www.opto22.com/Datasheets/0203_Optomux_Protocol_Manual.pdf


Barry

{Original Message removed}

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