Author Topic: Need help.... Got Help, Thanks (AD7873 Touchscreen digitizier)  (Read 2198 times)

0 Members and 1 Guest are viewing this topic.

Offline MyElectronsFellOutTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: gb
So I'm working on a new project involving touch screens (my first foray).

I'm using the following parts:

AD7873  http://docs-europe.electrocomponents.com/webdocs/0712/0900766b80712812.pdf
DT028ATFT-TS   http://docs-europe.electrocomponents.com/webdocs/120b/0900766b8120b294.pdf

My problem breaks down as follows.

How do I read the data? The datasheets and app notes are next to useless (to me anyway). I'm running this on an ATSAM3x8e micro controller using the SPI interface to talk to the touchscreen digitizer but have no idea what data I need to send it in order to get the touchscreen coordinates.

Does anyone have experience with these parts or any reference code?

Thanks.
« Last Edit: July 05, 2016, 09:20:48 am by MyElectronsFellOut »
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 2008
  • Country: ch
Re: Need help....
« Reply #1 on: July 04, 2016, 10:54:01 am »
Pages 19-21 of the AD7873 datasheet tell you all you need.

You can either bitbang the required data, or as it is apprently SPI-compatible use an SPI module of your microcontroller to send/read the data if it has one.
Basically you send an 8-bit control word with the bits set accordingly to the operation you want the chip to perform, and you then send 2 more dummy 8-bit words (contents arbitrary as long as the START bit is not set) in order to read the response.

Find yourself some SPI bus docs to get a more general background over how it works.
 

Offline MyElectronsFellOutTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: gb
Re: Need help....
« Reply #2 on: July 04, 2016, 02:29:50 pm »
I understand the SPI interface and how to communicate with the chip, what I don't understand is how to get the X and Y coordinates. The table on the datasheet is not very clear as there are various different measurement modes. It doesn't tell you what the output is for each different code except for the one that says "Outputs Identity Code 1000 000 000".
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Need help....
« Reply #3 on: July 04, 2016, 02:49:14 pm »
See table 5 on page 14:
You need two measurements: Analog Input set to Y+ and X+ gives you raw data for x and y position.
 

Offline MyElectronsFellOutTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: gb
Re: Need help....
« Reply #4 on: July 04, 2016, 03:15:17 pm »
Thanks for that.
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 11204
  • Country: gb
Re: Need help....
« Reply #5 on: July 04, 2016, 04:32:49 pm »
Just a quick hint, just think how confusing things would get if everybody titled their threads 'Need help...' ;)

P.S. The good news is that it's not too late to change it. Just go to your original post and edit the 'Subject' line. It usually gets you more views too.
Best Regards, Chris
 
The following users thanked this post: MagicSmoker, prasimix, Kilrah

Offline MyElectronsFellOutTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: gb
Re: Need help.... Got Help, Thanks
« Reply #6 on: July 05, 2016, 07:09:26 am »
You are right, Think I was just having a very lazy day mentally lol
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 11204
  • Country: gb
Re: Need help.... Got Help, Thanks
« Reply #7 on: July 05, 2016, 08:39:20 am »
Quote
Re: Need help.... Got Help, Thanks

Well I was thinking more along the lines of 'AD7873 Touch Screen Digitizer help' but whatever floats your boat.  :(
Best Regards, Chris
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->