View previous topic :: View next topic |
Author |
Message |
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
PIC24EP512 - 5V UART on 3.5V PIC |
Posted: Wed Sep 25, 2024 8:05 pm |
|
|
Device: PIC24EP512GP806
Hi guys, I need to tie a device's UARTs running on 5V to my PIC24EP512GP806 running at 3.5V.
The PIC uses pins and pins F2 and F3 (pins 34/33) for UART 1 and F4 and F5 (pins 31/32) for UART2.
In the PIC datasheet on P5, it indicates that the above-mentioned pins are 5V tolerant. So dumb question because I never tried it but I take for granted that if the TX pin of the UART is 5V, I can tie it without a level translator to the PIC's RX pin even if the PIC is 3.5V? The PIC's TX pin will send a 3.5V signal to the 5V UART. That part I'm not concerned regarding damaging anything.... it's more the 5V TX to 3.5V RX that concerns me.
I'm just asking because I'm really pis*ed that I ordered breakout boards with the TI TXS0108E 8-bit bi-directional level translator which I thought was the same as TXB0108 that I have been using for years but I guess it's not the same because I don't have any signals going through the IC and everything is properly connected. Then I looked at the specs and I will admit that parts of it are beyond my understanding but I guess there is significant difference because it's not working.
Ben |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Thu Sep 26, 2024 2:07 am |
|
|
Yes. Pins that are 5v tolerant, can do exactly this. Accept a 5v input without
problems.
However 'caveat' will the UART inputs you have on the 5v device reliably
accept a 3v output as a logic '1'?. If these inputs are quoted as 'TTL', they
should (this has a VIH of 2.4v). However check the data sheet before
assuming this is the case.... Remember a PIC running at 3.3v (or 3.5, which
you refer to), will not guarantee to pull it's outputs 'up' to this supply
voltage. Voh is normally quoted as between about 0.2v and 0.6v below the
supply, depending on the load current. |
|
|
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
|
Posted: Thu Sep 26, 2024 4:45 am |
|
|
Yeah that was the other part - if the PIC's TX output at 3.5V will be valid. But I'm looking at the specs, it's a Nextion display and under "Interface performance" found here https://nextion.tech/datasheets/nx4827p043-011c/#4 it says that TXD Output High is minimum 3V, typical 5V. So I think it should work. I'll give it a try tonight.
Thanks for your input.
Ben |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Thu Sep 26, 2024 7:13 am |
|
|
It is the input high voltage that matters for its receive pin. This is
given as 3v, so should be OK. The data sheet is interesting in fact
because it specifically says the logic supports 3.3v TTL and 5v TTL.
So it should be fine. |
|
|
|