Has anyone successfully interfaced a Waveshare Spotpear 3.2" display with MEGA?

Hello,

I have one such LCD TFT display intended for the Raspberry Pi. I believe it uses the SSD1289 controller. It runs in SPI mode. So I hooked one up with a Pi Cobbler, breadboard, logic-level shifter module (based on BSS138) and a spare MEGA.

I took the initialization code from Notro’s FBTFT and compared it with the code in UTFT for 8 and 16 bit parallel modes. Identical. The LCD does not have a WR line, so I connected MOSI, SCK, RS and RST. Hardwired CS to ground. Created a spi_transfer function (while SPSR != (1<<SPIF)) and wrote the initialization code to it. To my shock, it didn’t do squat. As an aside, why are these modules so ridiculously hard to get working? The typical “white screen” that everyone posts about.

Anyway, most discussion on the SSD1289 centers around the 8 or 16 bit parallel modes. Would like to eventually port something to the DUE and go DMA with it, sort of like the superb ILI9341_DUE library which is insanely fast…

I may be wrong, and I should say I don't have one of those displays, but I seem to remember reading somewhere it is not possible to hardwire CS, try using a port line and see what happens....

Regards,

Graham

Hi Graham,

I did some snooping on the CS,SCK,MOSI,RS,RST lines off of the Raspberry Pi by interfacing with the Arduino DUE. The voltages are correct and the DUE is fast enough to scan for a state change on one of those five pins and save it to an array. I edited /etc/modules on the Raspberry to change the speed parameter from 48 million to 1 million. I had the DUE wait for a change on RST to start loading data into an array. Did some post-processing on the data, basically looking for every line with SCK==1. Collecting groups of 8 bits (MOSI) and created the actual data stream in hexadecimal. The result was exactly the initialization for the ILI9341! Indeed this morning someone from Waveshare wrote me back to say the 3.2" uses the 9341.

Sigh... So whomever it was on the Raspberry forum that said the W/S 3.2" uses the SSD1289, was mistaken :D