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 CCS Technical Support

rs485 - SP490 or MAx490 Full Duplex ???

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



Joined: 04 Mar 2009
Posts: 19

View user's profile Send private message

rs485 - SP490 or MAx490 Full Duplex ???
PostPosted: Sat Sep 11, 2010 4:48 pm     Reply with quote

hi there,
I was wondering if full duplex rs-485 chip such as the sp490 or max490 work with ccs?

do you use the following code without the enable, you normally use with the half duplex rs485, as there is a dedicated line for tx and rx?
Code:

#use rs232(baud=9600,rcv=PIN_C7,xmit=PIN_C6,stream=PIC)

So i would just need to connect RO to C7-RX and DI to C6-TX, or is there any other code i need to use? i have searched the forums but couldn't find the answer, i sorry if this has been asked before!

I'm going to use this to connect two pic together, which is not in master and slave mode. so the full duplex with four wire, which i can be use for long distance transmissions.

thanks in advance

piire!
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat Sep 11, 2010 7:33 pm     Reply with quote

Quote:

I was wondering if full duplex rs-485 chip such as the sp490 or max490 work with ccs?

Yes. both are transceivers to use with RS485 levels.

Quote:

do you use the following code without the enable, you normally use with the half duplex rs485, as there is a dedicated line for tx and rx?


No. You should define as follow:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, enable=PIN_xx, stream=PIC)

Then wire the transceiver as follows:
PIN_C7 to RO
PIN_C6 to DI
and
PIN_xx to DE
PIN_xx to RE

DE and RE are wired together to use it in half duplex.
Write code as usual with RS232.

Humberto
piire



Joined: 04 Mar 2009
Posts: 19

View user's profile Send private message

PostPosted: Sun Sep 12, 2010 3:48 am     Reply with quote

the sp490 and max490 dont have DE and RE pins

the data sheet is below, the enable pins is used to determine if you can send or receive. or is the enable used to tell the complier that a rs485 ic is being used?

http://www.datasheetcatalog.org/datasheet/sipex/SP490.pdf

thanks
piire
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sun Sep 12, 2010 4:18 am     Reply with quote

Yes.
There are two different 'full duplex' setups used. Humberto, is thinking I think of the 491 chip, where you still have the RE/DE pins, so that you can still have multiple master devices on the bus.
With the 490, you effectively just have an alternative 'point to point' signaling method, as a direct replacement for RS232. You can still have multiple receivers tapped onto the bus, but no ability for these other devices to transmit. The bus becomes 'single master' in each direction.
If all you want is a point to point connection between two devices, the 490, offers nice long distances, compared to RS232, but at the 'cost' of needing four wires.
It'll work just like RS232 with sch a connection, with no enable needed.

Best Wishes
piire



Joined: 04 Mar 2009
Posts: 19

View user's profile Send private message

PostPosted: Sun Sep 12, 2010 5:47 am     Reply with quote

Thank you for your advice, the confusion is cleared up!
regards
piire!
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