Hi e2e,
We have a customer starting a new design based on the ADS7846. They have the following questions:
What is the 12 bit output data format from the AD7846?
To get the 12 bits the AD7846 must be read twice.
The 2 8-bit bytes contain the 12 bits converted value but I don’t see anything that shows how the 12 bits are arranged.
(In the code attached I’ve taken a guess (divide by 8) but I not sure if I’m right.)
The code below is an attempt to implement the flowchart in FIGURE 10 in the Touch Screen Controller Tips pdf.
The PENIRQ interrupt is working fine every time the screen is touched the code goes to the interrupt function.
However the X and Y values I’m getting do not seem correct.
What values should I expect for X and Y when the touchscreen is touched in the following positions?
UPPER LEFT (0.0)
UPPER RIGHT (3FF,0)
LOWER LEFT (0,3FF)
LOWER RIGHT (3FF,3FF)
( I think I should be getting values close to those in the parentheses)
Another question, in the flowchart why is 0x00 1st sent to the AD7846 and then the control byte 0xD0 or 0x90?
If you can see anywhere that I’ve gone astray please let me know.
Once I start getting valid X and Y values I’ll start on calibration.
Code example
(Please visit the site to view this file)
Thanks for your help.
John Wiemeyer