Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

"1-Wire" communication using TI cc1110 and PIC16LF1823

Status
Not open for further replies.

gmorfeus

Junior Member level 1
Joined
Nov 19, 2012
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Croatia
Activity points
1,497
Hi,

I would like to create 1-wire network using cc1110 (from Texas Instruments) as master and PIC16LF1823 as slaves. For now, I was successfully able to communicate over CAT5 cable of length 4.8m only using pull-up resistor on the line and one slave. However, I would like to make the line a little bit longer so I am designing slew rate control. I found **broken link removed** and I think that the design on the master side should be something like that. However, as I am driving the network with 3.6V, shall the MOSFET, capacitor 220pF and 3.3k resistor be changed? How can I exactly calculate the R and C for the slew rate of 0.8V/usec? As the CC1110 can sink only 4mA, the pull-up resistor should be 100Ohm or can it be lowered?
I would like to get 50m distance and 150 slaves.

Thanks and kind regards,
Gabrijel
 

I don't see what wireless transceiver CC1110 has to do with "1-wire" communication?
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
I think this must be a custom "1-Wire" interface and not the Maxim/Dallas one.

If it is, and propagation along the line is causing problems, dropping the slew rate may make it worse. The only remedy would be to slow the signal pace.

Brian.
 

I think this must be a custom "1-Wire" interface and not the Maxim/Dallas one.

If it is, and propagation along the line is causing problems, dropping the slew rate may make it worse. The only remedy would be to slow the signal pace.

Brian.



Hi,

yes, it is custom made "1-wire". I have written supporting functions based on Dallas 1-wire specifications on the cc1110 (master functions) and on the PIC (slave functions). It's bit banging but it works at distance of 4.8m! So, as the timings and all is by specifications, I think that the electric part should be made as on "TUTORIAL 148: Guidelines for Reliable Long Line 1-Wire® Networks" (the link is corrupted in my first post, so I will try to repeat it here: www.maximintegrated.com/app-notes/index.mvp/id/148) of the maximIntegrated.com, "Appendix A. Improved CPU Bus Interface", but I am not sure if the values of the C and R should be as for 5V bus? I am certain that the pullup should be lowered to 100Ohm.
Basically I am trying to control PIC16LF1823 ("1-wire slaves") over RF. So, simply, the network should look like this:
PC(usb)->CC1111(RF)->CC1110(1-wire)->PIC16LF1823

Gabrijel
 

To be honest, I think you would be VERY VERY lucky to achieve what you ask for. "1-Wire" is intended to work over short distances but obviously can be stretched to some degree but the combined capacitive loading of 150 slaves and the cable alone will make it difficult to pass clean uS pulses along it. I do something similar on one job with lots of PIC slaves distributed over more than 100m along CAT-5 but found the only relaible system was RS422 (or RS485). Is it possible to use the "1-wire" line and it's associated ground for differential communication instead?

The problem with ever decreasing pull-up resistor values is you waste more power driving the line (at both ends) and as the master end impedance becomes very low, the far end looks increasingly like an open circuit stub with associated reflection problems. The solution depends very much upon the topography of the network but you might find a high value pull-up at each slave works better than a single pull-up at one end. For example, if you assume 100 Ohms is optimum overall, use 100 * 150 = 15K at each slave, at least it gives some degree of damping against reflections.

Brian.
 

Hi,

hm, now I am a little bit confused while I found that 1-wire can work on 650m and theoretically unlimited number of slaves on the bus while RS422 supports maximum of 10 devices? (source: wikipedia).
Also, looking at the specifications of PIC16LF1823 and CC1110, both have EUSART. Is it possible to crossover the connection of RX and TX (TX on CC side connect to RX on the PIC side and vice-versa) to get RS422? I still don't understand why there would be limit to only 10 devices:?:
Thanks.

Gabrijel
 

Maximal 10 nodes is a worst case specification achieved by all transceivers. You'll find RS-422/485 interfaces with higher fan-out and fan-in, for 256 and more nodes at low and medium baud rates.
 

I should have stated my system uses four wires, two outgoing RS422 and two incoming RS422 to achieve high speed over long distances. RS485 will let you do it on two wires but is a little more complicated to avoid collisions.
As FvM states, 10 receivers is a worst case scenario and over the longest distances, I have used it in much bigger networks over several hundred metres. It is also far less prone to EMI problems than long "1-Wire" interfaces.

The only caveat is to to ensure a default state occurs on the lines when nothing is driving them. A resistor from one wire to ground and the other to 5V with a terminator between them is essential. As long as more than 0.2V (from memory) exists between the wires in idle state it should be OK.

"1-Wire" just isn't up to it beyond short reach and light loads.

Brian.
 

Thanks to all. I would like to ask some additional questions and I hope that they won't sound stupid:-/ (I know electronics is theory but was never so involved in practice and would like to learn.)
So, may I use EUSART on PIC and CC to interconnect them? Can even RS485 or RS422 be achieved using USART (so this question I am asking, can be totally wrong:-/)? Are there any additional circuitry needed beside wires (pull-ups, pull-downs, termination? If yes, how and what values to use?)? Thanks.

Gabrijel
 

Yes you can, and it's very easy to do.

Bear in mind you still have the option to do "1-Wire" if you are prepared to forget the standards and drop the speed down. It's only the fact that the official 1-Wire standard specifies how long each pulse must last, and that those timings can't be met on a long cable that are the issue. If you slow it down to give time for the signal to propagate it will still work but of course not be compatible with other 1-Wire products.

Firstly, RS422 and RS485 are not protocols, they are electrical specifications for sending data down wires. The format of the data is still your choice. They are very similar, the primary difference being that RS422 is a one-way system so two links are needed to provide a return data path and RS485 "time-shares" on the same wires. Both are differential systems and can withstand a reasonable (a few volts) difference in ground potential at each end because the polarity and difference in voltage across the wires is used to carry the bits rather than an absolute potential above ground. The other benefit to differential transmissions is that because the bit transistions cross over simultaneously on twisted wires, the net electromagnetic radiation is reduced and similarly, signals picked up on both wires simultaneously are cancelled out. this makes them far less prone to radiating or picking up interference, something you have to consider on long cable runs.

Both systems are driven directly from the EUSART and feed incoming data directly to the EUSART. Many devices are available to convert standard logic levels to the RS422/485 levels. I use ADM488 and ADM489 devices by preference but many manufacturers produce theit own versions. Note that only one transmitter can drive a line at a time so you have to manage the "transmit enable" signals in your software. Usualy this is nothing more than a line of code to enable the transmitter at the start of your data and the same at the end to disable it again. The only other thing you need is a terminating resistor across the wires, preferably at the far end of the lines and a pair of steering resistors to maintain a small voltage across the lines when no transmitter is driving. If you don't fit the steering resistors, when no transmitters are enabled, there is a risk of the voltage across the lines falling in "no mans land" and random noise coming out of the receivers.

Look up the data sheets for those devices and you will see it's easy to do.

Brian.
 

Hi,

Brian, thank you very very very much! You gave me exactly the information I needed. Thanks one again. I will give a try to the 1-wire and test the RS485. As all this is learning, I think this is the best I can do for myself and learn something;)

Kind regards,
Gabrijel
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top