Searching \ for '[PIC]:Communication on a single line' 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/devices.htm?key=pic
Search entire site for: 'Communication on a single line'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Communication on a single line'
2002\12\03@222240 by Pang

flavicon
face
Hi all,

I need to implement a single wire communication between two modules with uC.
What are the options available ? The data transfered at any one time is just
a High or Low. Since the data transfered is just one state ( high or low ),
I was thinking of writing a simple transmission that uses the transmit with
acknowledgement way. And when both module transmit at the same time, neither
will receive any acknowledgement and as such will retransmit after a delay
time. Is this sufficient?

Thanks.

Rgds,
pang

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


2002\12\04@004121 by ards, Justin P

flavicon
face
Hi Pang,

Using only a single line (plus ground or common) you can come up with a variety of your own protocols.

The way I see it the 2 modules that you want to be able to connect would set their respective comm. lines to input while not transmitting.

All 3 devices have a 'unique' address. Then listen for their address and respond with a ACK. (if you need all way comms)

For TX set the module's line to output then  transmit address, set back to input wait for ACK then send data, then set back to input to receive the ACK.

Synchronising the three devices will create software overheads but the way a see it you could borrow some of the uart protocols using a single line.  If all modules can sync of a single clock source this will solve some problems.

Collisions will be a problem but using a 'token' or a master that polls will solve this problem.

Others no doubt will have some clever ideas.

Justin

----Original Message-----
From: Pang [spam_OUTklpangTakeThisOuTspamAICM.COM.MY]
Sent: Wednesday, 4 December 2002 11:15
To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
Subject: [PIC]:Communication on a single line


Hi all,

I need to implement a single wire communication between two modules with uC.
What are the options available ? The data transfered at any one time is just
a High or Low. Since the data transfered is just one state ( high or low ),
I was thinking of writing a simple transmission that uses the transmit with
acknowledgement way. And when both module transmit at the same time, neither
will receive any acknowledgement and as such will retransmit after a delay
time. Is this sufficient?

Thanks.

Rgds,
pang

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

--
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


2002\12\04@011156 by Mike Singer

picon face
Pang wrote:

> I need to implement a single wire communication between
>  two modules with uC. The data transfered at any one time
> is just a High or Low. Since the data transfered is just one
< state ( high or low ),...

  Why not use 4 levels (0 - 4 - 8 - 12V) to transmit / receive?
A schematic is rather simple.
  Or usual telephone idea as described in AN854 Connecting
a PICmicro Microcontroller to a Standard Analog Telephone
Line?

  Good Luck,
  Mike.

--
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


2002\12\04@015303 by Bob Axtell

face picon face
Of course when you say one line, you really mean
a SIGNAL and a GND.

The way we've done it is similar to the scheme done
by Dallas' single  pin thermostat. Its very slow, though.

We have also implemented LANC, which is the way
SONY controls its camera remotely. LANC is spiffy
if most data is in one direction and a little goes. In LANC,
the main unit sets all timing, the receiver gives up data when
requested against the timing provided by the main unit. It
is  serial: n,8,1 at 9600 baud.

Search the web for LANC; if you can't find it I'll send you
my specs.



{Original Message removed}

2002\12\04@032105 by Morgan Olsson

flavicon
face
Hej Pang. Tack för ditt meddelande 04:14 2002-12-04 enligt nedan:
>Hi all,
>
>I need to implement a single wire communication between two modules with uC.
>What are the options available ? The data transfered at any one time is just
>a High or Low.

Pure hardware solution:

Module A sets voltage (for example 3 or 5V), and reads current.

Module B reads voltage and sets current (for example 0 or 1 mA).

This is probably more expensive in coponents than semi duplex serial, but faster and dont need a uC.  I guess there are about 12 discrete components here.

/Morgan

--
Morgan Olsson, Kivik, Sweden

--
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


2002\12\04@071814 by Russell McMahon

