Tech Support > Computer Hardware > Microprocessors > 8051 and RS485 how to
8051 and RS485 how to
Posted by rajeshbij@gmail.com on November 17th, 2007


I want to communicate with 10-15 micro controllers from the host micro
controller. Each node(independent micro controller) may be around 500
meters distant from the host. The no. of micro controllers and the
distance may increase. I feel I should use RS485.

Anybody, please let me know what should be done for RS485 ? I am OK
with RS232. Please help, Thanks !!

rajeshbij@gmail.com

Posted by Martin Griffith on November 17th, 2007


On Sat, 17 Nov 2007 02:31:47 -0800 (PST), in comp.arch.embedded
"rajeshbij@gmail.com" <rajeshbij@gmail.com> wrote:

port pin to select whether you are sending or receiving.
Normally the 8051 would be in receive mode.

Or are you asking what sort of protocol to use?

google 8051 rs485 multi-drop is helpful


Martin

Posted by DJ on November 17th, 2007



Some of 51's have also SPI interface which might be ok for that
application. If you need 485 you need 485 line driver and extra pin for
direction control. Anyway you need to develop some kind of protocol or
get one from the net.

If you do the hardware as well remember to put place for RS232 so you
can solder either 232 or 485 (or both) - that will help with protocol
debugging so you can send your data to PC terminal or display debug info.

DJ

Posted by TT_Man on November 17th, 2007



<rajeshbij@gmail.com> wrote in message
news:19f9a08f-9e26-4bc7-8fc7-827b6b25867b@e6g2000prf.googlegroups.com...
addressing but that's a pain IMO.)
Define a packet structure for each direction. If you can, chose a return
packet structure of n-1 where n= the number of packets sent from the PC to
each micro.
On address match, each micro will send it's return packet, enabling its own
485 transmitter.
The PC 485 will have its own TX and Rx chips always enabled.
The Micros will have their Rxs always enabled.
You shouldn't use a star network unless the baud rate is very low.
Single chain is best, using cat5 as the link cable, using the std wiring
configuration pairs for Rx and Tx.
Terminate at the PC and the LAST micro with 120 ohms across Rx and Tx.
The spec for RS485 and full speed is 4,000 ft(1300 M) so your design exceeds
the specs.
So for it to work, you will need to do one of 2 things.
Either drop your baud rate right down ( 19,200?) OR have a dedicated 485
transmitter/receiver for each node.......



Posted by cbarn24050@aol.com on November 17th, 2007


On Nov 17, 10:31�am, "rajesh...@gmail.com" <rajesh...@gmail.com>
wrote:
There are several approaches, just depends on details you haven't
provided. A full description of the layout and coms requirment are
needed.

Posted by karthikbalaguru on November 19th, 2007


On Nov 17, 3:31 pm, "rajesh...@gmail.com" <rajesh...@gmail.com> wrote:
If you have wireless support (RF LOS) Line-Of-Sight, you can go
wireless.

If you are going for only RS485, then you need to device a protocol
for identification and communication among the controllers.
And, Importantly, the RS485 driver.
You can implement the communication logic similar to I2C or SPI
protocol.

You can try CAN also.
With CAN, Bit rates up to 1 Mbit/s can be acheived for network length
less than 40 m. Decreasing the bit rate increases the distance
That is, aound 125 kbit/s at 500 m.

Many methods are available and it depends on your requirement
and design.

Karthik Balaguru

Posted by Meindert Sprang on November 19th, 2007


"Martin Griffith" <mart_in_medina@ya___.es> wrote in message
news:4uhtj3d7mskjnkr00710jitl10fdb1spqs@4ax.com...
And make sure the driver is in receive mode by default, before the 8051 is
initialised.

Meindert



Posted by Martin Griffith on November 19th, 2007


On Mon, 19 Nov 2007 15:43:52 +0100, in comp.arch.embedded "Meindert
Sprang" <ms@NOJUNKcustomORSPAMware.nl> wrote:

martin

What I do to electronics is what
Chuck Norris does to acting


Similar Posts