Raspberry Pi Touch Screen LCD

October 10, 2012 at 7:18 PM



I have just received a 4D Systems µLCD-32PT Touch display to hook up to a Raspberry Pi.  This is not a display for connecting to the Pi's video output, but rather the UART for bespoke applications.

Thankfully the voltages are compatible, so you can connect the µLCD-32PT directly to the Pi's GPIO port, to both power and communicate with it.

Connecting the Raspberry Pi to a uLCD-32PTThe software tools provided are Windows based and I doubt you can get them to run on the Pi itself. I'd rather develop on my more powerful desktop PC anyway, with it's comfy chair, and multiple monitors. So long as the Pi is accessible via the LAN, then there is an easy solution.

My desktop is not Windows either, it's Linux/KDE. But I run Windows XP in VirtualBox, and works just the same.


Firstly on the Pi, I installed socat

 apt-get install socat

If you have not done so already, you need to free up /dev/ttyAMA0 device, which is the UART port. As default, the Raspberry Pi Debian distro uses it for a console. You do this by editing the /etc/initab file and commenting out the following line before rebooting.

 2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Then run socat. I am using port 1234. (default baud rate here is 9600)

 socat tcp-l:1234,reuseaddr,fork /dev/ttyAMA0,raw,b9600,echo=0,ocrnl=1

On Windows, I installed one of my favourite Windows utilities, com0com.  If you ever have to do any comm's work on Windows, it's a very handy tool. You will also need com2tcp, which is a separate .exe file from the same project.  (Get the com2tcp-386 zip)

com0com sets up two new com ports on your Windows machine. In my case COM11 & COM12, which com0com bridges together. Data sent to COM11 comes out on COM12, and vice-versa. Com2tcp bridges COM11 to the Raspberry Pi over your LAN, exposing it on COM12 for your applications to use.

Run it from the windows command prompt:

 com2tcp --baud 9600 --ignore-dsr \\.\COM11 1234

Now run the 4D Systems utilities supplied on COM12 (or whatever your com0com secondary port is)

Tags: Raspberry Pi Touch Screen


Stuart Johnson
e-mail: stuart@logicethos.com

blog comments powered by Disqus