I am working on a project to create a touch screen that will enable the user to control a robotic device whilst receiving data and video from the device controlled.
I am completely new to TFT LCD technology, and was slightly daunted by the complexity of these devices. I am still on the uphill of the learning curve...
The has an FSMC ( Flexible Static Memory Controller ) which supports the connection of an LCD in parallel mode. I have 3 STM32F4 Discovery boards, so I decided to use one to control the HY32D TFT LCD I bought off Ebay, with absolutely useless example code for an 8051 type microcontroller.
There are a few examples on the web of the STM32F4 Discovery used in projects with the same controller that the HY32D uses, the SSD1289 from Soloman Systech Ltd.
The table below lists the connections used in the fractal drawing program...the touch control is not yet used.
LCD pin name
STM32F4 Pin number
STM32F4 pin name
+3V(1K Pull up) or GPIO
I will send code for the fractal drawing to whoever asks, just send me your email. I have now (12/06/2012) also added it to Google project hosting.
It should be available to download here.
The code is not mine, a very helpful fellow Engineer sent it to me.
I will be working on creating a touch menu next and will update soon hopefully.
I have managed finally to convert a .jpg image into a C array and get it displayed on the HY32D TFT LCD, touch screen works also, although I do have to write a better calibration routine.
I converted the .jpg using the RGB565 converter from ST Micro which is available as part of the STM Embedded resources GUI
Decided to start on a touch menu now...could not resist putting direction arrows on..left, right, up, and down, and next a menu button in the middle. Why? Well I am taking small steps and will work up to displaying data next, to start with I am going to attempt to write a calibration routine for the touch screen, and then get each button to control direction of 2 DC motors...eventually the buttons will operate a circuit designed to transmit a 'direction signal' using 2.4GHz RF.
a pic of the screen so far...4 buttons no menu yet, each arrow is 50x50 pixels in size.
A word of caution...I am using IAR Embedded Workbench for ARM version 6.30.8. I had to increase the STACK size to be able to store these images..no point me going into too much detail, as I do not yet quite understand it properly, if you have the same problems let me know and I can at least guide you through what I have done so far...
Another pic...this one one includes the STM32F4 Discovery board in the background...on a breadboard ( just for convenience! )
And below the Arrow image..
I am trying to calibrate the touch screen (ADS7843) and the results so far are quite strange to see...
Getting a lot of help from Megahercas with the code for this project..Thanks again to Megahercas.
The video below is proof that there is hope for me yet!