Help!!!!!! how to attach a touch screen to my LPC1769??

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Help!!!!!! how to attach a touch screen to my LPC1769??

2,315 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0105540 on Fri Aug 29 20:39:21 MST 2014
Hi, everyone~
Recently I am doing a project which is developed based on the LPC1769. One of the features we have requires to use a touch screen. However, we have no idea which touch screen to use and how to use. The size we need is around 3 to 5 inches.
As beginners, I sincerely call for your help~~!!
标签 (1)
0 项奖励
回复
10 回复数

1,881 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Sep 03 04:52:11 MST 2014

Quote: a0105540
But i tell you the type no.: XPT2046.



Mazeltov, XPT2046 is a Touch Screen Controller IC  :bigsmile:
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0105540 on Wed Sep 03 04:46:54 MST 2014
Oops, sorry i forgot to post the picture of my touch screen~
Here is the picture. By the way, the controller's chip is so small that the picture is quite vague. But i tell you the type no.: XPT2046.
Thank you so much for teaching me a lot of things. And also many thanks to Labrat. ^^ I think i'd better go to read them carefully and take some time to digest.
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Wed Sep 03 03:19:39 MST 2014

Quote: LabRat
And some of them use a Touch Screen Controller like ADS7846, which is doing this things for you.


-That definitely saves a lot of headace (and code-space). As a bonus, it also keep you from having to squash bugs in your code that compensates for errors all the time. ;)
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Sep 03 02:47:55 MST 2014

Quote: Pacman
Many touch-screen modules use resistive touch interface.



And some of them use a Touch Screen Controller like ADS7846, which is doing this things for you  :bigsmile:
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Wed Sep 03 02:22:43 MST 2014
If you can post a high quality photo of the module, where the pin names are visible, it might help.
-Also try posting a close-up of the driver-chip.

The link LabRat posted looks very useful as well - even if it is not compatible with your board directly, you will be able to see how communication can be done. This is really a timesaver; thank you, LabRat!

Many touch-screen modules use resistive touch interface. This is a 4-wire interface, and you usually connect them to GPIO ports, where two of the GPIO ports have an ADC as well, so you can switch between GPIO and ADC.

Search using your favourite search-engine:
touch screen resistive interfacing

The following document, written by NXP, gives great insight in how interfacing is done:
AN10675.pdf

[color=#999]?: Why do I use 'websearch.com' ?
!: It's much more light-weight than Google, and it's fairly quick.
[/color]
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Sep 03 00:08:09 MST 2014
I'm not sure which kind of beginner you are (C, LPCXpresso, Cortex...)  :)

Anyway, a sample of LCD and TouchPanel Firmware functions for their own ILI9431 Adapter is shown here:

https://github.com/watterott/MI0283QT-Adapter/tree/master/fw

This should give you an idea how ILI9341 is working and how TouchPanel functions can be done  8-)
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0105540 on Tue Sep 02 23:13:06 MST 2014
Hi, thank you for your advice, which actually helps us a LOT!
By the way, how do know the function of the pins of the TFT_320QVT? The command table tells us about the controller but we have no idea about the touch screen :( Therefore, we cannot connect the pins correctly to our LPC1769 board. Do you have any suggestions?
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sun Aug 31 10:26:26 MST 2014
Sometimes you'll receive a reply straight away, sometimes a months may go by, or you'll never get an answer.
It all depends on many things, including difficulty of the question and how much information you provide.

When I searched for TFT_320QVT, I found this site, which contains some useful information.
The display will probably work fine with the LPC1769.
You have a couple of options...
1: Use the SPI interface (less wires, need a bit of setup-code.
2: Use the 16-bit Parallel-interface (requires a lot of wires, you need to write your own code that has timings correct, etc.)

Since #1 is the simplest, I recommend going for this approach.
I have no experience with using driver-based TFT displays yet, so I can't go into details there.
But look at the driver on the board, find its name, then search for the name followed by filetype:pdf; example:
SSD1289 filetype:pdf


In the PDF-file you find, you will find a command-table, which you need. You'll also find information on the power-up sequence and power-down sequence (eg. the order you need to send the commands in).

(I don't know exactly which driver your board is using, but if it's not the above mentioned one, it might be SSD1306 or SSD1351 - then again, it could also be a completely different driver)

Once you've connected your MOSI, MISO and SCK signals, you'll need to set up the SPI on your LPC1769.

-Instead of using the SPI, the LPC1769 offers the SSP, which I really would like to recommend instead. The SSP is much more flexible and I find it easier to understand / set up. So use the pins called MOSI0, MISO0 and SCK0 for example.

Find an example here on this site, which shows you how to set up the SPI or SSP. The file lpc175x_6x_cmsis_driver_library.zip might be a good one to get; it contains a heap of examples, including some SSP and SPI examples.
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0105540 on Sun Aug 31 02:59:08 MST 2014
OMG, thank you so much for your response. I didn't expect to have this answer so soon~!
Yeah, when I checked the LCD you recommend, it is pretty suitable for us beginners.
Yesterday, my friend rushed to an electronic device store and bought a TFT_320QVT LCD. I couldn't find any datasheet for it online.
Is this LCD compatible with the LPC1769? Do I need to write drive for it as well?
0 项奖励
回复

1,880 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Fri Aug 29 23:50:15 MST 2014
There are several kinds of touch screens available.

The LPC1769 does not have a built-in LCD controller, so if you're going to use a fast TFT display that requires HSync, VSync and RGB data signals, you'll have to write the driver yourself. Not impossible, but probably a challenge for beginners.

On the other hand, you could choose a slower LCD display, one you can send commands to via 8-bit interface, 16-bit interface or SPI. These are fairly cheap. A number of different sizes and types exists. I recommend you go for one that uses SPI interface, so that connecting the display will be fairly easy. For instance 320x240.
-In addition, this particular display module has a SD/MMC card slot which you can use for other fun later.

This particular module seems to have a touch-screen driver on-board. That means it will make your job easier than if you had to read the touch-signals using ADC yourself.
-But as I can't see anywhere what the driver is called, you'll have to get the datasheet once you receive the module (or ask the seller if the seller can provide a datasheet for the touch-screen driver).
0 项奖励
回复