We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, Maybe this is not a question for this forum, but I still give it a try: I would like to have different 8051's (or derivatives) "talking to each other" via a serial protocol. One uC would be a 'master'. The other ones should trigger the master when some info (decoded RC5-signal) is available. Since the different devices will be put quite far from each other (several meters, up to maybe 25 meters each), I think the RS232 protocol is not suitable anymore for this (distance too long). Therefore, I was thinking to use RS485, but I have to be honest: I don't know a lot of this protocol/standard. Can someone tell me where to find useful information about this protocol? Eventually sites where some C source code for the protocol is already available to give it a start? Does Keil have some useful example programs next to the tig amounts of other examples already available? I didn't find anything regarding RS485 myself on the site, but there might be some 'hidden places' with more useful information... Any help would be highly appreciated. Rgds, --Geert
For what it's worth, here's what I know. The primary difference between RS-232/422/485 is mainly the hardware used to generate the signal on the wires that connect various devices. For RS-232, that's typically a MAX232. RS-232 is single-ended and does not work well over long distances. RS-485 is differential (2 wires, + and -) and is better suited to handle noise. From the 8051 perspective, you still program the on-chip UART as normal. The big difference happens when you have multiple devices on the "bus". Then, you must handle some kind of protocol to communication between nodes. In fact, once you have more than 2 devices connected, you have created a network. At this point, I think there are a lot of things you should consider. Here are a few:
Thanks for the info! --Geert
Review the 9-Bit Serial data mode for most 80C51 family. With the ninth bit you can build a simple protocol checking the ninth bit to define an address byte. Working with a single master and multi units on a bus, the RS485 driver devices provide the support for bus loading. With an RS232 driver, one device turned off will block the serial bus but RS485 devices will isolate each unpowered driver. The older device was a sn75176 (TI) but I'm sure I have read of newer devices from Maxim/Dallas Semi about RS485 drivers chips supporting four to eight differential lines. WATCH the pull up value ranges as devices are added or removed from the seral bus. Bradford
Geert; Drivers should have read Transceivers. See http://analog.ti.com and search on SLLA070B for 422/485 Standards Overview and Configurations.
the very best appnotes on RS-485 are at national semiconductor, anyone taht does 485 without reading "ten ways to bulletproof RS-485" is missing very valuable info. Erik
Hello guys, Thanks a lot for all your input. I think I have enough stuff to read and study. I'll try to go through the documents/components mentioned before and then I'll see how far my knowledge is about how to use RS-485. Thanks a lot! --Geert