I am trying to hook up an LCD module to my microcontroller, and was following this tutorial.

Notice that the three signal wires all go through a level shifter, which drops the voltage from 5V to the required 3.3V. I don't have a level shifter on hand, so I can't implement what the tutorial shows exactly. However, I do have a pile of resistors, and could easily make three separate voltage dividers for each signal wire. Would that work equally well, or are there scenarios where voltage dividers are not preferred (i.e. this one)?

  • \$\begingroup\$ Is your LCD 3.3 V and your uC 5V like in the tutorial? \$\endgroup\$ – justing Mar 18 '13 at 2:32
  • \$\begingroup\$ Yes, you can. See here for other voltage shifting techniques. However, level shifter is more convent, since you need to shift several lines. \$\endgroup\$ – angelatlarge Mar 18 '13 at 2:34
  • 1
    \$\begingroup\$ I don't see any schematic on the page you linked, so I can't be sure of this, but ... very likely you could put your uC outputs in open-collector mode, and use pull-ups to 3.3 V to generate the logic levels you want. Viability of this solution may depend on how fast these signals are switching. \$\endgroup\$ – The Photon Mar 18 '13 at 2:41
  • \$\begingroup\$ I guess I probably wouldn't use a voltage-divided 3.3V for the Vcc pin. I am also not sure how much current that LCD needs. \$\endgroup\$ – angelatlarge Mar 18 '13 at 2:42
  • \$\begingroup\$ Use an LDO regulator for the Vcc pin. You don't need to know the current it needs; you just need to know it's less than the LDO regulator can provide. \$\endgroup\$ – Brian Drummond Mar 18 '13 at 10:39

You could probably use the resistor dividers here, since all control pins specified on the link provided are unidirectional (from the Arduino board towards LCD): RST, CS, D/C, DIN, CLK).

As already mentioned, you should use the low dropout voltage regulator for 3.3 V power supply for the LCD, all other lines should work just fine with resistor dividers.

Now the bad news: I am not that sure about the Data lines mentioned. There are five of them (which is strange, should be either four or eight), but the problem is that without knowing exactly what the firmware was doing you cannot be sure that the data bus was always only written. What if some status information (i.e. busy flag or something) was checked from LCD command registers? Could it be that the LCD 'DIN' line specifies the Data transfer direction? At first I thought it was dead simple (unidirectional serial data connection), but I think you should check more carefully how this LCD communicates with Arduino.

Another issue, five control lines requires ten resistors! Data bus requires another ten. It takes as much space as some CMOS buffer chip. I see the 4050 buffer chip mentioned in your link, and probably this chip is shown on the prototype board picture. You could power this chip with 3.3 V, and you have your level shifting done. If you have already done that for the data bus, just get another 4050 for control lines.

From the 4050 documentation:

The HEF4050B provides six non-inverting buffers with high current output capability suitable for driving TTL or high capacitive loads. Since input voltages in excess of the buffers’ supply voltage are permitted, the buffers may also be used to convert logic levels of up to 15 V to standard TTL levels.

It operates over a recommended VDD power supply range of 3 V to 15 V referenced to V SS (usually ground).

The 4050 has no problems handling 5 V at the input, and providing 3.3V /max/ at the output. Of course, this could be done only in the case your data bus was unidirectional. You would only need resistor dividers for handling lines not fitting into 4050 (if you have to take care of more than six lines). Use resistors dividers for RST and C/D which do not change often.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.