PDA

View Full Version : n° of serial receiver



microuser
- 26th August 2005, 09:04
Hi!

How many receivers can I connect on the same serial line?
I have a 16f628a as transmitter and I have to receive serial data on 25rx (pic 16f648a)

Is this possible without a signal amplifier?

NavMicroSystems
- 26th August 2005, 11:31
Due to the high sink/source current of the PICs Outputs (25mA)
and the high impedance of it's inputs this shouldn't be a problem.

microuser
- 26th August 2005, 18:31
Now I can try to build the entire system!

Very thanks!

microuser
- 7th November 2005, 21:15
Ok, now I have a little problem!
I have tested the system with three tx and ten rx, and it works! but now I have five tx(16f648a) and ten rx(16f648a) on the same serial line. Each transmitter have a 1k resistor on the tx pin. I use serout2 and serin2 command. Now I think I have a signal problem because any rx doesn't receive the signal! I check it with a scope and I can see that for every tx that I add to the system the signal go down of little.
How can I do for make all work? Help me please!

thanks in advance!

keithdoxey
- 7th November 2005, 22:43
Ok, now I have a little problem!
I have tested the system with three tx and ten rx, and it works! but now I have five tx(16f648a) and ten rx(16f648a) on the same serial line. Each transmitter have a 1k resistor on the tx pin. I use serout2 and serin2 command. Now I think I have a signal problem because any rx doesn't receive the signal! I check it with a scope and I can see that for every tx that I add to the system the signal go down of little.
How can I do for make all work? Help me please!

thanks in advance!

If your transmitters are at different logic levels then the combination of resistors will attenuate the level on your data line and you will get indeterminate logic levels.

If the pins normally idle high then tie your data line high with a pullup resistor and use a diode from each transmitter pin to pull the line down when active.

If the line is normally idle low then use a pull down resistor, flip the diodes the other way and then the active transmitter can drive the data line.

The diodes will "OR" the signals together thereby avoiding shorting out any PICs and provided only one transmitter is sending at any one time it should work fine.

DISCLAIMER: I havent actually tried this but it is how I am planning to do a similar application!!!

Someone please stop me in advance if there is a better way of doing this :)

Regards

BobK
- 8th November 2005, 02:46
Hello,

I have built to separate alarm monitoring systems this summer . One system has 20-16F74's talking to an 18F452. The other system operates the same and has 20 16F872's talking to a 16F877A. The serial lines on the 20 boards of each system have a 1K resistor on each board. NO PULLUPS on the senders! THIS IS IMPORTANT! The boards are all programmed as inputs normally and use the SEROUT2 command to send data. As soon as they are done sending the data, the command TRISA.#=1 is given to return the pin to an input state. The receivers (18F452 and 16F877A) have a 1K resistor inline with the input pin and a 100K resistor for a pullup. I did much hair pulling before writing to Stephen Collins (author of SIXPICS.BAS on MELABS site) for help. He sent me in the right direction. It took several days to get things straight but my systems have been working great since then. I have had to set up my "senders" to send the message 3 times with a 10ms pause between each one to eliminate missing and signals. I also have a "busy" line between all boards. The senders put the line to low to let the receiver know data is forth coming and go back to high when done. The receiver puts the line low and holds it there until an operator acknowledges receiving the alarm signal. Each sender sits in a loop waiting for the busy line to go high should any additional alarms get triggered while they are processing the previous alarm.

Hope this helps you out. Let me know if I can be of further assistance.

BobK

BobK
- 8th November 2005, 03:18
Tried to attach a drawing but it's 866kb. If you are interested in it email me at [email protected] and I'll send it to you that way.

BobK

microuser
- 8th November 2005, 12:16
Thanks you all friends! now I can try some ways to solve my problem! I will say the outcome soon.