Author Topic: 5V display without 5V interface pins  (Read 705 times)

0 Members and 1 Guest are viewing this topic.

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2200
5V display without 5V interface pins
« on: October 04, 2024, 02:38:15 am »
I ordered one of these from buydisplay:
https://www.buydisplay.com/7-tft-screen-touch-lcd-display-module-w-ssd1963-controller-board-mcu

Interfacing document here:
https://www.buydisplay.com/download/interfacing/ER-TFTM070-4V3_Interfacing.pdf

You can configure this display for a 3.3V or 5V VCC.  My _initial_ thought was that a 5V display should tolerate 5V interface pins, but has proven to be wrong!  I missed in the interfacing document that the MCU was always 3.3V and not 5V.

My project has to be 5V, so I need to come up with a way to convert 12 display pins from 5V to 3.3V.  8 of these pins are a bidirectional data bus.  4 pins are output only.  I need a similar thing for SPI to a microsd also on the display, 3 pins output only (5->3.3), 1 pin input only (3.3->5).

Given those requirements, what do you recommend for level conversion?

edit; for the data bus (bidirectional) would 74LVC245 be a good choice?  I don't need to read data back from the display often, but I do need to.  The direction pin could be connected to the /RD signal so that the direction is reversed.  If the 74LVC245 is powered by 3.3V, then it would normally (/RD not asserted) level convert mcu 5v to display 3.3v.  In reverse though, the AVR says 0.6*VCC so 5V*.6=is 3V.  Is the 74LVC245 3.3V output enough margin for that 3V?
« Last Edit: October 04, 2024, 04:28:00 am by alank2 »
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 930
  • Country: ca
Re: 5V display without 5V interface pins
« Reply #1 on: October 04, 2024, 05:23:55 am »
See section 10.2 in the 74LVC245 datasheet. It illustrates a one-way 5V to 1.8V bus interface. However, using the DIR pin may work out in your case but to be sure you could use another one-way 5V powered 74HCT245 or 74HCT244 to go in the reverse direction.  "T" is important since it covers the TTL input range from 2V to 5V.  Then the /OEs of either '245s being tied to /RD or /WR, and given that the signals can't both be L, won't enable both '245s at the same time.  For the remaining 4 MCU-to-display pins there is also the 74HC125 which is commonly used for level shifting duty (see SDCARD interface here).  Alternatively, you could just use a resistor divider (see here).
 
The following users thanked this post: alank2

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13200
Re: 5V display without 5V interface pins
« Reply #2 on: October 04, 2024, 08:23:49 am »
For the bidirectional bus, the best choice would be a dual supply level translating bus transceiver, e.g. 74LVC8T245.  That will give you proper 3.3V and 5V logic levels in one chip with no trouble when you reverse direction. Its DIR pin sets the data direction - low is B to A, but its control inputs are referenced to VCCA, which will thus need A to be the 5V side for your MCU, so your control logic must hold DIR high during writes and low during reads.  Some glue logic may be required.

For dropping the remaining control lines from 5V logic to 3.3V logic  you can use any buffers with 5V tolerant inputs, powered at 3.3V, e.g. 74LVC125.
 
The following users thanked this post: alank2

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13022
  • Country: ch
Re: 5V display without 5V interface pins
« Reply #3 on: October 04, 2024, 12:07:30 pm »
Buydisplay also sells an Arduino shield for that display; the display bundled with that shield is linked from the module page. On the page for the version with shield, scroll down to the documents, and you’ll find the shield schematics. Those show the ’LV245 level shifters they use and how they’re connected.
 
The following users thanked this post: alank2

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 374
  • Country: pl
Re: 5V display without 5V interface pins
« Reply #4 on: October 04, 2024, 12:12:11 pm »
My project has to be 5V,

What does it mean?
May be easier will be to have MCU at 3V3 and on the other (not display) side make some needed voltage shifting to make your project being 5V.
 
The following users thanked this post: alank2

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2200
Re: 5V display without 5V interface pins
« Reply #5 on: October 04, 2024, 12:34:39 pm »
What does it mean?

I am interfacing it with a 5V Z80 CPU and there are many more connections with it that I don't want to translate.
 

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2200
Re: 5V display without 5V interface pins
« Reply #6 on: October 04, 2024, 12:35:20 pm »
Buydisplay also sells an Arduino shield for that display; the display bundled with that shield is linked from the module page. On the page for the version with shield, scroll down to the documents, and you’ll find the shield schematics. Those show the ’LV245 level shifters they use and how they’re connected.

I saw this.  It looks like it doesn't allow reading from the display, so no bidirectional.

What is the difference between LV and LVC?
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13022
  • Country: ch
Re: 5V display without 5V interface pins
« Reply #7 on: October 04, 2024, 02:19:23 pm »
Buydisplay also sells an Arduino shield for that display; the display bundled with that shield is linked from the module page. On the page for the version with shield, scroll down to the documents, and you’ll find the shield schematics. Those show the ’LV245 level shifters they use and how they’re connected.

I saw this.  It looks like it doesn't allow reading from the display, so no bidirectional.

What is the difference between LV and LVC?
Oh, apologies. I missed the read requirement.

