eBay 3.3V TFT screens

I've got one of those little TFT screens from eBay. I have it working on a Pro Mini 3.3V, no problem. Works great. Not exactly speedy but good enough.

Now I'm interested in getting it working at 5V in a limited space.

It should be possible to make it work with just some resistors instead of a CD4050 or voltage dividers. All we need to know is the size of the pullup on the ILI4931 (assuming it has one) then pick a matching resistor to connect it to the Arduino.

Has anybody made this work with just resistors? What value did you use?

I guess I could put in a potentiometer and turn it until I see 3V at the screen but I'm interested to know if anybody else has done it.

[ First never choose a TFT unless you know which driver chip it has and you've
found a driver for that chip ]

Standard resistive divider will work fine, I use 1k over 2k2, which drops 5V to 3.43V.

Larger resistor values would limit the speed but 1k/2.2k works with SPI signals at
8MHz clock fine.

SPI screens are easier to drive, only 6 lines to drive IIRC. You don't need to read MISO
and can omit that.

Another way to level shift is with 2k2 pullups to 3.3V and 1N4148 diodes to the
Arduino (cathode to Arduino, anode to TFT). This has the advantage of working
with 5V and 3.3V arduinos automatically.

There are also level shifting chips - I noticed adafruit have an 8-channel level shifter
breakout board ATM.

Is this what you are referring to ? (see attached)
Also, a 74ls245 should (see attached)

5V-3.3V_level_shift_circuit_for_TX-RX.png

raschemmel:
Is this what you are referring to ? (see attached)

I was hoping to do it with just a single resistor by matching the impedance of the screen.

I just found time to have a play and this is what I found:

To drop a 5V output down to 3V at the screen end I had to put in a 22k resistor. This suggests the screen has a 40k pullup resistor on it (which is believable - Arduino internal pullups are also about 30-40k).

A 22k resistor is quite high, I don't think I'd be happy trying to send an 8Mhz signal down it.

I guess I'll be using a two resistor divider if I decide to use it with 5V chips. OTOH a 16-pin chip vs. 10 resistors...which will be smaller? It's a tough call.

Edit: Some speculation removed - I tried a trick to avoid level shifting some pins and it didn't work.

Have you tried the single resistor with two diodes in the schematic I attached ?

raschemmel:
Have you tried the single resistor with two diodes in the schematic I attached ?

Isn't that to go from 3V to 5V?

I figure out a way to make my pin-direction trick work. I added an external 1K pullup to 3.3V on the D/C pin. With that pullup I can toggle the Arduino pin between INPUT and OUTPUT to make D/C go high/low (INPUT=pulled up, OUTPUT=connected to ground).

The screen is working perfectly, and the same trick should work on CS and RESET saving three resistors. I can't do the same to the SPI pins because they're controlled by hardware.

I don't know what you can do about the SPI pins because SPI is bidirectional .
Here's a link for a 5V Pro Mini for $3 (+$1.95 shipping): Total cost <$5.

Since you're using a 3.3V FTDI BASIC (I assume), you won't be able to plug the FTDI basic directly into it and
also the pin arrangement is mirror image , with BLK on the LEFT and GRN on the RIGHT. A genuine Pro-Mini
is the reverse so if they were the same voltage you would have to plug the FTDI into it UPSIDE DOWN.

I have both. I plug the FTDI directly into the genuine right side up and use special cable to connect to the
clone.

raschemmel:
I don't know what you can do about the SPI pins because SPI is bidirectional .

I only need CLK and MOSI (and only in one direction)

raschemmel:
Here's a link for a 5V Pro Mini for $3 (+$1.95 shipping): Total cost <$5.

Since you're using a 3.3V FTDI BASIC (I assume), you won't be able to plug the FTDI basic directly into it and
also the pin arrangement is mirror image , with BLK on the LEFT and GRN on the RIGHT. A genuine Pro-Mini
is the reverse so if they were the same voltage you would have to plug the FTDI into it UPSIDE DOWN.

