Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > RS232 to RS485

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



RS232 to RS485
Moderator:
ANCY

Post Reply
Follow this topic



RS232 to RS485

Mitch_007 posted on 16 Jul 2012 2:36 AM PST

1 Forum Post

Hi,

New here.... and would appreciate some insight on the PSOC devices offered by Cypress.

Is there any way to configure a PSOC device to be an RS232 module and then switch it on the fly to be an RS485 I/O module? There are advantages in both but with limited space on my development module I only have space for one connector?

Regards Ian




Re: RS232 to RS485

H L posted on 16 Jul 2012 03:01 AM PST
Top Contributor
679 Forum Posts

 232 and 485 has differnet voltage level. Could you be more specific? you need external circuit in both cases.



Re: RS232 to RS485

SpiderKenny posted on 16 Jul 2012 03:36 AM PST
Top Contributor
83 Forum Posts

From what I can gather from your question...

You have room for only one connector on your board. You'd like this to either be RS232 or RS485 and switch it 'on the fly'.

For RS232 you need 3 pins on your connector (TX, RX, and GND) as a minimum and for RS485 you need 2 pins, A and B.

In terms of the connector, you could use some kind of buffer to isolate the two sets of signals, and switch the required ones in and out of the connector, then you'd also need some more hardware (possibly in the PSOC) to multiplex the RX signals (one from the RS232 chip and and from the RS485 chip) as needed.

All of this hardware would take more room than just adding a 2 pin header for RS485.

On eBay you'll find dozens of different USB-to-serial boards which provide RS232 and RS485 options, and they normally do it by means of a bunch of jumpers.



Re: RS232 to RS485

Bob Marlowe posted on 16 Jul 2012 03:56 AM PST
Top Contributor
1768 Forum Posts

Despite to the mentioned voltage levels, you have full control over the pin's states, so you may connect two output pins and enable one of them to perform your needed functionality.

 

Bob



Re: RS232 to RS485

Bob Marlowe posted on 16 Jul 2012 03:58 AM PST
Top Contributor
1768 Forum Posts

 

Sometimes something VERY weired goes on in this forum software, what put my last post's lines higher than usual?



Re: RS232 to RS485

hli posted on 16 Jul 2012 04:14 AM PST
Top Contributor
675 Forum Posts

Did you accidentially press this 'x2' button in the editor? Your text is enclosed in 'sup' tags, which places them higher...



Re: RS232 to RS485

H L posted on 16 Jul 2012 04:16 AM PST
Top Contributor
679 Forum Posts

 You also consider how the other side switch the interface on the fly as well.  Is there any particular reason why you have to have both and switch on fly? A low power 485 linkcan have more then 32 device connected.



Re: RS232 to RS485

H L posted on 16 Jul 2012 05:40 AM PST
Top Contributor
679 Forum Posts

This chip may be what you need

LTC1387

 



Re: RS232 to RS485

danaaknight posted on 16 Jul 2012 07:59 AM PST
Top Contributor
1773 Forum Posts

RS232 and 485 have quite different physical interfaces, and if you wish to

be complient you need to handle the entire interface, not just 2 or 3 pins.

Additionally the  need to handle the electricals associated with these interfaces.

Even the 9 pin connectors are wired differently.

 

So from a reliability and PHY aspect external parts seem to be in order to

do this.

 

Regards, Dana.



Re: RS232 to RS485

pavloven posted on 17 Jul 2012 10:55 AM PST
Top Contributor
78 Forum Posts

I do like this:
 tune UART as RS-232. He uses a TTL signal, and connect the external elements - those that I need. I use this:
http://mylab.wmsite.ru/moi-razrab/ustrojstva-na-usb/usb-rs232_ttl/moduli

To change the baudrate using external clock:

can I change UART baud rate in run time?
http://www.cypress.com/?app=forum&id=2232&rID=60456

Arbitrary BAUD Rate of UART in PSoC 3/5
http://www.cypress.com/?id=4&rID=40116
 



Re: RS232 to RS485

danaaknight posted on 17 Jul 2012 03:22 PM PST
Top Contributor
1773 Forum Posts

The answer is yes, if using external clock clearly you control the source and /N ratio

using external clock APIs.

 

If using internal, no APIs shown in data sheet, investigate TRM amnaul for register control

of clock for internal clock.

 

Regards, Dana.



Re: RS232 to RS485

danaaknight posted on 17 Jul 2012 03:39 PM PST
Top Contributor
1773 Forum Posts

Looking at the Arch and Register TRM, UART is implemented in UDB blocks,

and there are registers controlling UDB configuration.

 

That being said no obvious, "pick this", "write this" references to UART configuration.

There are references to clock configuration, so you could experiment.

 

You could file a tech case at www.cypress.com with the questions on how to config a

UART with internal clock choosen.

 

Regards, Dana.

 



Re: RS232 to RS485

pavloven posted on 18 Jul 2012 02:13 AM PST
Top Contributor
78 Forum Posts

If I need an RS-232 and RS-485 I do so as the attached picture:



Re: RS232 to RS485

danaaknight posted on 18 Jul 2012 04:17 AM PST
Top Contributor
1773 Forum Posts

The original goal was, I believe, two PHYs thru a common connector.

 

Also your approach can be achieved with more integration today with

parts support both PHYs, seperate connectors. Still does not meet

the goal.

 

Regards, Dana.

 



Re: RS232 to RS485

H L posted on 18 Jul 2012 04:43 AM PST
Top Contributor
679 Forum Posts

 Have a look of the chip I found. It is 2 PHY in 1 chip.



Re: RS232 to RS485

pavloven posted on 18 Jul 2012 06:10 AM PST
Top Contributor
78 Forum Posts

Yes, this is a good solution  (LTC1387   ) 
http://www.mitracon.ru/pdf/LTC/1387FS.pdf
page 11  figure 14
 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20