接触式存储卡技术-资料精品教育文档.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SmartCard 插卡识别程序 ? 常闭型卡座插卡识别程序 RECOG recog: jb SW,recog ;无卡插入则等待, Vcc= ? lcall delay-5ms ;延时去抖 jb SW,recog ;再次判断,无卡插入则等待 ret ;确实有卡插入,返回 SmartCard 任务的软件实现 AT24C** 的读 / 写操作模式: ? 写操作 ? 写字节( BYTE WRITE ) ? 写页面( PAGE WRITE ) ? 读操作 ? 现行地址读( CURRENT ADDRESS READ ) ? 随机寻址读( RADAM ADDRESS READ ) ? 顺序读( SEQUENTIAL READ ) SmartCard 写字节操作时序分析 SmartCard BYTE WRITE A write operation requires an 8-bit data word address following the device address word and acknowledgment. Upon receipt of this address, the EEPROM will again respond with a zero and then clock in the first 8-bit data word. Following receipt of the 8-bit data word, the EEPROM will output a zero and the addressing devi ce, such as a microcontroller, must terminate the write sequence with a stop condition.At this time the EEPROM enters an internally timed write cycle, tWR, to the nonvolatile memory. All inputs are disabled during this write cycle and the EEPROM will not respond until the write is complete SmartCard 写字节子程序 开始 STATR 送器件地址 DEVICE ADDRESS 送字节地址 WORD ADDRESS 写卡(送数据) DATA 停止 STOP 等待应答 ACK=0 ? 等待应答 ACK=0 ? 等待应答 ACK=0 ? 返回 N N N Y Y Y LCALL START ;开始 JC BACK1 ;确认总线有效 MOV A,#0A0H ;送器件地址到 A ,设置写 LCALL SHOUT ;输出器件地址到 IC 卡 JC FAULT1 ;判断是否有应答 MOV A,R0 ;从卡地址缓冲区取字地址 LCALL SHOUT ;输出字地址到 IC 卡 JC FAULT1 ;判断是否有应答 MOV A,R1 ;从写数据缓冲区取数据 LCALL SHOUT ;输出字地址到 IC 卡 JC FAULT1 ;判断是否有应答 CLR C ;设置操作成功标志 FAULT1: LCALL STOP ;停止 BACK1 : RET SmartCard 开始与停止时序 SDA SCL 开始 停止 SmartCard START STOP ? START CONDITION: A high-to-low transition of SDA with SCL high is a start condition which must precede any other command (refer to Start and Stop Definition timing diagram). ? STOP CONDITION: A low-to-high transition of SDA with SCL high is a stop co

文档评论(0)

magui + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8140007116000003

1亿VIP精品文档

相关文档