发信人:
mcugirl 发表时间:
2003-04-28 11:16:09
--------------------------------------------------------------------------------
网上的好多朋友让我用RC500,但我现在是做毕业设计,系统所用的芯片早已经由导师定下了,我所做的工作只是连接一下电路和写程序。 恳请大家帮帮忙,能够给我程序做参考,汇编和C的都可以。可以直接在论坛上贴出来,发邮件给我也可以,我的邮箱
[email protected] 谢谢大家的帮助。
发信人:
cwcyxy 发表时间:
2003-04-28 11:44:54
--------------------------------------------------------------------------------
// STACON
#define _DV 0x80
#define _TE 0x40
#define _PE 0x20
#define _CE 0x10
#define _BE 0x08
#define _AE 0x04
#define _SOR 0x80
#define _RFS 0x40
#define _MI1 0x04
#define _NRF 0x02
#define _AC 0x01
// ENABLE
#define _PEN 0x80
#define _PRE 0x40
#define _CEN 0x20
#define _CRE 0x10
// KEYADR
#define _AUTH 0x80
#define _LOAD 0x00
#define _KEYB 0x40
#define _KEYA 0x00
// Error codes
#define OK 0
#define W_NOCARD 5
#define W_NOTAG 1
#define W_CRC 2
#define W_EMPTY 3
#define W_AUTH 4
#define W_PARITY 5
#define W_code 6
#define W_SERNR 8
#define W_NOTAUTH 10
#define W_bitCNT 11
#define W_BYTECNT 12
#define W_TRANS 14
#define W_WRITE 15
#define W_INCR 16
#define W_DECR 17
#define W_READ 18
#define W_NO_VCC 06
#define W_ICC_Type_Error 12
#define QUIT 30
//Hardware Addresses
#define PBYTE ((unsigned char volatile *) 0x30000L)
#define PBYTE ((unsigned char volatile pdata *)0)
#define MCM_data PBYTE[0x00]
#define MCM_STACON PBYTE[0x01]
#define MCM_ENABLE PBYTE[0x02]
#define MCM_BCNTS PBYTE[0x03]
#define MCM_BCNTR PBYTE[0x04]
#define MCM_BAUDRATE PBYTE[0x05]
#define MCM_TOC PBYTE[0x06]
#define MCM_MODE PBYTE[0x07]
#define MCM_CRCdata PBYTE[0x08]
#define MCM_CRCSTACON PBYTE[0x09]
#define MCM_KEYdata PBYTE[0x0A]
#define MCM_KEYSTACON PBYTE[0x0B]
#define MCM_KEYADR PBYTE[0x0C]
#define MCM_Rcode PBYTE[0x0E]
/****************************************************************************
* Function: mifs_authentication *
****************************************************************************/
BYTE mifs_authentication(BYTE _Mode, BYTE _SecNr)
{
BYTE _Fkt;
BYTE _Status;
BYTE _Ret
code;
TOGGLE_WD();
if (_Mode & KEYB)
{
_Fkt = 0x61;
_SecNr |= _KEYB;
}
else
{
_Fkt = 0x60;
_SecNr |= _KEYA;
}
MCM_TOC = 10;
//TIMEOUT;
MCM_BCNTS = 16;
MCM_KEYSTACON = _AUTH | (_Mode & 0x03);
MCM_KEYADR = _AUTH | _SecNr;
MCM_
data = _Fkt;
MCM_
data = _SecNr << 2;
while (!((_Status = MCM_STACON) & _DV))TOGGLE_WD();
MCM_TOC = 0;
if (_Status & (_TE | _AE | _PE | _BE))
{
if (_Status & _TE)
{
_Ret
code = W_NOTAG;
}
else
{
if (_Status & _AE)
{
_Ret
code = W_AUTH;
}
else
{
if (_Status & _PE)
{
_Ret
code = W_PARITY;
}
else
{
delay_50us(10);
if ((MCM_
data & 0x0A) == 0x00)
{
_Ret
code = W_AUTH;
}
else
{
_Ret
code = W_
bitCNT;
}
}
}
}
}
else
{
_Ret
code = OK;
}
return (_Ret
code);
}
/****************************************************************************
* Function: mifs_read *
****************************************************************************/
BYTE mifs_read(BYTE _Adr, BYTE
idata *_
data)
{
BYTE i;
BYTE _Status;
BYTE _Ret
code;
BYTE
idata _Tem
pdata[16];
TOGGLE_WD();
MCM_BCNTS = 16;
MCM_BCNTR = 128;
MCM_
data = 0x30;
MCM_
data = _Adr;
MCM_TOC = 10;
//TIMEOUT;
while (!((_Status = MCM_STACON) & _DV))TOGGLE_WD();
MCM_TOC = 0;
if (_Status & (_TE | _BE | _PE | _CE))
{
if (_Status & _TE)
{
_Ret
code = W_NOTAG;
}
else
{
if (_Status & _BE)
{
delay_50us(31);
// min. 1.5 ms
i = MCM_
data;
if (!(MCM_STACON & _DV))
{
if ((i & 0x0B) == 0x00)
{
_Ret
code = W_NOTAUTH;
}
else
{
_Ret
code = W_READ;
}
}
else
{
_Ret
code = W_READ;
}
}
else
{
if (_Status & _PE)
{
_Ret
code = W_PARITY;
}
else
{
_Ret
code = W_CRC;
}
}
}
}
else
{
for (i = 0; i < 16; i )
{
_
data = MCM_
data;
}
for (i = 0; i < 16; i )
{
_Tem
pdata = MCM_
data;
}
if (memcmp(_
data, _Tem
pdata, 16))
{
_Ret
code = W_BYTECNT;
}
else
{
_Ret
code = OK;
}
}
return (_Ret
code);
}
发信人:
mcugirl 发表时间:
2003-04-28 12:23:28
--------------------------------------------------------------------------------
发信人:
zbs9013 发表时间:
2003-04-28 12:32:49
--------------------------------------------------------------------------------
我在考虑,但他们的芯片没有完全集成,需要自己解调,所以解调这部分是关键,不知道你做得怎么样了??????可以一起讨论一下,
[email protected]
发信人:
zbs9013 发表时间:
2003-04-28 12:38:01
--------------------------------------------------------------------------------
请问各位同行,有谁做过sony的FILICA射频卡读卡器,可以探讨一下吗?
发信人:
zbs9013 发表时间:
2003-04-28 12:41:38
--------------------------------------------------------------------------------
做过上海华虹的射频卡读卡器的朋友,可以一起讨论一下吗?
发信人:
cwcyxy 发表时间:
2003-04-28 13:01:35
--------------------------------------------------------------------------------
华虹的周钰在吗?
发信人:
qin_peng 发表时间:
2003-04-28 17:26:29
--------------------------------------------------------------------------------
tpu兄能否给我一些帮助,我现在正在作531的程序。
发信人:
tpu 发表时间:
2003-04-28 21:03:12
--------------------------------------------------------------------------------
你碰到什么问题了吗?
发信人:
zbs9013 发表时间:
2003-04-29 12:33:02
--------------------------------------------------------------------------------
讨论一下解调电路的最佳实现,可以吗?华虹的工程师不愿意告诉我们有关他们射频输出阻抗,最佳阻抗匹配时的纯阻抗该取多大,我认为这样我们很难做出一个性能最佳的解调及发射发射电路出来,不知道你怎样认为
发信人:
jiangbo123 发表时间:
2003-04-29 12:40:15
--------------------------------------------------------------------------------
发信人:
cwcyxy 发表时间:
2003-04-29 13:15:18
--------------------------------------------------------------------------------
不知你得到的华虹模块是什么型号?
我知道他们有1701,1702,1703,1704等几款,都是带调制解调的。
用户只需按华虹提供的连接方式,连接天线即可工作。
至于你想知道他们的模拟部分的工作原理,我想他们是不会告诉你的,
不过我分析过JemPlus和以前联士现在叫华士的模拟部分,只是不知你想
了解什么?欢迎讨论关于卡类读写的问题。
发信人:
cwcyxy 发表时间:
2003-04-29 13:26:50
--------------------------------------------------------------------------------
你向stevenCH提的问题,我看到了,我想应该是你设计的毛病,
在2001年的6月,我设计rc500的pcb时,也出现过你所说的问题,
由于当时应用的机具种类较多,有的出现,而有的没出现,后来我们公
司将此当一专题讨论,认定是EMC的问题,以后将我设计的没有问题的关
于RC500的PCB当成样板了。我想你应当从EMC的方面找找毛病,希望早
日成功。
stevenCH在rc500方面应比我有经验,但他在实际应用方面不如我,
希望大家能从此得到一些帮助。
发信人:
jiangbo123 发表时间:
2003-04-29 13:46:52
--------------------------------------------------------------------------------
感谢你的指点,我回去做做试验。
发信人:
littony 发表时间:
2003-04-29 14:18:43
--------------------------------------------------------------------------------
各位朋友:
大家好!
现有一项目求合作,我是做软件的,现在开发了一套针对学生的领书系统(用的是id卡,您也知道这个系统的硬件复杂度不高,我从任何一家公司买来的id卡和id卡阅读器都能用,开发软件的时候不需要对硬件进行考虑,软件中读的是id卡的唯一序列号),现在我们想把它换成ic卡(mifare 1或其他)的系统---因为id卡安全性不高。我们还想把卡作为电子钱包用,比如用在机房收费上(软件我已有,也是id卡系统),另我们还想在软件或卡上加密,这样我卖出去的系统,别的公司的卡或读写器就用不来:),不知我们该怎样合作才能使我们的合作成功?(我是只要调用你们的产品的函数就行了呢,还是要在此基础上针对硬件和软件进行再次开发?软件我想用我自己的)有资料的话请发份资料过来,忘赐教!谢谢!
赵永江
[email protected]
oicq:11647952
发信人:
qin_peng 发表时间:
2003-04-29 15:27:27
--------------------------------------------------------------------------------
request过不去,我用的是inside的卡typeb/15693 的卡片,philips rc531, typeb的 request不是每次都过不去,偶尔可以,但mifare的很顺利。
发信人:
tpu 发表时间:
2003-04-29 19:35:46
--------------------------------------------------------------------------------
你可以调节一下typeb的有关参数
发信人:
qin_peng 发表时间:
2003-04-30 08:21:56
--------------------------------------------------------------------------------
参数已经调节过了,和您以前说过的对比过,完全一样,但不行,不知531和500的天线是否一样?
发信人:
zbs9013 发表时间:
2003-04-30 12:39:09
--------------------------------------------------------------------------------
你说的都是模块,这些模块是由芯片和解调电路,发射电路等电路组成的,但他们的模块对于我们的产品来说太过于庞大了,我们需要采用他们的SHC1504芯片来完成开发。首先是发射电路,大致就是选频滤波,阻抗匹配,他们不愿意提供更多的参数,所以我不知道该如何来保证阻抗匹配。还有就是解调电路(也就是检波电路)我想采用二极管包络检波,具体的就是检波,低通滤波,比较,但我不知道效果会是怎么样的,高频运放我已经申请了,只是现在还没有空来做这个东西了,对于芯片开发,有关解调电路以及匹配电路,不知道你有什么好的建议?
发信人:
tpu 发表时间:
2003-04-30 12:58:55
--------------------------------------------------------------------------------
那么参数也应该不同。最好和我的不一样才对。
发信人:
lidaoke 发表时间:
2003-04-30 17:06:47
--------------------------------------------------------------------------------
在对rc500进行复位的时候原来有这样的语句:
while (((ReadRawIO(RegCommand) & 0x3F) != 0x3F) && !T2IR);
// while reset sequence in progress
while ((ReadRawIO(RegCommand) & 0x3F) && !T2IR);
其中的0x3F是命令寄存器(Command
register)的复位值吗?
datasheet上写Command
register的复位值是0x00,请解释一下好不?(我是用的PIC单片机做,感觉比较麻烦)
发信人:
zbmzy 发表时间:
2003-05-02 09:36:35
--------------------------------------------------------------------------------
我编译了demo输出hex文件26k感觉太大,26k是否正常。
由于我对keil不是很熟,编译出现以下警告,请问怎么处理。
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?M500PCDMFINOUTSLAVECONFIG?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
BL51 BANKED LINKER/LOCATER V5.00 04/29/2003 22:35:24 PAGE 43
SEGMENT: ?PR?M500PCDMFINOUTMASTERCONFIG?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PCDLOADMK?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PCDLOADKEYE2?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_PCDWRITEE2?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PCDWRITE
register?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PCDREAD
register?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PICCAUTHE2?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PICCVALUE?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PICCVALUEDE
bit?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_M500PICCEXCHANGEBLOCK?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?M500PICCHALT?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?IDLE_REQUEST?M500AUC
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?DELAY_8US_NOP?
main
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_XTOA_H?
main
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_XTOA_L?
main
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?CO?
main
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?OPENIO?RDIO
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?CLOSEIO?RDIO
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
SEGMENT: ?PR?_WRITEIOBLOCK?RDIO
*** WARNING L16: UNCALLED SEGMENT, IGNORED
for OVERLAY PROCESS
BL51 BANKED LINKER/LOCATER V5.00 04/29/2003 22:35:24 PAGE 44
SEGMENT: ?PR?_READIOBLOCK?RDIO
*** WARNING L1: UNRESOLVED
externAL SYMBOL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1559H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1563H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1569H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1573H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1579H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1597H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15A0H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15A9H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15B4H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15BDH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
BL51 BANKED LINKER/LOCATER V5.00 04/29/2003 22:35:24 PAGE 45
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15C2H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15CBH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15D4H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15DAH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15E3H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15EBH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 15F3H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1600H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1605H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 160AH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1613H
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
BL51 BANKED LINKER/LOCATER V5.00 04/29/2003 22:35:24 PAGE 46
ADDRESS: 161EH
*** WARNING L2: REFERENCE MADE TO UNRESOLVED
externAL
SYMBOL:
auto_BAUD
MODULE: M500AuC.obj (M500AUC)
ADDRESS: 1623H
发信人:
jiangbo123 发表时间:
2003-05-02 09:41:25
--------------------------------------------------------------------------------
UNCALLED SEGMENT是警告程序中有子函数没有被调用过。
REFERENCE MADE TO UNRESOLVED
externAL是程序中有变量或者标号没有定义,检查头文件是否包含正确。
发信人:
zbmzy 发表时间:
2003-05-02 09:52:06
--------------------------------------------------------------------------------
多谢!
我只是将demo编译了一下并没有修改,难道demo包含的头文件不对吗?请执教
发信人:
zbmzy 发表时间:
2003-05-02 09:56:15
--------------------------------------------------------------------------------
多谢!
输出26khex文件大小正常吗
我只是将demo编译了一下并没有修改,难道demo包含的头文件不对吗?请指教
发信人:
jiangbo123 发表时间:
2003-05-02 11:14:52
--------------------------------------------------------------------------------
发信人:
zhoujj 发表时间:
2003-05-04 16:12:01
--------------------------------------------------------------------------------
我在进行PcdReadE2的时候返回这个错误,mfrc500的资料上说这个错误和receive,transceive命令有关,和reade2无关
请问我应该如何解决,我是新手,进展好慢,真的很是需要各位大哥的帮忙!
发信人:
zhoujj 发表时间:
2003-05-04 16:31:09
--------------------------------------------------------------------------------
我就是一边看程序,一边看资料,也不知道给我的demo程序究竟如何,反正能编译通过就是了,问一些问题吗?无关痛痒的弱智问题都没有人回答,我也知道弱智,可是当时就是搞不出来啊,当然现在我还没有高出来,唉,只能靠我们自己了,反正尽力就行,至于能不能做出来是我们的能力和经验的问题,我刚参加工作半年多
发信人:
qin_peng 发表时间:
2003-05-06 09:11:12
--------------------------------------------------------------------------------
CPU为89C51RD2 该板只有CPU和RC531,我用RC531调试MIFARE没有问题,不知TYPEB有什么不同
发信人:
zbmzy 发表时间:
2003-05-07 22:33:55
--------------------------------------------------------------------------------
我编译的hex文件26k
用89c52怎么行?
发信人:
jiangbo123 发表时间:
2003-05-08 07:49:03
--------------------------------------------------------------------------------
hex文件并不是最终程序的大小,bin文件才反映程序的最终大小。你编译成bin文件会发现很小的。
发信人:
慕尼黑1860 发表时间:
2003-05-08 11:22:07
--------------------------------------------------------------------------------
发信人:
xlfdan 发表时间:
2003-05-08 21:40:22
--------------------------------------------------------------------------------
求Mifare资料光盘中pdf文件的打开密码!
我有光盘,没有密码,请大家帮忙,十分感谢!!!!
[email protected]
发信人:
zbs9013 发表时间:
2003-05-09 12:01:14
--------------------------------------------------------------------------------
我早期用的就是89C52来控制的,PHILIPS 提供的函数库考虑了很多情况,而且考虑到和ISO14443兼容,有很多的函数都有重复,实际上用到的很少,只需要读,写,VALUE,RESTORE等几个,编译后应该没有这么大
发信人:
zhoujj 发表时间:
2003-05-09 16:08:47
--------------------------------------------------------------------------------
发信人:
llbwcl 发表时间:
2003-05-10 13:05:48
--------------------------------------------------------------------------------
我已经用了华虹的SCH1704的模块和卡片,与MCM500接口兼容,只是它们之间的传输密码不同而已。
发信人:
zbmzy 发表时间:
2003-05-10 23:02:50
--------------------------------------------------------------------------------
发信人:
zbmzy 发表时间:
2003-05-10 23:09:08
--------------------------------------------------------------------------------
我的demo中没有
auto_BAUD
的代码,编译提示没有定义
auto_BAUD
请问
auto_BAUD是干什么的?
有人出现这种情况吗?