CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RS485 and 256 transceivers

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
D. Collin



Joined: 16 Apr 2005
Posts: 7

View user's profile Send private message

RS485 and 256 transceivers
PostPosted: Sat Apr 16, 2005 1:28 pm     Reply with quote

Hi all,

I was wondering if the RS485.c will be compatible with transceivers such as MAX1483 (running half duplex, two wire bus and datasheet mention it can be used up to 256 nodes on the same bus)

I understand that RS485.c needs to be used with a transceiver, but is it any transceiver or a specific one?

I am considering using PIC16F876A with the MAX1483 to connect 250 nodes in a single bus (3000 feet). The PIC already has two RS232 devices connected to it and now a third #use RS232 statement will be added for the RS485 bus. RS485 bus speed can be 57600 or even a little higher if possible, while the two RS232 devices are fixed at 9600 baud

Thanks
D.C.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Sat Apr 16, 2005 1:34 pm     Reply with quote

Should work fine with nearly any half-duplex RS485 transceiver.

But 3 serial ports on a PIC16F part might give you trouble. Put the critical port on the hardware UART. Keep in mind that the software uart's work best when they can "sample" the data stream at 5x to 10x the input rate. If you must NOT miss data consider adding the SPI interfaced UART from Maxim (part number escapes me right now).
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
D. Collin



Joined: 16 Apr 2005
Posts: 7

View user's profile Send private message

PostPosted: Sat Apr 16, 2005 1:52 pm     Reply with quote

Hi Rob

Thanx for your input.

is RS485.c code that comes with CCS can be used directly even though the header of the file says address can be 1 to 33 , while using the MAX1483 means address can be up to 0xFF?

I am assuming the transceiver and the RS485.c code will take care of all the communication/protocol for me and i would be able to receive/send messages to any node simialr to serial devices by using #use rs232 line?

The nodes do not need to talk to each other, it will be one master with 250 slave nodes, tasks is started in salve, slave initiate message to master, master reposnd to slave with approval to continue task and reference number.

I am new to PIC and C and was just looking out for a hint if this method would be complex and possibly look for other solutions rather than RS485? If the RS485.c will take care of the communication of expecting a message to come via INT and looking at message and respond back then that would be great.
D. Collin



Joined: 16 Apr 2005
Posts: 7

View user's profile Send private message

PostPosted: Mon Apr 18, 2005 3:35 am     Reply with quote

Hi all,

Does it make more sense to switch the design to CANBus rather than RS485? The PICs can be replaced with pin to pin compatible 18F258 which has CANbus support? Any advice on which is more complex will be appreciated, would using the RS485.c be straight forward for sending/receiving messages, otherwise mabye look into CAN?

Thanx for all.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Apr 18, 2005 5:57 am     Reply with quote

CAN = More complicated

No one can give you an honest answer as to which one is better for your project without knowing all the details.
bfemmel



Joined: 18 Jul 2004
Posts: 40
Location: San Carlos, CA.

View user's profile Send private message Visit poster's website

PostPosted: Mon Apr 18, 2005 8:44 am     Reply with quote

If you really need to stick with the 485 structure and still have two 232 ports you might want to check out the article in Embedded Systems Programming. There is a way to use the SPI to receive an asynchronous transmission. So you could use the UART for the fast 485 port and the more critical 232 port and then use the SPI for the less critical, (assuming one is less critical), of the 232 ports. The article is at http://www.embedded.com/showArticle.jhtml?articleID=159901052

-Bruce
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group