UART Tx Output Level Change

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiKO_283856
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi,

   

I'd like to interface the UART Tx output of a 4200 PSoC4 running on a 3.3V bus to a device fed with a 5V PS.  I don't want to use a level translator.

   

Is there a way to reconfigure the Tx pin as an Open Drain (and reverse the logic) as the pin is chosen by the fitter, so I have no direct access to its configuration.

   

May be changing the corresponding registers  by software?

   

 

   

Michel 

0 Likes
11 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        For interfacing 3.3V and 5V digital levels you can use SIO pins as described in Cypress AN60580 http://www.cypress.com/documentation/application-notes/an60580-sio-tips-and-tricks-psoc-3-psoc-5lp?s... But I would try to connect them directly first - it might work (add some resistors in series for protection) odissey1   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You can access the pin (and re-program it) using its pin-component in the generated sources.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

PSoC 4 does not have SIO pins. PSoC 4M   have pins which are over-voltage tolerant, specifically useful for I2C as you need now.

   

If you are using SCB UART, then the pins are hidden in the component and you cannot change the drive mode of the component. But you have some level of flexliblity to assign the SCB pin. By default, the drive level will be Open Drain drive low.

   

If you are using UDB UART, then the pins will be populated out in topdesign. You can change the drive mode.

   

In either case, if you use an external  pull up with 5V, it will back power PSoC.

   

-Keerthi

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

If you are using SCB UART, then the pins are hidden in the component and you cannot change the

   

drive mode of the component.

   

 

   

Question, are you sure thru reg writes you cannot change the pin parameters ? I would

   

assume the component assigns the parameters at startup of the module and then moves on

   

to its other functionality.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

In my project I want to drive circuit which tolerate lower voltage. And I would like to change Tx pin to resistor pull up. It's possible to do it with UART by directly driving into Port register. But at startup original config is wirtten, which damage the circuit before I change pin configuration.

   

Is there a example Project which use unconfigured SCB block which turns it in custom UART?

0 Likes
Anonymous
Not applicable

On the other hand unconfigured SCB uses much more resources. It seems really akward to turn into unconfigured SCB for such tiny change

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Route the pin back into the part on another pin, and then back out thru a

   

gate/mux to a pin you config per your requirements. Kind of a waste of 2

   

pins, but if you have them one solution.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You will find a file named UART_tx.h where some functions are defined to access the Tx pin (whichever that is)

   

Check/search for "Drive Modes" and you will see the prototypes and constants to set the pin's mode.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

When you start UART the component initializes pins, so for that time until

   

you update pins you have the drive mode you are trying to avoid that you

   

state will cause damage. So that's not a solution unless the affected downstream

   

device can handle improper drive for some length of time.

   

 

   

That's the issue you stated earlier ?

   

 

   

Regards, Dana.

0 Likes
MiKO_283856
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi to all, many thx for the proposed solutions.

   

I should say I have given up and finally used a lever translator (ADG330x in my case), PCB had room for.

   

However reading your comments it seems there is no straightforward or easy workaround to this problem.

   

Michel

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

A translator is the best approach. The principle problem(s) are twofold,

   

the 5V side trying to overdrive the 3V side, and 3V side not meeting

   

good noise margin at logic "1" into 5V side. The former can be solved

   

with a series R, at expense of speed, but that does nothing for the latter

   

problem.

   

 

   

An approach with an Open Drain out and pullup also suffers from logic

   

"1" noise margin on 5V side, all due to protection diodes on 3V side.

   

 

   

You can google level translation, there are a number of approaches.

   

 

   

Translator best answer.

   

 

   

Regards, Dana.

0 Likes