(Out of curiosity, why perform reads?)

As for LV vs. LVC: that’s a damned good question!! All I was able to find in a quick search is:
“74LV (U) Low - Voltage (Unbuffered output)
74LVC (R) (U) LV - CMOS (damping Resistor)(Unbuffered output)”

TI’s Low Voltage CMOS data book:
Quote
LVC is TI’s answer to designers’ 3.3-V price/performance needs. With 5-V tolerance , typical propagation delays of 3.8 ns (maximum tpd of 6.3 ns), and 24-mA output drive current, LVC is the low-voltage solution that designers often need. With almost 60 devices available and more planned, LVC gives designers the options they need to maximize bus-interface performance.

LV is TI’s low-cost 3.3-V solution. The A revision common to the LV devices in this data book signifies the recent speed improvements on the entire LV family. With typical propagation delays of 8.3 ns (maximum tpd of 13 ns) and 8-mA output drive current, LV is designed to the 3.3-V family of choice when the speeds and drive currents of TI’s other low-voltage logic families are not necessary for successful designs.

But since LV is still 5V compatible, I can only assume that lower cost was the only advantage? (I doubt it’s even true now, though I didn’t check prices.)
 
The following users thanked this post: alank2

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2200
Re: 5V display without 5V interface pins
« Reply #8 on: October 04, 2024, 02:33:14 pm »
Oh, apologies. I missed the read requirement.
(Out of curiosity, why perform reads?)

Well... currently I am reading back the 16 pixels under the cursor so I can draw a cursor and then restore what was there.  I've implemented a 88x30 vgafont on the TFT display.  If I don't read back, I'd have to remember the 88x30 characters in memory, but I'm thinking about whether it is really worth it or not though.

The 74LVC8T245 mentioned above looks like it would be fantastic for this.  I noticed there was a 74LVCH8T245 that says "Active bus hold circuitry in the 74LVCH8T245 holds unused or floating data inputs at a valid logic levels".
 
The following users thanked this post: tooki

Offline alank2Topic starter

  • Super Contributor
  • ***
  • Posts: 2200
Re: 5V display without 5V interface pins
« Reply #9 on: October 04, 2024, 05:53:57 pm »
Something interesting is that the ssd1963 has more SRAM than I am using.  It supports an 864x480px display, but my display is only 800x480.  I tried to see if I could use those extra 64 columns as memory (64*480*3=90KB!).  At first writing to those columns put the data on screen wrapping around at 0 - I'll bet the set_column_address was limiting it by the width of the display.  I found I could change the lcd_mode_command from 800 to 864 and the everything still displays fine, but now I can access those 64 columns even though they aren't displayed, so I can read and write 90K to the display.  I'm guessing that even though the lcd panel width is now 64px wider that the panel itself is being sent those pixels, but is just ignoring them?
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7132
  • Country: fi
    • My home page and email address
Re: 5V display without 5V interface pins
« Reply #10 on: October 04, 2024, 06:12:49 pm »
There are dual supply bidirectional translators like TI TXS0108E and TXB0108 you can use, with the B side at 5V, and A side at 3.3V.

I do prefer unidirectional/controlled-direction translators like 74LVC8T245 and variants, though.  The direction auto-sensing typically causes small differences in the low level signal output, and some microcontrollers can glitch on that –– but it depends on the microcontroller logic levels and input circuitry, and is not a common problem.  The unidirectional (TI TXU0n0m) and direction-controlled ('1T45, '2T45, '245, '8T245) don't have that.  For single data lines, I always keep some 74LVC1T45 in SOT23-6/SOT26-6/SC-74 at hand, because they're small and capable, but in a pinch hand-solderable and dead-buggable due to the 0.95mm pitch.  (As in, you can solder it directly to wires, put some heatshrink on, and not have any kind of a board for a single data line, just a heatshrink bulge where the wires meet.)

I'm guessing that even though the lcd panel width is now 64px wider that the panel itself is being sent those pixels, but is just ignoring them?
I do believe so, because in the SSD1963 datasheet (PDF), the SET_LCD_MODE command (page 46) is separate from the SET_HORI_PERIOD command (page 47), and the latter sets the display horizontal timings.  (Similarly, SET_VERT_PERIOD (page 49) sets the display vertical timings.)  In other words, that SET_LCD_MODE sets the SSD1963 framebuffer properties, and SET_HORI/VERT_PERIOD the timings.

Note that when reading/drawing a cursor or similar, you should use the SET_PARTIAL_AREA command, so you only need to handle the affected rectangular area within the framebuffer in a single continuous transfer.
 
The following users thanked this post: alank2

Online mariush

  • Super Contributor
  • ***
  • Posts: 5163
  • Country: ro
  • .
Re: 5V display without 5V interface pins
« Reply #11 on: October 04, 2024, 06:33:44 pm »
Maybe 3 of these 4 channel translators ? 

NexPeria LSF0204PWJ : https://www.digikey.com/en/products/detail/nexperia-usa-inc/LSF0204PWJ/12808380

Cheaper than 2 8 channel translators.
 
The following users thanked this post: alank2


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf