PDA

View Full Version : What's the best way to communicate?



BobK
- 30th September 2004, 02:17
Hello, I have been reading posts to this group for some time now and have been very impressed with the responses that have been given to requests.

I have designed and built an 8 zone annunciator panel for an apartment building and plan to have 20 8-zone cards in a card cage. I am using a 16F74 micro on each card. Each zone provides two indications using a bi-led. What I would like to add to the project is the ability to send a report to the master card stating which of the 20 boards had the alarm and which zone activcated. This information would be displayed on an LCD display and would stay there until the next event occurs.

What is a better type of communications format to use? The types I have been reading about include using SERIN and SEROUT, RS232, and RS485. I understand that RS485 is more for sending data through noisy environments and longer distances, but there is a possibility down the line of doing that to a remote display. I have given some thought to a polling setup where the master card asks each of the 20 cards if it has any data and if not move on to the next, but I just don't know which is the best way to go.

I hope someone in this group can steer me in the right direction.

Thanks for any consideration.

Bob Koenig

Bruce
- 30th September 2004, 04:19
Hi Bob,

In my opinion, RS485 is the way to go. It's very simple, and cheap to setup. Have a master that polls each node, and waits for the report. You can easily setup a dedicated node for controlling a display as well.

Here's an example of how easy this is with a BASIC Stamp.
http://www.parallax.com/dl/docs/prod/appkit/rs485Communication.pdf

Jan Axelson's Serial Port Complete is one of the best books around on this subject. You can find them at most book stores, or online at amazon.com or our site http://www.rentron.com/Books/book2.htm

Her website is at http://www.lvr.com and has a ton of links to related websites.

Automan
- 30th September 2004, 08:04
HI all,

it seems that RS485 will be the best way to do your communication between your cards.
you could find some examples at:

http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/07.htm

actually i'm working on a temperature controler for my house which will send data to a PC near the TV.
i want to realise a control of all the settings in my house with a IR remote.

i'll post my works when everything is ok

excuse me for my english, i'm french

NavMicroSystems
- 30th September 2004, 12:03
Hi Bob and Jean-François,

Im currently working on the design of something similar.

(Control, Monitor and Alarm system)

There will be:
a number of motors for sun blinds and shutters to be controlled.
input from a number of buttons, sunlight and windspeed sensors.
a number of PIR detectors.

In total I will have to deal with 80+ I/O lines.

I'm currently as far as identifying components to be used.

Wouldn't this be something for a joint project?

regards

Ralph

P.S.

Bob, the answer to your question:
What's the best way to communicate?
is:
use this Forum! ;-)

Bulman
- 30th September 2004, 19:30
If you use RS485 you'll need a portocol. You can't do it as simple as the mikroelektronika's book. There are two choices Modbus and SNAP. If you do not implement a protocol the transfered data may be corrupted. The CRC-16 is cheking every received packet.

Regards

BobK
- 2nd October 2004, 01:40
I thank each of you for your replies. I am ordering some various interface chips this weekend and will be trying out the RS485 method when they get in.

Thanks again for taking the time to answer my question.

BobK

Automan
- 2nd October 2004, 06:54
Bonjour,


found on this forum

http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=316

thanks to salutatous