[Andy Brown] wrote in to show off the TFT LCD adapter he’s been working on for connecting inexpensive displays to an Arduino Mega.
These TFT LCD screens can be picked up on eBay for a few dollars. But they’re more suited for 16-bit microcontrollers which operate at 3.3V levels. His adapter board, which plugs directly into the Mega’s dual-row pin header, makes it easier to control these with an 8-bit chip that is running at 5V.
There’s a couple of things that make this happen. First off, he’s included level converter chips to managed the 3.3V/5V issues. Second, he uses latch chips to translate eight pins on the Arduino Mega to sixteen pins on the display. Those chips have a latch pin which holds the output values in memory while the input pins are changed. He manages to drive the latch on just one of the chips using the chip select (CS) line called for by the LCD protocol. This means you don’t lose any extra pins.
Another way to uses the displays with Arduino is to use a smart controller for TFT screens.
Continue reading “Easy LCD control for Arduino Mega”
I finally set aside some time for one of my own projects. I have been playing around with ARM microcontrollers a lot lately and wanted to try out my GLCD display that uses the KS0108 protocol. It’s 5V but I had heard that some of these displays will work with 3.3V TTL. But the datasheet tells me otherwise. I tried using a pull-up resistor to 5V and configuring the Stellaris Launchpad pins to open drain, but the low voltage wasn’t getting below the 0.3V threshold needed by my display. My only choice was to use some type of level conversion. I actually ended up driving the KS0108 using a pair of TXB0108 level converters.
I figured this had to have been done before so I check over at Sparkfun. Their offerings are either one-way or have a direction pin that you must drive yourself. I figured there had to be a bi-directional solution and a search over at Mouser led me to the TXB0108. It is exactly what I was looking for and as you can see I etched my own circuit boards to make the TSSOP chips breadboard compatible. I’ve documented the process you can find the code and board files at my post linked above.
Update: one of the Reddit comments mentions this chip is available on a breakout board from Adafruit if you’re interested.
The rig pictured above works as an Internet connected temperature sensor which sends [Zaion] an email with a graph of the change over time. This in itself is interesting, but one part in particular caught our eye. He’s using an i2c temperature sensor , and we think the PCA9517 Level-Translating I2C Bus Repeater that makes it possible is a perfect match for the RPi.
This is a Texas Instruments part. You can find more about it from the company’s product page. The key words in the name of the chip are ‘Level-Translating’. This has two bus connections, each with variable voltage levels. On side A the bus can be 0.9V to 5.5V. On side B the bus range is 2.7V to 5.5V. Since the Raspberry Pi I/O pins operate at 3.3V this could connect to the B side, give you the ability to interface with i2c parts rated for lower or higher voltages. This is especially handy for folks who started with the Arduino and own mostly 5V compliant prototyping hardware.
The part comes in a SOIC package, which you can easily hand solder and will costs around $1 depending on the supplier.
[Giorgio Vazzana] turned his Raspberry Pi into a PIC programmer using a rather small collection of common parts. It supports about a dozen different chips from the 16F family. But we’d guess that software is the limiting factor when it comes to supporting more chips.
Generally the problem with PIC programming is the need for a 12V supply. He chose to use an external 12V supply and a 78L05 linear regulator to derive the 5V rails from it. With the power worked out there are some level conversion issues to account for. The RPi provides 3.3V on the GPIO header pins, but 5V logic levels are needed for programming. He built transistor and voltage divider circuits to act as level converters. The programming software bit bangs the pins with a write time of less than eight seconds per 1k words of program data. So far this does not work with ICSP, but he plans to add that feature in a future version.
This is a Nokia 6300 screen. It’s a 320×240 display that has about 2″ of diagonal viewing area and boasts 24-bit QVGA TFT technology. It’s going to look fantastic in your next project and it won’t be hard to get up and running thanks to the hardware and software guide which [Andy Brown] put together. He chose this display because of its features, but also because it’s really easy to source and can be had for $5-7 delivered. The guide is aimed at working with the Arduino MEGA, but we’re sure you can port it for just about any microcontroller you’d like.
Much like the FPGA PSP display we just looked at, [Andy] chose to design his own PCB to host the LCD. This makes it a snap to attach the LCD — literally, since he managed to source the correct snap-in connector. The board also hosts a constant-current LED driver which takes care of the backlight, and allowed him to build in a level converter (since the screen communicates at 3.3V but Arduino uses 5V logic).
The software tutorial is lengthy but impressive. We’re surprised at the performance he gets out of the AVR chip. See the screen cycle through a set of demos after the break.
Continue reading “Driving a Nokia QVGA screen with Arduino (or any uC)”
[Andy Brown] wanted one level converter to rule them all, so he set out to build his own which included plenty of options.
The chip at the top and center is a pretty neat little device. It’s an NXP 74ALVC164245DL. In addition to having an incredibly long and seemingly meaningless part number, it contains a pair of bi-directional octal ports. It runs very fast (about 333 MHz) and supports voltages up to 5V on one side, and up to 3.3V on the other. As long as you stay below those maximums you can choose your own target voltages. To do so, he included a couple of adjustable voltage LDOs which are set using jumpers.
But wait, [Andy's] not finished quite yet. If the jumpers don’t offer the target voltage you’re looking for he also included breakout pins so that you may inject the voltage using an external source. He even included the option to use the LDOs on their own, without the level converter. How do you keep all of these configurations straight? He build a little web form that lets you set your desired parameters and it tells you which jumper should be connected.
You’ve got several devices which communicate via the I2C protocol, but some of them can only operate at 3.3V while the rest are hungry for a 5V connection. What to do? [Linux-works] built this I2C level converter to solve the problem.
The circuit comes from an NXP app note (PDF) on the issue. You can take a quick peek at the suggested schematic from that document. The design uses two MOSFETS for each side of the adaptor. Perhaps a better way to explain this is that you need one for the higher voltage and one for the lower voltage on each of the two data lines for a total of four parts. This allows for both of the buses to communicate as one, while still having their own 3.3V and 5V pull-up resistors.
[Linux-works] concedes that there are chips designed to do this for you, but he was able to source the BSS138 MOSFETs locally and for about ten cents a piece. Not a bad alternative to putting in a parts order.