PSOC 4 / 4M 240 x 320 TFT mcufriend

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I have some of the early cheap TFT displays, 240 x 320. I have been able to get them up

and running on Arduino, but vastly prefer doing it on a PSOC 4 because of other project

goals. I found the attached project. It used a bootloader, which I deleted off the project

as I am using pioneer type boards, both PSOC 4 and 4M.

In all cases I see a blank display. Tried on both 4 and 4M boards

SCK levels, configed in PSOC project as R Pullup, do not look good at all. Same

true for MOSI coming out of the PSOC. So I set MOSI out of the PSOC as strong

drive, that cleaned it up. There are no other chips sharing MOSI. But of course I cannot do that

to SCK.

So wondering if anyone has gotten this to run on PSOC ? As evidenced by the project

I found on web.

Display controller is ILI9341. See attached pinout.

Hardware - | Mbed

Regards, Dana.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Hi Dana.

I have several old projects:

TFT240_320_SD.zip           here

TFT240x320_ECG_Simulator.zip         here

and a little for PSoC5 here:  emWin 5.46 and FlexColor

but I was able to get them to work only for SPIM -> Advanced -> External Clock (2-24 mHz)

And all contacts - Drive mode = Strong drive

Check out the test case below.

But your display has a Parallel 8-bit interface, with 4 control lines.

You need another way to connect (GraphicLCDIntf).

Evgeniy.

View solution in original post

6 Replies
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Hi Dana.

I have several old projects:

TFT240_320_SD.zip           here

TFT240x320_ECG_Simulator.zip         here

and a little for PSoC5 here:  emWin 5.46 and FlexColor

but I was able to get them to work only for SPIM -> Advanced -> External Clock (2-24 mHz)

And all contacts - Drive mode = Strong drive

Check out the test case below.

But your display has a Parallel 8-bit interface, with 4 control lines.

You need another way to connect (GraphicLCDIntf).

Evgeniy.

Thanks for the reply, I too just discovered its parallel only as the serial capability

is dedicated to the SD Card. Feel like an idiot.

But thanks for posting the projects, Your projects useful when I pick up some

SPI displays. Which I plan on doing in the near future.

So community anyone out there with a parallel 8 bit solution for mcufriend display ?

Regards, Dana.

I used the parallel interface in the projects  S5320.zip   and  NOKIA_MC2PA8201.zip    (Control Reg -> PIN) 

and   WG240128_5LP.zip (GraphicLCDIntf) 

In your case it is enough to use GraphicLCDIntf instead of SPIM

and replace / rewrite commands:

void TFT_SendCMD (uint8_t cmd)

void TFT_WriteData (uint8_t Data)LCD.jpg

0 Likes

Evgeniy, I have ported one of your projects to PSOC 4 and got it to compile, still no display

function, just white screen. I have to admit I was surprised how easy that was per your

instructions.

Using a working Arduino I get this dump, not sure what controller is in part -

diagnose any controller

reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...

reg(0x0004) 00 00 00 00 Manufacturer ID

reg(0x0009) 00 00 61 00 00 Status Register

reg(0x000A) 00 08 Get Power Mode

reg(0x000C) 00 06 Get Pixel Format

reg(0x0030) 00 00 00 00 00 PTLAR

reg(0x0033) 00 00 00 00 00 00 00 VSCRLDEF

reg(0x0061) 00 00 RDID1 HX8347-G

reg(0x0062) 00 00 RDID2 HX8347-G

reg(0x0063) 00 00 RDID3 HX8347-G

reg(0x0064) 00 00 RDID1 HX8347-A

reg(0x0065) 00 00 RDID2 HX8347-A

reg(0x0066) 00 00 RDID3 HX8347-A

reg(0x0067) 00 00 RDID Himax HX8347-A

reg(0x0070) 00 00 Panel Himax HX8347-A

reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963

reg(0x00B0) 00 00 RGB Interface Signal Control

reg(0x00B3) 00 00 1B 1B 1B Frame Memory

reg(0x00B4) 00 02 Frame Mode

reg(0x00B6) 00 0A 82 27 04 Display Control

reg(0x00B7) 00 06 Entry Mode Set

reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B

reg(0x00C0) 00 21 00 00 00 00 00 00 00 Panel Control

reg(0x00C1) 00 10 10 10 Display Timing

reg(0x00C5) 00 31 Frame Rate

reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA

reg(0x00CC) 00 72 Panel Control

reg(0x00D0) 00 00 00 00 Power Control

reg(0x00D1) 00 00 00 00 VCOM Control

reg(0x00D2) 00 00 00 Power Normal

reg(0x00D3) 00 00 93 41 ILI9341, ILI9488

reg(0x00D4) 00 00 00 00 Novatek

reg(0x00DA) 00 00 RDID1

reg(0x00DB) 00 00 RDID2

reg(0x00DC) 00 00 RDID3

reg(0x00E0) 00 0F 16 14 0A 0D 06 43 75 33 06 0E 00 0C 09 08 GAMMA-P

reg(0x00E1) 00 08 2B 2D 04 10 04 3E 24 4E 04 0F 0E 35 38 0F GAMMA-N

reg(0x00EF) 00 03 80 02 02 02 ILI9327

reg(0x00F2) 00 02 02 02 02 02 02 02 02 02 02 02 Adjust Control 2

reg(0x00F6) 00 01 00 00 Interface Control

I have not done a bus analysis yet on PSOC 4, but all pins seem to look like they are

"talking" properly to display. 8 bit parallel mode.

Any clues would be welcomed.

Regards, Dana.

0 Likes

Evgeniy, looks like I had a bad display, another seems to be working, running your

Test and EEG waveform plotter.

Can't thank you enough, big help.

Regards, Dana.

0 Likes

Hi Dana!

I'm glad it worked out.

The files TFT.h and TFT.c must be for a specific display.

Especially the void TFT_Init (uint8_t orient) function

Good luck! Evgeniy.