Serial timing for touch screen controller

Thread Starter

Razor Concepts

Joined Oct 7, 2008
214
I am going to use a touch screen controller, an ADS7843, with a microcontroller. Here is the serial timing diagram:
http://i49.tinypic.com/io3vi1.png


Could somebody check my pseudocode and see if I have the right idea?

Rich (BB code):
low CS					//begin communication
while busy is high, wait		//wait for chip to start up

for(int i = 0; i < 7; i++)		//send command byte
{
send data through DIN
high DCLK
low DCLK
}


high DCLK				//dummy cycle
low DCLK
while busy is high, wait		//wait for chip to finish conversion


for(int i = 0; i < 11; i++)		//read x or y data over 12 cycles
{
high CLK
read data from DOUT
low CLK
}

for(int i = 0; i < 3; i++)		//finish up last three cycles, optional
{
high CLK
low CLK
}

high CS					//end communication
 
Top