else if (type == 'B')
{
ClearBitMask(RegControl,0x08);
WriteRawRC(RegClockQControl,0x0);
WriteRawRC(RegClockQControl,0x40); //0x3f, Q时钟控制
Delay_50us(2);
ClearBitMask(RegClockQControl,0x40);
WriteRawRC(RegTxControl,0x4b); //0x4b, 13.56MHz
WriteRawRC(RegCwConductance,0x17); //0x3f, 设置输出驱动的电导系数
WriteRawRC(RegModConductance,0x06); //0x06, 幅移键控ASk 12%
WriteRawRC(RegCoderControl,0x20); //0x20, TypeB,波特率106kbps, NRZ编码
WriteRawRC(RegModWidth,0x13);
WriteRawRC(RegModWidthSOF,0x3F);
WriteRawRC(RegTypeBFraming,0x3B); //0x23, 定义ISO14443B帧格式
WriteRawRC(RegRxControl1,0x73);
WriteRawRC(RegDecoderControl,0x19);
WriteRawRC(RegBitPhase,0xAD);
WriteRawRC(RegRxThreshold,0x88); //0x44, 可接收的最小信号强度
WriteRawRC(RegBPSKDemControl,0x7E); //0x3e, 忽略EOF,打开高通滤波
WriteRawRC(RegRxControl2,0x01);
WriteRawRC(RegRxWait,0x06); //0x06, 设置接收延时
WriteRawRC(RegChannelRedundancy,0x2C); //0x2c, TypeB接收冗余校验
WriteRawRC(RegCRCPresetLSB,0xFF); //0xff, CRC预设值
WriteRawRC(RegCRCPresetMSB,0xFF);
WriteRawRC(RegTimeSlotPeriod,0x00);
WriteRawRC(RegMfOutSelect,0x00);
WriteRawRC(RFU27,0x00);
WriteRawRC(RegFIFOLevel,0x3F);
WriteRawRC(RegTimerClock,0x07);
WriteRawRC(RegTimerReload,0x0A);
WriteRawRC(RegTimerControl,0x06);
WriteRawRC(RegIRqPinConfig,0x02);
WriteRawRC(RFU2E,0x00);
WriteRawRC(RFU2F,0x00);
PcdSetTmo(106);
DelayMs(1);
PcdAntennaOn();