I have both. I plug the FTDI directly into the genuine right side up and use special cable to connect to the
clone.

I've got lots of those. :slight_smile:

My FTDI is 3.3V/5V selectable, that's how I'm making the screen work at the moment - feeding 3.3V into the pro mini through the FTDI. I might want to move to 5V later.

PS: The FTDI works fine upside down - no special cable needed.

raschemmel:
Is this what you are referring to ? (see attached)

Not at all:

If you look at the two attached photos with the polarity markings GRN (on the left of connector) for the genuine
and BLK (on the left for the clone), I don't see how the FTDI could work plugged in backwards unless it is ]
connected to a clone. If you plug it in upside down the rx & tx would be connected to vcc & gnd.
If I'm wrong about that please explain how you are able to do it.

Genuine Pro-Mini.jpg

clone pro mini.jpg

Note the GRN on left of connetor of FTDI

I might have explained that wrong but if you look at the photos you get the idea.
GRN<->GRN
BLK<->BLK

They're supposed to match up.

MarkT:
Not at all:

Yes, that looks like it would work...

I'm really trying to minimize components though because I want to glue a pro-mini to the back of the screen (I will remove the SD card holder) and wear it as a badge. My single resistor "open collector" method is working perfectly (add external pullup and switch Arduino pin between output-low and high-Z).

raschemmel:
I might have explained that wrong but if you look at the photos you get the idea.
GRN<->GRN
BLK<->BLK

They're supposed to match up.

Yes, I know what is says on the board but have you checked it with a multimeter? The pin labelled "BLK" is connected to GND. The pin labelled "GRN" appears to be connected to reset via a capacitor. The programmer works perfectly if you flip it over.

PS: I've got other Pro Minis where both the left pin and the one next to it are both labelled "GND" - the pro mini ties CTS to GND so really they're the same pin.

I don't know how you can get it to work when tx & rx are connected to vcc & gnd if you connect it
right side up on a clone or upside down on a genuine but whatever. That's really not what this topic is
about so...
Anyway, your pullup resistor & diode solution is a clever idea and I like the low parts count. I will pass that
on to my friend who is using 3.3V stuff.
So have you solved your problem then ?

raschemmel:
I don't know how you can get it to work when tx & rx are connected to vcc & gnd if you connect it
right side up on a clone or upside down on a genuine but whatever. That's really not what this topic is
about so...

They don't connect to Vcc and GND if you flip the board over.

I just noticed that the official FTDI board has the connections written on both sides, they reverse when you turn it over.

The end pin is also labelled GND/BLK. The second pin (the one marked "GND" on that Pro Mini) isn't labelled at all, but they both clearly connect to the ground plane on the board.

See: http://arduino.cc/en/Main/USBSerial

I also have some of these. Both of the pins are labelled "GND" on them.

All in all, I think the evidence is strong that flipping the programmer is OK, no special cable needed. :slight_smile:

(Also: I've been doing it for months and it works...)

raschemmel:
Anyway, your pullup resistor & diode solution is a clever idea and I like the low parts count. I will pass that
on to my friend who is using 3.3V stuff.

Mine doesn't have a diode, that's MarkT.

My method was to use (eg.) that for SCK/MOSI and a single resistor plus a clever screen driver on the other three pins (CS/DC/RESET). I don't think I need to connect MISO, I won't be reading anything from the screen.

raschemmel:
So have you solved your problem then ?

Yes, it's working at 5V with just 7 resistors (or 5 resistors and two diodes if I use MarkTs method for SCK/MOSI).

Oh ... and a 68 Ohm resistor for the backlight - there's no 3.3V supply on a Pro Mini.

Good deal. I'll check out that pin assignment thing .
Thanks for the info.

MarkT,
see reply #6 & 7 from this post regarding your resistor diode circuit.
http://forum.arduino.cc/index.php?topic=215698.msg1579773#msg1579773

I referenced you in Reply #10.