第一个问题,TFT彩屏触摸功能中:
void WriteCharTo7843(unsigned char num) //SPI写数据
{
unsigned char count=0;
DCLK=0;
for(count=0;count<8;count++)
{
num<<=1;
DIN=CY;
DCLK=0; _nop_();_nop_();_nop_(); //上升沿有效
DCLK=1; _nop_();_nop_();_nop_();
}
}
这个函数的CY是什么?整个代码就这里出现了而已 谢谢帮忙解决。
第二个问题。
AD7843是这个触摸功能的控制芯片,它读取之后的值是怎么转换的。其本身是什么值呢?
void inttostr(int dd,unsigned char *str)
{
str[0]=dd/10000+48;
str[1]=(dd/1000)-((dd/10000)*10)+48;
str[2]=(dd/100)-((dd/1000)*10)+48;
str[3]=(dd/10)-((dd/100)*10)+48;
str[4]=dd-((dd/10)*10)+48;
str[5]=0;
}
为什么还有个48的呢 |