face
flavicon
face
You can send bidirectionally SIMULTANEOUSLY on a single wire plus ground by
using a "hybrid" as used in all telephones to convert the 2 wire line
signals to and from a receive signal to the earpiece and a transmit signal
from the microphone. Googling on hybrid and telephone will probably give
enough information.

       RM

> I need to implement a single wire communication between two modules with
uC.
> What are the options available ? The data transfered at any one time is
just
> a High or Low. Since the data transfered is just one state ( high or
low ),
> I was thinking of writing a simple transmission that uses the transmit
with
> acknowledgement way. And when both module transmit at the same time,
neither
> will receive any acknowledgement and as such will retransmit after a delay
> time. Is this sufficient?

--
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


2002\12\04@072814 by Ray Gallant

flavicon
face
How far are these apart?  If you do proper CRC, or other form of error
checking, can a simplex line do? {slewrate}

{Original Message removed}

2002\12\04@111931 by Bob Axtell

face picon face
These are very dissimilar.

Any protocol will do, actually, just making suggestions.

--Bob

----- Original Message -----
From: "Ray Gallant" <raygspamKILLspamNB.SYMPATICO.CA>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Wednesday, December 04, 2002 5:25 AM
Subject: [PIC]:Communication on a single line


{Quote hidden}

with
> > uC.
> > > What are the options available ? The data transfered at any one time
is
{Quote hidden}

--
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


2002\12\04@112732 by Ray Gallant

flavicon
face
Please elaborate Bob, or add to your comment.  What's your point?
{slewrate}

----- Original Message -----
From: "Bob Axtell" <RemoveMEbobTakeThisOuTspamEDTEC.COM>
To: <spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU>
Sent: Wednesday, December 04, 2002 12:18 PM
Subject: Re: [PIC]:Communication on a single line


{Quote hidden}

transmit
{Quote hidden}

--
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


2002\12\04@120137 by Michael Rigby-Jones

picon face
> -----Original Message-----
> From: Russell McMahon [SMTP:RemoveMEapptechTakeThisOuTspamspamPARADISE.NET.NZ]
> Sent: Wednesday, December 04, 2002 12:08 PM
> To:   EraseMEPICLISTspamspamspamBeGonemitvma.mit.edu
> Subject:      Re: [PIC]:Communication on a single line
>
> You can send bidirectionally SIMULTANEOUSLY on a single wire plus ground
> by
> using a "hybrid" as used in all telephones to convert the 2 wire line
> signals to and from a receive signal to the earpiece and a transmit signal
> from the microphone. Googling on hybrid and telephone will probably give
> enough information.
>
>         RM
>
Only if you use a modem though.  For direct logic level signaling a hybrid
won't be much use.

Mike

--
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


2002\12\04@121500 by Bob Ammerman

picon face
> Only if you use a modem though.  For direct logic level signaling a hybrid
> won't be much use.


There is of course a sneaky way to do this (kinda like a DC equivalent of a
hybrid):

Imagine a single wire interface that can have 3 voltages on it:

0v    - both sides are currently sending a zero
1v    - one side is sending a one, the other is sending a zero
2v    - both sides are currently sending a zero

At each end of the line...

If we are sending a 0 then we should treat 0v as a 0 and 1v as a 1 (2v is a
fault condition)
If we are sending a 1 then we should treat 1v as a 0 and 2v as a 1 (0v is a
fault condition)

You can get the desired voltages by placing, for example a 1000 ohm resistor
between the signal line and ground. To send a one from a given end you
simply turn on a 1ma current source. The 1ma, when driven through the 1000
ohm resistor, will raise the voltage 1 volt.

Bob Ammerman
RAm Systems

--
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


2002\12\04@124525 by Dave Tweed

face
flavicon
face
Michael Rigby-Jones <RemoveMEmrjonesKILLspamspamBOOKHAM.COM>
> Russell McMahon [SMTP:apptechSTOPspamspamspam_OUTPARADISE.NET.NZ] wrote:
> > You can send bidirectionally SIMULTANEOUSLY on a single wire plus ground
> > by using a "hybrid" as used in all telephones to convert the 2 wire line
> > signals to and from a receive signal to the earpiece and a transmit signal
> > from the microphone. Googling on hybrid and telephone will probably give
> > enough information.
>
> Only if you use a modem though.  For direct logic level signaling a hybrid
> won't be much use.

