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.

Mutiple 7 segment in long range

Status
Not open for further replies.

neroburn

Junior Member level 1
Joined
Jan 24, 2008
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
neroburn

Hello all,

How could I implement mutiple display using PIC. The Display got 1 master and 5 slave. If we number display in master, the slave should be same number. the problem how to make if the range of between display is long. and I want to minimize the wiring and port using. Please help me...
 

neroburn said:
Hello all,
How could I implement mutiple display using PIC. The Display got 1 master and 5 slave. If we number display in master, the slave should be same number. the problem how to make if the range of between display is long. and I want to minimize the wiring and port using. Please help me...
It primely depends on the range between the master and the slave units which is not specified in the original post. If the distance is less than 100 meters, you may use TLP433 Rf transmitters and receievers which will communicate wirelessly, or you may use three wires with RS232 communication. If the distance is more than 500 meters, you may opt RS485 which will communicate with just two wires for more than a kilometer. Good luck
 

so, If I want to use the I2C protocol to control each of disply...Is the signal enough to transmit the data? If not, how do I design such that all the MCU got the signal..This scenario I use a MCU for each disply. 1 Master 5 slave. for distance about 100metres
 

I2C is not really for long range, it will cause you problems if you try more than a few metres.

Pranam77 is right, most microcontrollers have serial ports (UARTs) and all you have to do is link them. You could either daisy chain them, (A feeds B, B feeds C, C feeds D etc.) or you could use a common bus to feed them all.

Personally, I would opt for RS422 which uses the same hardware as RS485 but it would appear your application is only feeding information outbound to the slave displays so the complications of RS485 data collisions are irrelevant.

RS422 and 485 are both rated to 4000 feet (about 1.25km) so you have plenty of safety margin if you use them. I use RS422 and cheap CAT-5 cable over distances of several hundred metres with no problems.

Brian.
 

betwixt:
You said chain them...So this mean we need to two usart module at same time..I'm I right?
 

No.


UARTs have a receive input and a transmit output. all you need to do is pick up the byte from the receiver and pass it to the transmitter so it is available to the next module down the line. You also use the byte for updating the current module of course!

Like this:

<master TX> ---- <module A RX.....module A TX> ---- <module B RX.....module B TX> ---

if that makes sense.

Brian.
 

Hai

The best solution is wireless communication.

As all the 5 slaves share the same data, one transmitter and 5 receiver would do the job.

You can use uart for communication with lower baud rates

Regards
Nandhu
 

Brian:
Ok ..I got your point..What Actually I worried is I use the phone line as my medium for connectivity between PIC...So just using simple UART can get this job done.It is right?
I read an article, they use the RS422 0r 485? So how this protocol can be implement if just use 18f452. Is it got this module built inside?
 

You may be able to use telephone cable but normally the wires run straight and parallel to each other. It is better to use twisted wires as these give better noise immunity and radiate less interference.

The UART in the 18F452 is perfectly OK to produce and receive the data but it only gives you a signal between ground and VDD (5V?) and can supply very little current. The load capacitance of the cable will make it difficult for the chip to drive it unless your data speed is very low. The idea of RS422 is that you take the signal from the PICs TX pin and feed it into an RS422 driver IC, I use type ADM488 but there are lots of different types on the market. This chip converts the signal into two outputs, identical but one is inverted, one is not. These go down the cable to another chip on the next module which converts the two signals back into one again, ready to go to the PIC RX pin on that module. The ADM488 and similar chips have one transmitter (convert to RS422) and one receiver (convert RS422 back to TTL level) in the same 8-pin package.

RS422 gives two main advantages:
1. because the two signals are equal but opposite, the combined magnetic fields they produce will cancel out which means less interference is radiated.
2. the receiver inverts one signal and adds it to the other. This means any interference picked up along the wires, which will be equal on both wires, is cancelled out. In other words, common mode noise is eliminated.

That gives you the reason why twisted wires work better. The closer they are together, the more likely they are to share the same magnetic fields so the cancellation effect is more complete.

Brian.
 

    neroburn

    Points: 2
    Helpful Answer Positive Rating
betwixt:
So this one can drive 5 Slave at simultaneously, right?
No need amplfication...??
 

I(f you use RS422 you should be able to just link the same two data wires and ground between units. Check with the RS422 driver data sheet as it may vary between manufacturers but the ADM488 can drive 32 loads over 4,000 feet (about 1.25Km).

If you daisy chain them you get that distance between modules and in theory you can keep chaining them forever. the only downside is a short delay as the data is transferred into the UART receive register and back out through the transmit register. The delay will accumulate as you add more modules but if you use a fast data rate and your processor is clocked fairly quickly, the delay wouldn't be noticed until many units were chained.

Incidentally, you used the word 'amplification', which is not the issue here. Although there is some signal loss along the cables, the reason for using RS422 is not to boost its amplitude, its to keep the rising and falling edges of the 1's and 0's as clean as possible. As the cable length is increased, the edges become more rounded and the time at which the receiver decides if the voltage is high enough to be a '1' and low enough to be a '0' starts to shift. This results in the bits looking out of position and eventually they reach the point where the data can't be accurately recovered. The sloping edges also cause problems because near to the cross over point between 0 and 1 voltage there is highest risk of noise causing a false bit to appear. Using differential signal and proper transmit and receive circuits like those in RS422 ICs will greatly reduce these risks.

Brian.
 

So if I twisted the telphone line wire, it's the same result?
 

It might help, you will probably find the telephone wires will work even if they are not twisted.

Look at CAT-5 network cable to see how the twisting should be. The whole idea is that by twisting them they always be close together and both wires will pick up the same interference. If they carry the same interference (noise) and you invert one of the signals at the receiver, then add them together, you get twice the wanted signal (remember that the transmitter already inverted one of the wires) and cancellation of the unwanted signal. If the wires are subjected to different amounts of interference, the cancellation will be less effective.

Brian.
 

So the RS422 is a hardware interface..the code inside MCU just same like standard UART?
 

Yes, sorry if I didn't make that clear.

All the UART code does is receive and transmit exactly as normal. The RS422 is just a method of safely transporting the data over long distances.

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top