- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can access the pin (and re-program it) using its pin-component in the generated sources.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On the other hand unconfigured SCB uses much more resources. It seems really akward to turn into unconfigured SCB for such tiny change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.