Tuesday, November 13, 2007

[piclist] address decode on serial

Hello all:

I have a desire for a project to use a PC as a master, poll various
pics on a rs485 network, using a very simple polling idea and have
the pics respond with their status as well as take data from the pic
if desired.

Im working on this in small parts and my first thoughts on overall
programming is this to get the pic to respond to its address:

pic watches the data stream for a "sync byte" such as "89"
if "89" appears then check the next byte for its address such as "02"
if "02" is its address then respond with its status

I tried this before without using the sync byte and the pic
responded to any bit sequence that appeared and matched 4 bits. By
using the sync byte, will this help with the false responses? my
first attempt was using a addres of "2" and any bit opattern that
matched "0010" falsed a response.

Serial speed is not set, I tested at 9600.....
PIC is 16F627/16F628

Im a NOVICE to programming and trying to learn as I go here.

All help appreciated!

Randy
kk4ej

__._,_.___
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
Recent Activity
Visit Your Group
Yahoo! News

Get it all here

Breaking news to

entertainment news

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Moderator Central

Yahoo! Groups

Join and receive

produce updates.

.

__,_._,___

No comments: