我使用包含MSP430G2553启动板和trf7970 BoosterPack的系统来模拟NFC标签。我根据延续的例子和Josh先生在TI网站上发布的xls文件(阅读示例)来配置trf7970a。
我的问题是:
在寄存器配置中,trf7970中读取模式和卡模拟模式的配置是否唯一不同?
如果我理解正确,我应该进行的修改是在trf7970a.c文件中。在以下代码中,我尝试配置B类标记。
void Trf7970InitialSettings(void) {
command[0] = 0x80;
Trf7970DirectCommand(command);
Data1[0] = 0x09;
Data1[1] = 0x01;
Data1[2] = 0x83;
Data1[3] = 0x80;
Trf7970WriteCont(Data1, 4);
#ifdef TRF7970A
command[0] = MODULATOR_CONTROL;
command[1] = 0x01; // ASK 100%, no SYS_CLK output
Trf7970WriteSingle(command, 2);
command[0] = 0x01;
command[1] = 0x25;
Trf7970WriteSingle(command, 2);
command[0] = 0x0B;
command[1] = 0x01;
Trf7970WriteSingle(command, 2);
command[0] = 0x0A;
command[1] = 0x3C;
Trf7970WriteSingle(command, 2);
command[0] = 0x18;
command[1] = 0x07;
Trf7970WriteSingle(command, 2);
//UID
Data1[0] = 0x37;
Data1[1] = 0x80;
Data1[2] = 0x12;
Data1[3] = 0x34;
Data1[4] = 0x56;
Trf7970WriteCont(Data1, 5);
//END UID
command[0] = 0x16;
command[1] = 0x03;
Trf7970WriteSingle(command, 2);
command[0] = 0x02;
command[1] = 0x00;
Trf7970WriteSingle(command, 2);
Data1[0] = 0x00;
Data1[1] = 0x20;
Data1[2] = 0x8F;
Data1[3] = 0x00;
Data1[4] = 0x96;
Data1[5] = 0x97;
Trf7970WriteCont(Data1, 6);
#endif
}
感谢您阅读我的问题。如果你有任何想法,那对我来说非常有价值,因为我是这个领域的新手。
Phu Nguyen。