Question is, do you need a buffer at all?
If it is microcontroller pin, I has internal protection against voltages higher than Vdd and lower than Vss, and all what you need to do is to provide a series resistor to each pin, I’d say for 5V-to-3.3V a 1k resistor should work ..
Actually, recently i'm looking some TFT LCD. Operation for this LCD is 2.8~3.0V. Not sure can support 3.3V not. Currently, just do some study first.
Yes, I'm using AT89C52 microcontroller which to use that to control the TFT LCD 16/8-bit data and control pin.
Q1) May i know how you calculate the 1k resistor value?
Q2) Will the send/receive signal stable just connect a 1k resistor in between uC I/O port to LCD port?
Q3) Another concern is when the output signal is send from the LCD module which is lower laver voltage signal (let say ~2.8V signal) to high laver voltage 5V, can the uC I/O detect 2.8V signal? (External uC i/o port will have pull-high 4.7k resistor.)
In the uC datasheet said:
ViL - 0.2Vcc-0.1
ViH - 0.2Vcc+0.9
VoL - 0.45
VoH - 2.4, 3.75, 4.5
The input protective diodes may withstand roughly 20mA, so one or two mA shouldn’t be an issue ..
Of course, the higher the resistance the lower the frequency of the control signal ..
So, considering all of the above – 1k sounds reasonable ..
On the other hand, there are special level voltage translators that are used as buffers between 3.3V and 5V buses .
Have a look at the SN74LVC4245A: **broken link removed**
Q3) Another concern is when the output signal is send from the LCD module which is lower laver voltage signal (let say ~2.8V signal) to high laver voltage 5V, can the uC I/O detect 2.8V signal? (External uC i/o port will have pull-high 4.7k resistor.)
In the uC datasheet said:
ViL - 0.2Vcc-0.1
ViH - 0.2Vcc+0.9
VoL - 0.45
VoH - 2.4, 3.75, 4.5
Sorry for make you miss undestand the table. Actually this table is for AT89C52. so...
ViL(input Lo to uC) - 0.2Vcc-0.1 => 0.2*5-0.1 => 0.9V
ViH(input Hi to uC) - 0.2Vcc+0.9 => 0.2*5+0.9 => 1.9V
VoL(Output Lo to uC) - 0.45V
VoH(Output Hi to uC) - 2.4~4.5V
Pin-3 MOSI is connected to one Diode. Since the 3.3V device is very low signal + Diode 0.7V. The 5V device will receive 2.6V signal for High. So this voltage signal laver wouldn't affected the uC input voltage laver (since the ViH for uC is 1.9V consider Hi), am i rite?
Thanks for your advice. Ya, some of the Schottky diode will drop 0.3V only.
Please see the bellow picture. I still doubt the resistor and diode to drive the signal. So I do some simulation. The result look like not so ideality. Any idea about the result?
3-3V-device-to-5V-microcontroller
Why the CS pin-1 and the SCK pin-4 resistor connection is difference?
i) CS pin-1 will have a 10KOhm (can i use 4.7KOhm?) pull-up resistor plus 1kOhm in a series resistor to each pin.
ii) SCK pin-4 just provide a 10kOhm series resistor to each pin.
Is it we have 2 optional to control 3.3V device?
1st is to use 2 resistor. pull-up resistor + series a resistor.
2nd is just put a highest resistor value in series to each pin.
I'm not going to judge why they used several different ways ..
I'd connect 1k series resistor and 10k pull-up (89S52 has only weak pullups) on the 3.3V side on all connections between the 5V-MCU and a 3.3V device ..
If you want to be sure that the 3.3V device is protected you can add a Schottky diode in parallel with the pull-up .. see attached picture ..
Normally this kind of circuit protection what we call it? Sometime i have see some reference circuit they will connect the Schottky diode in paraller with pull-up/GND resistor.