请教:关于touch中读触摸屏命令的不解的地方。
for(i=0; i<10; i++){
CS_0();
WriteDataTo7843(TOUCH_MSR_X); /* read X */
tmpx = SPI_WriteByte(0x00)<<4; /* read MSB bit */
tmpx |= ((SPI_WriteByte(TOUCH_MSR_Y)>>4)&0x0F ); /* read LSB bit */这个怎么是读 X的?
tmpy = SPI_WriteByte(0x00)<<4; /* read MSB bit */00命令是什么作用?
tmpy |= ((SPI_WriteByte(0x00)>>4)&0x0F ); /* read LSB bit */
WriteDataTo7843( 1<<7 ); /* 打开中断 */
CS_1();
}
WriteDataTo7843(TOUCH_MSR_Y);我理解是只有这句才能够读 Y的。怎么变成X???
WriteDataTo7843( 1<<7 ); /* 打开中断 */
这一句话怎么打开中断 了。?? 可以多加一条分开写
http://cache.amobbs.com/bbs_upload782111/files_49/ourdev_705451VPDPV5.jpg
FIGURE 6. Conversion Timing, 16 Clocks per Conversion, 8-bit Bus Interface. No DCLK Delay Required with Dedicated Serial Port. (原文件名:Conversion_Timing.jpg) 回复【1楼】aozima
可以多加一条分开写
figure 6. conversion timing, 16 clocks per conversion, 8-bit bus interface. no dclk delay required with dedicated serial port. (原文件名:conversion_timing.jpg)
-----------------------------------------------------------------------
解释的非常好的, 感谢,万分 tmpx |= ((SPI_WriteByte(TOUCH_MSR_Y)>>4)&0x0F ); /* read LSB bit */这个怎么是读 X的?
这句话实现了两个目的,第一个目的为了接受X坐标的第二个字节数据提供时钟,第二个目的,想控制芯片发送读取Y坐标的控制字。
页:
[1]