Why not? Hybrids work just as well at DC as they do for audio; you just
need a receiver with balanced inputs, like an RS-422 buffer:

   Tx >---+---+                                      +---+---< Tx
  driver  |   |                                      |   |  driver
          R   R                                      R   R
          R   R                                      R   R
          R   R                                      R   R
          |   |                                      |   |
    + <-------+--------------------------------------+-------> +
 Receiver |                                              | Receiver
    - <---+                                              +---> -
          |                                              |
          R                                              R
          R                                              R
          R                                              R
          |                                              |
          V                                              V

All resistors are the same value (e.g., 4700 ohms) and the transmit driver
needs to be a voltage source (low impedance).

If the transmitter switches between, say, 0V and 5V, the opposite receiver
will see a voltage differential of 0V and 2.5V, respectively, while the
local receiver will just see 0V.

For long lines, you'll probably want to use lower resistances and you'll
want to limit the slew rate of the transmitter so that the receiver doesn't
produce glitches on the transistions of the local transmitter.

-- Dave Tweed

--
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


2002\12\04@154645 by Russell McMahon

face
flavicon
face
> > > You can send bidirectionally SIMULTANEOUSLY on a single wire plus
ground
{Quote hidden}

Yes. That's exactly what I meant. In a telephone circuit the "resistor"
driving the line at each end has to be a match to the complex impedance of
the line. In a short distance situation such as here with "DC" levels the
line impedance is swamped by the far end resistor and all that is required
is for the line driving resistors at each end to be equal. (Ideally they
will equal the line impedance and you will get some reflections if they are
not but they won't be noticed in most practical applications)

This method is ENTIRELY feasible and should be carefully considered by the
original poster.
The method works by "knowing" the state of the transmitted signal (here
connected to receiver -ve) and comparing it to the same signal added to the
incoming signal on receiver +ve. The difference is due to the state of the
far end transmitter.

In telephony multiple circuits can in turn be combined with extra hybrids to
form extra "phantom" circuits. You can even combine two phantoms to form
extra phantoms. In telephony these are very unstable as the impedance
matching gets critical, but  for short range DC signalling it should be
quite workable.


       Russell McMahon

--
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


2002\12\04@220310 by Pang

flavicon
face
Hi Ray,

Basically the modules I mention about will be part of a Car Alarm System. As
such, there will be a Main Alarm Module that takes care of main job like
owner identification and some other core functions. The other small
sub-module is for a Angle/Tilt sensor Module. The information passed will be
very basic, something like-
1. The Main module tellling the Submodule to start checking for Tilting (Arm
stage)
2. Submodule informing the Main module if the car is jack up (towing)
3. The Main module telling the Submodule to stop checking. (Disarm stage)

I will used the typical Send and Wait for Acknowledgement method. I think
there shouldn't be much problem with this approach, although I would like to
follow a certain standard. Anyway, I will check out the LANC. Thanks all for
the various suggestion.


Best rgds,
Pang





{Original Message removed}

2002\12\04@231340 by Ray Gallant

flavicon
face
Sounds like a nice project.  I implemented a single I/O comm line to send
data out for logging and status.  It is a spin-off of an arcnet protocol.
Somebody mentioned earlier a token ring approach and I thought that was a
cool suggestion also.  The receiver uses the external interrupt line on it's
pic to receive the sync, node ID, data packet, CRC and other stuff.  It
works like a charm and it's fast.  One version of this comm is simplex. Node
to host only.  HW is one I/O pin and ground.  I have a duplex version also
but it uses 2 I/Os & HW driver and ground with numerous nodes (token pass)
and fairly long distances. No errors for either setup.
Good Luck 2 U.
Best Regards,
{slewrate}

{Original Message removed}

2002\12\05@035203 by Michael Rigby-Jones

picon face
> Michael Rigby-Jones <spamBeGonemrjonesSTOPspamspamEraseMEBOOKHAM.COM>
> > Russell McMahon [SMTP:KILLspamapptechspamBeGonespamPARADISE.NET.NZ] wrote:
> > > You can send bidirectionally SIMULTANEOUSLY on a single wire plus
> ground
> > > by using a "hybrid" as used in all telephones to convert the 2 wire
> line
> > > signals to and from a receive signal to the earpiece and a transmit
> signal
> > > from the microphone. Googling on hybrid and telephone will probably
> give
> > > enough information.
> >
> > Only if you use a modem though.  For direct logic level signaling a
> hybrid
> > won't be much use.
>
> {Original Message removed}

2002\12\05@083205 by Dave Tweed

face
flavicon
face
Michael Rigby-Jones <EraseMEmrjonesspamEraseMEBOOKHAM.COM> wrote:
{Quote hidden}

No. A hybrid is just a bridge circuit, with one arm of the bridge replaced
by the line and the termination at the far end. The transmit signal is
applied to two opposite corners of the bridge and the receive signal is
taken from the other two corners.

In order to provide the tx/rx isolation, the bridge must be balanced, which
in the example above, means that the lower resistor on each side must match
the impedance of the line/far end combination. For DC and short lines, a
simple resistor suffices. At audio frequencies and with the long unshielded
twisted pairs used in telephony, a more complex matching impedance is
required.

Transformers are used only because it's the easiest way (and the only
passive way) to get a balanced drive and/or receive signal -- the transmit
driver and receiver cannot share a ground. In order to mass produce phones
that were dirt cheap, yet simple and reliable, the phone company figured
out how to use a multi-winding transformer to provide the both the
isolation and the balanced/unbalanced conversion in both directions,
usually with a single resistor and capacitor to provide the line matching.
As you say, modern electronic phones use active electronics to achieve the
same things.

