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 STM32F4 Discovery boardSTM32F4 Discovery board 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

D0

61

PD14

D1

62

PD15

D2

81

PD0

D3

82

PD1

D4

38

PE7

D5

39

PE8

D6

40

PE9

D7

41

PE10

D8

42

PE11

D9

43

PE12

D10

44

PE13

D11

45

PE14

D12

46

PE15

D13

55

PD8

D14

56

PD9

D15

57

PD10

CS

88

PD7   (NE1)

RS

60

PD11 (FSMC-A16)

RD

85

PD4   (NOE)

WR

86

PD5   (NWE)

RESET

 

+3V(1K Pull up) or GPIO

TP_IRQ

 

PD6

TP_SCK

52

PB13

TP_SI

54

PB15

TP_SO

53

PB14

TP_CS

51

PB12

BL_CNTL

69

PA10

 

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.

 

 

Update: 3/06/2012

 

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.

 

DSCF9730.JPG

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.

 

lcd_nav.jpg

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...

 

 

hy32dlcd+stm32f4.jpg

Another pic...this one one includes the STM32F4 Discovery board in the background...on a breadboard ( just for convenience! )

 

And below the Arrow image..

 

navup.png

 

Update: 08/06/2012

 

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!