SPI interface with TFT LCD (LPC1114)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI interface with TFT LCD (LPC1114)

726 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by EI24 on Sun Jul 12 06:39:43 MST 2015
Hi, i am trying to interface with 1.8 TFT LCD with SPI, using a LPC1114 based board. I have interfaced with the display using a AVR MCU before, so the display setup should not be the issue. I have corrected numerous errors, but don't find any more. The PIO2_1 pin(pin 13 on the board) is selected as SSP1 SCK, and goes to the SPI clock input on the display module. The PIO2_3 pin(pin 38 on the board) goes to the MOSI input. And the PIO2_4 pin(pin 19 on the board) goes to the Data/Command input. TFT_CS input on the display module is connected to ground, it isn't needed to stop the interface sense a 0x00 sends a no operation command.
I'm using a JLink debug probe and assemble the program with GCC ARM embedded toolchain, which works.

Here is my code:
https://gist.github.com/anonymous/6b2de716c90ea956f680

MCU board: https://www.olimex.com/Products/ARM/NXP/LPC-H1114/resources/LPC-H1114_rev_B.pdf
Display driver: http://www.adafruit.com/datasheets/ST7735R_V0.2.pdf

Thanks for any feedback!
Labels (1)
0 Kudos
1 Reply

596 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by EI24 on Sun Jul 19 07:09:28 MST 2015
I've found two errors. It seems you need to enable the AHB clock to the IOCONFIG block, before you can set the pin functions. I thought that was that was activated by default. You also need to set the SSP1CPSR register to 2, so that the SPI1 clock i prescaled for the SPI to work properly. Also i changed the frame size to 8-bit instead of 16-bit to make the program more simple. Though it still does not work. I have also checked the definition multiple times and they are correct. I think the problem may lay in the functions, or something more with the SPI setup. 
0 Kudos