As always, the theory is simple, but the practical implementations can get
complicated.

-- Dave Tweed

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


2002\12\05@112137 by Bill & Pookie

picon face
This is an interesting application.

Seems like all the data you want will be real time
data and there will not be any logged data.  So
there is no chance of loosing any log messages.
But maybe have a event reported for a long period
of time incase the first message is not received.
The event sets a two minute timer in the sub
module and the sub module starts counting down the
timer.  When the sub module reports, it reports
the event as well the time remaining in the timer.
This would stretch the event out and also indicate
each new event to the same sub module by the state
of the timer.

You mention having the main module signal the sub
module to disarm the stage.  This may not be
necessary.  The main module can just ignore the
alarms from the stages and still monitor them
while you are in control of the car.  This would
also notify you if one of the sub modules stopped
working.

You haven't mentioned how you plan to enter the
car without the alarm going off, not how to exit
car and turn on alarm.  One concept that might be
useful is to have the main module arm itself after
a preset amount of time where there is no activity
in nor on the car.

Bill


{Original Message removed}

2002\12\11@221257 by Pang

flavicon
face
Hi Bill,

Sorry for replying so late. Quite a number of public holidays recently.

I do not fully understand the first paragraph, but I think I can roughly
know the main idea. Anyway, do you still remember a previous thread on the
piclist on "Tilt / Angle Sensor".

I have enquired on the list for the cheapest priority encoder or a
potentiometer(those with a shaft and ball bearing). The main idea is to
construct a Tilt sensor by attaching a weight to the shaft. One piclister
actually suggested using the mechanism inside a typical mouse to construct a
Tilt/Angle sensor as compare to using a typical priority encoder. One of the
reason for not using a priority encoder or a potentiometer(with ball
bearing) was that it is still expensive (of course,much less compare to
accelerometer) and they are not meant to take any sort of weight on the
shaft.

