ch10人机接口概述.pptVIP

  • 4
  • 0
  • 约3.1万字
  • 约 127页
  • 2016-11-12 发布于湖北
  • 举报
3.书写触摸屏中断服务程序,当有触笔按下时,转到中断服务程序执行。 while(rADCCON 0x1); //check if Enable_start is low while(!(rADCCON 0x8000)); //check if EC(End of Conversion) flag is high, This line is necessary~!! while(!(rSRCPND 0); //check if ADC is finished with interrupt bit /*获取X,Y坐标*/ xdata=(rADCDAT00x3ff); ydata=(rADCDAT10x3ff); ClearSubPending(BIT_SUB_TC); //ClearPending(BIT_ADC); rSRCPND = 0 rINTPND = 0 EnableSubIrq(BIT_SUB_TC); //EnableIrq(BIT_ADC); rINTMSK = 0x7fffffff; /****************stylus down************************/ 3.书写触摸屏

文档评论(0)

1亿VIP精品文档

相关文档