5V display without 5V interface pins - Page 1
Forum section: electronics / beginners

author: alank2
author_rank: Super Contributor
timestamp: October 04, 2024, 02:38:15 am
content: I ordered one of these from buydisplay:https://www.buydisplay.com/7-tft-screen-touch-lcd-display-module-w-ssd1963-controller-board-mcuInterfacing document here:https://www.buydisplay.com/download/interfacing/ER-TFTM070-4V3_Interfacing.pdfYou 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?

author: pqass
author_rank: Super Contributor
timestamp: October 04, 2024, 05:23:55 am
content: See section 10.2 in the74LVC245 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 powered74HCT245or74HCT244to 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 the74HC125which is commonly used for level shifting duty (see SDCARD interfacehere). Alternatively, you could just use a resistor divider (seehere).

author: Ian.M
author_rank: Super Contributor
timestamp: October 04, 2024, 08:23:49 am
content: 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.

author: tooki
author_rank: Super Contributor
timestamp: October 04, 2024, 12:07:30 pm
content: 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.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 04, 2024, 12:12:11 pm
content: Quote from: alank2 on October 04, 2024, 02:38:15 amWhat 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.

author: alank2
author_rank: Super Contributor
timestamp: October 04, 2024, 12:34:39 pm
content: Quote from: PGPG on October 04, 2024, 12:12:11 pmI am interfacing it with a 5V Z80 CPU and there are many more connections with it that I don't want to translate.

author: alank2
author_rank: Super Contributor
timestamp: October 04, 2024, 12:35:20 pm
content: Quote from: tooki on October 04, 2024, 12:07:30 pmI saw this. It looks like it doesn't allow reading from the display, so no bidirectional.What is the difference between LV and LVC?

author: tooki
author_rank: Super Contributor
timestamp: October 04, 2024, 02:19:23 pm
content: Quote from: alank2 on October 04, 2024, 12:35:20 pmOh, 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’sLow Voltage CMOS data book:QuoteBut 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.)

author: alank2
author_rank: Super Contributor
timestamp: October 04, 2024, 02:33:14 pm
content: Quote from: tooki on October 04, 2024, 02:19:23 pmWell... 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".

author: alank2
author_rank: Super Contributor
timestamp: October 04, 2024, 05:53:57 pm
content: 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?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 04, 2024, 06:12:49 pm
content: There are dual supply bidirectional translators like TITXS0108EandTXB0108you 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, Ialwayskeep 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.)Quote from: alank2 on October 04, 2024, 05:53:57 pmI do believe so, because in theSSD1963 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.

author: mariush
author_rank: Super Contributor
timestamp: October 04, 2024, 06:33:44 pm
content: Maybe 3 of these 4 channel translators ?NexPeria LSF0204PWJ :https://www.digikey.com/en/products/detail/nexperia-usa-inc/LSF0204PWJ/12808380Cheaper than 2 8 channel translators.