So back to submodule and main module. When the car is not stationary (
moving around), the main module will ignore whatever data that is send by
the tilt sensor submodule. Only when the car is armed, the main module will
constantly check for a signal from the submodule to show that the car is
jack up. There will be a 2 minute delay before the actual reading by the
main module to allow the tilt sensor to settle down. As for the internal of
the tilt sensor, the controller will assume that the car is stationary after
receiving no changes/minimal changes for a 1 min period. Any changes after
the 1 minute window period will result in the generation of a Low to the
main module by the controller to signify that the car is jacked up. Do you
foresee any problem with this?

In my opinion, the above implementation is kind of less complicated in the
aspect of the communication between the main module and the submodule since
it will be one way, but there will be more work to do at the Tilt sensor
module.

The other method was to send some signals to the submodule to inform that
the car is stationary and armed. All the submodule has to do is to check for
any changes above the level tolerated. In this way, the controller in the
tilt sensor module will not be bothered to constantly searching for the
'stationary level' as a reference. The communication between the modules
will be in the form of send -> acknowledge type.

Thanks.

Rgds,
pang


{Original Message removed}

2002\12\12@111859 by Doug Hewett

flavicon
face
Why is this 'PIC' instead of 'EE' or 'OT', for example?

-----Original Message-----
From: Pang [spamBeGoneklpangspamKILLspamAICM.COM.MY]
Sent: Wednesday, December 11, 2002 7:07 PM
To: .....PICLISTspam_OUTspamMITVMA.MIT.EDU
Subject: Re: [PIC]:Communication on a single line


Hi Bill,

Sorry for replying so late. Quite a number of public holidays recently.

I do not fully understand the first paragraph, but I think I can roughly
know the main idea. Anyway, do you still remember a previous thread on the
piclist on "Tilt / Angle Sensor".

I have enquired on the list for the cheapest priority encoder or a
potentiometer(those with a shaft and ball bearing). The main idea is to
construct a Tilt sensor by attaching a weight to the shaft. One piclister
actually suggested using the mechanism inside a typical mouse to construct a
Tilt/Angle sensor as compare to using a typical priority encoder. One of the
reason for not using a priority encoder or a potentiometer(with ball
bearing) was that it is still expensive (of course,much less compare to
accelerometer) and they are not meant to take any sort of weight on the
shaft.

So back to submodule and main module. When the car is not stationary (
moving around), the main module will ignore whatever data that is send by
the tilt sensor submodule. Only when the car is armed, the main module will
constantly check for a signal from the submodule to show that the car is
jack up. There will be a 2 minute delay before the actual reading by the
main module to allow the tilt sensor to settle down. As for the internal of
the tilt sensor, the controller will assume that the car is stationary after
receiving no changes/minimal changes for a 1 min period. Any changes after
the 1 minute window period will result in the generation of a Low to the
main module by the controller to signify that the car is jacked up. Do you
foresee any problem with this?

In my opinion, the above implementation is kind of less complicated in the
aspect of the communication between the main module and the submodule since
it will be one way, but there will be more work to do at the Tilt sensor
module.

The other method was to send some signals to the submodule to inform that
the car is stationary and armed. All the submodule has to do is to check for
any changes above the level tolerated. In this way, the controller in the
tilt sensor module will not be bothered to constantly searching for the
'stationary level' as a reference. The communication between the modules
will be in the form of send -> acknowledge type.

Thanks.

Rgds,
pang


----- Original Message -----
From: "Bill & Pookie" <>
To: <TakeThisOuTPICLIST.....spamTakeThisOuTMITVMA.MIT.EDU>
Sent: Friday, December 06, 2002 12:19 AM
Subject: Re: [PIC]:Communication on a single line


{Quote hidden}

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

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspamRemoveMEmitvma.mit.edu>

2002\12\12@155039 by Russell McMahon

face
flavicon
face
> Why is this 'PIC' instead of 'EE' or 'OT', for example?

It's certainly not OT. If you had to choose between OT and PIC then PIC
would be closer, but EE would be better.


       RM

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamspamBeGonemitvma.mit.edu>

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