Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | 8051 and RS485 how to

There are 8 messages in this thread.

You are currently looking at messages 0 to 8.

8051 and RS485 how to - rajeshbij@gmail.com - 05:31 17-11-07

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

r...@gmail.com



Re: 8051 and RS485 how to - Martin Griffith - 05:57 17-11-07

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

>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 !!
>
>r...@gmail.com
You need a line driver, say LT1785, tie the RE1,DE1 together and use a
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

Re: 8051 and RS485 how to - DJ - 06:22 17-11-07

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

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

Re: 8051 and RS485 how to - TT_Man - 10:43 17-11-07

<r...@gmail.com> wrote in message 
news:1...@e6g2000prf.googlegroups.com...
>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 !!
>
> r...@gmail.com
Each of the 15 micros must have a unique address.( you could use 9 bit 
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....... 



Re: 8051 and RS485 how to - 11:57 17-11-07

On Nov 17, 10:31=EF=BF=BDam, "rajesh...@gmail.com" <rajesh...@gmail.com>
wrote:
> 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 !!
>
> rajesh...@gmail.com

There are several approaches, just depends on details you haven't
provided. A full description of the layout and coms requirment are
needed.

Re: 8051 and RS485 how to - karthikbalaguru - 05:54 19-11-07

On Nov 17, 3:31 pm, "rajesh...@gmail.com" <rajesh...@gmail.com> wrote:
> 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 !!
>

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

Re: 8051 and RS485 how to - Meindert Sprang - 09:43 19-11-07

"Martin Griffith" <mart_in_medina@ya___.es> wrote in message
news:4...@4ax.com...
> You need a line driver, say LT1785, tie the RE1,DE1 together and use a
> port pin to select whether you are sending or receiving.
> Normally the 8051 would be in receive mode.

And make sure the driver is in receive mode by default, before the 8051 is
initialised.

Meindert



Re: 8051 and RS485 how to - Martin Griffith - 10:52 19-11-07

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

>"Martin Griffith" <mart_in_medina@ya___.es> wrote in message
>news:4...@4ax.com...
>> You need a line driver, say LT1785, tie the RE1,DE1 together and use a
>> port pin to select whether you are sending or receiving.
>> Normally the 8051 would be in receive mode.
>
>And make sure the driver is in receive mode by default, before the 8051 is
>initialised.
>
>Meindert
>
Good point!
martin

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