No.59803 作者:农民 邮件:zzf516@eyou.com ID:24247 登陆:2次 文章数:1篇 最后登陆IP:220.114.37.6 最后登陆:2004/8/16 9:08:56 注册:2004/8/5 18:10:58 财富:106 发帖时间:2004/8/5 18:15:44 发贴者IP:220.114.37.6 标题:农民:农民求救呀 4442卡! 摘要:No.59803农民求救呀 4442卡! [color=#DC143C] 请教各位呀: 我农民好不容易去写一个4442卡的读写程序。我发出读卡的命令,那卡就是没能识别出这是读卡的命令。结果读出来都是1。为什么呀! 我用的是430单片机。 读卡程序: void Read_main_ram(uchar Start_addr,uchar ByteCnt) { uchar i=0; Start(); SendByte(Control_word); SendByte(Start_addr); SendByte(0X00); Stop(); for (i = 0; i < ByteCnt; i++) //读取ByteCnt个数据 { Save_data_addr[i] = ReadByte(); } Break(); } uchar ReadByte(void) { uchar Read_data = 0; uchar i = 0; P2DIR &= ~SDA; for (i = 0; i < 8; i++ ) { Read_data = Read_data > > 1; ......
>>返回讨论的主题
|