完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,谢谢你的未来帮助。项目的内容:我必须打开一个门,它有一个带有PIC16LF1459的电柜。我已经开了一扇门,上面有一个PIC16控制的按钮。但是现在我需要使用RID-RC522。我使用了一个库和MCC。当我构建和运行时,我得到了一些关于我的MOSI,MISO,SCK和SDA(CS)WITOUT在RC522上传递的任何信号。似乎有一个通信之间的屏蔽和PIC16PIC从示波器:在下一个引脚:RC522 - PIC16SS(SDA)- SSSCK - SCKMOSI - SDIMSO - SDOST--MCLRYYONTY是在ZIP和IM有任何问题。
以上来自于百度翻译 以下为原文 Hi, Thank you for your futur help. Content of the project : I have to unlock a door which has a electric locker with a PIC16LF1459. I already open a door with a button which is control by the PIC16. But now i need to use the RFID-RC522. I use a library and the MCC. When i build and run, i got some signals on my MOSI, MISO, SCK and SDA (CS) whitout pass anything on the RC522. It seems there is a communication between the shield and the PIC16 Pic from an oscilloscope : In the next post PIN : RC522 - PIC16 SS (SDA) - SS SCK - SCK MOSI - SDI MISO - SDO RST - MCLR Everything is on the zip and im available to any questions. Attached Image(s) Attachment(s) RC522SPI.X (2).zip (255.67 KB) - downloaded 40 times |
|
相关推荐
17个回答
|
|
你可以先给我们你的安装原理图。再加上整台钻机的一些照片。
以上来自于百度翻译 以下为原文 You might start with giving us the schematics of your setup. Plus eventually some photos of the whole rig. |
|
|
|
那么你有3 V系统吗?(BTW:MISO和SCK上传似乎已经破产了,我无法访问。)但是:你知道SCL和SDI上还有更多任务吗?(HDC1080,NFR24L01,OPT300)和MOSI信号有点奇怪-显示这个缓慢过渡到GND(右侧),这是我不期望的。
以上来自于百度翻译 以下为原文 So you've got a 3 V system ? (BTW: MISO and SCK uploads seem to have gone bust - being not accessible for me.) BUT: are you aware that there exist some more quests on SCL and SDI? (HDC1080, NRF24L01, OPT3001) And the MOSI signal is somewhat weird - showing this slow transient to GND (right side) which I wouldn't expect. |
|
|
|
com /file /dk36kfbInvd369rt55EEJoaqqiaTHp:://应该是GoGoTeL.COM/FIL/D/12K8KVIPENVD369IRT5EEJOAQKIA/SCK-IISTPSP://Road。谷歌/COM/DI/15LXB5UG8EVVLJ0F XXHON0RGGISISM69FTHTP://应该是HTTPS://Valj0FX-XNHON0RG。MISO链接ISITTPS://驱动器。谷歌GISM669F
以上来自于百度翻译 以下为原文 The MISO link is https://drive.google.com/file/d/12k8gyVkfbieNnvD3629ITr5eejOaQkiAhttp:// should be just https://drive.google.com/file/d/12k8gyVkfbieNnvD3629ITr5eejOaQkiA and SCK is https://drive.google.com/file/d/15lxb5uG8epVLj0F-xgyn0rggIIsm6_9Fhttp:// should be https://drive.google.com/...VLj0F-xgyn0rggIIsm6_9F |
|
|
|
是的,我有一个3V系统。我需要通过NFR24L01发送关于门状态的信息(打开或关闭)。所以我知道这个模块也会使用SPI。新的PIC来自于StasOpCopeMIS:http://Dr.GooLe.com /Fiel/D/C79WFDJ9CSVRBGMXXBVLPGHQQGPILIQQMOSI:http://驱动器。谷歌。com…/ VJ1BJQDJLCSO5BY0F2TWQA
以上来自于百度翻译 以下为原文 Yes i have a 3V system. I will need to send by the nrf24l01 the information about the status of the door (open or close). So i know that there is this module which will use the SPI too. New pic from the oscilloscope MISO : https://drive.google.com/file/d/1C79wfdjjcS9RbVgMxIBvLpGhqGzpIl_q MOSI : https://drive.google.com/...vj1bJQdJLCso5BY0f2twQA |
|
|
|
OK -你的主顾有风险。有点可疑的是第616行中的“继续”。建议删除它,因为它肯定没有“积极”的使用,但可能会出现一些负面影响。
以上来自于百度翻译 以下为原文 OK - risked an eye on your main.c What's somewhat dubious is the "continue" in line 616. Suggest to delete this as it definitely has no "positive" use but might exhibit some negative effect. |
|
|
|
I2C组件没有填充吗?这些可能会不经意地“抓住”某些东西,干扰SPI操作。另一方面,我目前在押注“继续”。
以上来自于百度翻译 以下为原文 Are the I2C components unpopulated? These might inadvertently "catch" something and interfere with the SPI operation. On the other hand I'm currently betting somewhat on the "continue". |
|
|
|
我在他的根文件夹中看到的唯一的C文件是“Maun2.c”,它只有107行,没有“继续”语句。
以上来自于百度翻译 以下为原文 The only C file I can see in his root folder is "main2.c", and that only has 107 lines, and no "continue" statements. |
|
|
|
谢谢你的帮助,我对我的旧程序一无所知,所以我修改并上传了一个新的。
以上来自于百度翻译 以下为原文 Thank you for your help i had nothing with my old program so i change and upload a new. main.c /* * File: main2.c * Author: Student * * Created on June 14, 2018, 2:57 PM */ #include #include "rfid2.h" unsigned char FoundTag; // Variable used to check if Tag was found unsigned char ReadTag; // Variable used to store anti-collision value to read Tag information unsigned char TagData[16]; // Variable used to store Full Tag Data unsigned char GoodTagSerialNumber[4] = {0x9E, 0x80, 0xB1, 0x59}; // The Tag Serial number we are looking for int i=0; char buffer[20],buffer2[20],text[20]; unsigned char version; int GoodTag=0; // Variable used to confirm good Tag Detected void checktag() { if (GoodTag == 1) { GoodTag=0; __delay_ms(50); } else { GoodTag=0; __delay_ms(50); } } void readRFID() { // Get anti-collision value to properly read information from the Tag ReadTag = antiCollision(TagData); /* for(i=0;i<=2;i++) { sprintf(buffer2,"%2X",(TagData)); //display version in hexadecimal __delay_ms(2); printf(buffer2); printf(", "); } sprintf(buffer2,"%2X",(TagData)); //display version in hexadecimal __delay_ms(2); printf(buffer2); printf("rnCheck Validity rn"); */ for(int i=0; i <= 3; i++) { if (GoodTagSerialNumber != TagData) { GoodTag=0; break; // if not equal, then break out of the "for" loop } } if (TagData[3]==GoodTagSerialNumber[3]) { // if we made it to 4 loops then the Tag Serial numbers are matching GoodTag=1; } } void main() { /* setup_oscillator(OSC_8MHZ, 3); //Adjust Oscillator for proper Serial Communication setup_spi(SPI_MASTER|SPI_MODE_0|SPI_CLK_DIV_16); */ SYSTEM_Initialize(); SPI_Initialize(); __delay_ms(50); begin(); //initialize MFRC522 REDLED = 0; while(1) { // Check to see if a Tag was detected // If yes, then the variable FoundTag will contain "MI_OK" FoundTag = requestTag(MF1_REQIDL, TagData); __delay_ms(200); if (FoundTag == MI_OK)//MI_OK { REDLED = 1; readRFID(); checktag(); __delay_ms(50); } } } rfid.h #include "mcc_generated_files/mcc.h" #define GREENLED LATCbits.LATC4 #define REDLED LATCbits.LATC5 #define MAX_LEN 16 // Maximum length of an array. CHECK IF IT IS MAXIMUM LENGTH/SIZE OF FIFO!!!!!!!!!!! //MF522 MFRC522 error codes. #define MI_OK 0 // Everything A-OK. #define MI_NOTAGERR 1 // No tag error #define MI_ERR 2 // General error //MF522 Command word #define MFRC522_IDLE 0x00 // NO action; Cancel the current command #define MFRC522_MEM 0x01 // Store 25 unsigned char into the internal buffer. #define MFRC522_GENID 0x02 // Generates a 10 unsigned char random ID number. #define MFRC522_CALCCRC 0x03 // CRC Calculate or selftest. #define MFRC522_TRANSMIT 0x04 // Transmit data #define MFRC522_NOCMDCH 0x07 // No command change. #define MFRC522_RECEIVE 0x08 // Receive Data #define MFRC522_TRANSCEIVE 0x0C // Transmit and receive data, #define MFRC522_AUTHENT 0x0E // Authentication Key #define MFRC522_SOFTRESET 0x0F // Reset //Mifare_One tag command word #define MF1_REQIDL 0x26 // find the antenna area does not enter hibernation #define MF1_REQALL 0x52 // find all the tags antenna area #define MF1_ANTICOLL 0x93 // anti-collision #define MF1_SELECTTAG 0x93 // election tag #define MF1_AUTHENT1A 0x60 // authentication key A #define MF1_AUTHENT1B 0x61 // authentication key B #define MF1_READ 0x30 // Read Block #define MF1_WRITE 0xA0 // write block #define MF1_DECREMENT 0xC0 // debit #define MF1_INCREMENT 0xC1 // recharge #define MF1_RESTORE 0xC2 // transfer block data to the buffer #define MF1_TRANSFER 0xB0 // save the data in the buffer #define MF1_HALT 0x50 // Sleep //------------------ MFRC522 registers--------------- //Page 0:Command and Status #define Reserved00 0x00 #define CommandReg 0x01 #define CommIEnReg 0x02 #define DivIEnReg 0x03 #define CommIrqReg 0x04 #define DivIrqReg 0x05 #define ErrorReg 0x06 #define Status1Reg 0x07 #define Status2Reg 0x08 #define FIFODataReg 0x09 #define FIFOLevelReg 0x0A #define WaterLevelReg 0x0B #define ControlReg 0x0C #define BitFramingReg 0x0D #define CollReg 0x0E #define Reserved01 0x0F //Page 1:Command #define Reserved10 0x10 #define ModeReg 0x11 #define TxModeReg 0x12 #define RxModeReg 0x13 #define TxControlReg 0x14 #define TxAutoReg 0x15 #define TxSelReg 0x16 #define RxSelReg 0x17 #define RxThresholdReg 0x18 #define DemodReg 0x19 #define Reserved11 0x1A #define Reserved12 0x1B #define MifareReg 0x1C #define Reserved13 0x1D #define Reserved14 0x1E #define SerialSpeedReg 0x1F //Page 2:CFG #define Reserved20 0x20 #define CRCResultRegM 0x21 #define CRCResultRegL 0x22 #define Reserved21 0x23 #define ModWidthReg 0x24 #define Reserved22 0x25 #define RFCfgReg 0x26 #define GsNReg 0x27 #define CWGsPReg 0x28 #define ModGsPReg 0x29 #define TModeReg 0x2A #define TPrescalerReg 0x2B #define TReloadRegH 0x2C #define TReloadRegL 0x2D #define TCounterValueRegH 0x2E #define TCounterValueRegL 0x2F //Page 3:TestRegister #define Reserved30 0x30 #define TestSel1Reg 0x31 #define TestSel2Reg 0x32 #define TestPinEnReg 0x33 #define TestPinValueReg 0x34 #define TestBusReg 0x35 #define AutoTestReg 0x36 #define VersionReg 0x37 #define AnalogTestReg 0x38 #define TestDAC1Reg 0x39 #define TestDAC2Reg 0x3A #define TestADCReg 0x3B #define Reserved31 0x3C #define Reserved32 0x3D #define Reserved33 0x3E #define Reserved34 0x3F //----------------------------------------------- //Reads the value at a register. unsigned char readFromRegister(unsigned char addr) { unsigned char val; IO_RC6_SetLow(); SPI_Exchange8bit(((addr<<1)&0x7E) | 0x80); val =SPI_Exchange8bit(0x00); IO_RC6_SetHigh(); return val; } //writes Values to specified registers. void writeToRegister(unsigned char addr, unsigned char val) { IO_RC6_SetLow(); //Address format: 0XXXXXX0 SPI_Exchange8bit((addr<<1)&0x7E); SPI_Exchange8bit(val); IO_RC6_SetHigh(); } //Mask to update registers void setBitMask(unsigned char addr, unsigned char mask) { unsigned char current; current = readFromRegister(addr); writeToRegister(addr, current | mask); } //remove bitmask maybe not necessary void clearBitMask(unsigned char addr, unsigned char mask) { unsigned char current; current = readFromRegister(addr); writeToRegister(addr, current & (~mask)); } //Initialize RFID Reader //Does the setup for the MFRC522. void reset() { writeToRegister(CommandReg, MFRC522_SOFTRESET); } void begin() { IO_RC6_SetHigh(); GREENLED = 0; reset(); //Timer: TPrescaler*TreloadVal/6.78MHz = 24ms writeToRegister(TModeReg, 0x8D); __delay_ms(2);// Tauto=1; f(Timer) = 6.78MHz/TPreScaler writeToRegister(TPrescalerReg, 0x3E); // TModeReg[3..0] + TPrescalerReg __delay_ms(2); writeToRegister(TReloadRegL, 30); __delay_ms(2); writeToRegister(TReloadRegH, 0); __delay_ms(2); writeToRegister(TxAutoReg, 0x40); // 100%ASK __delay_ms(2); writeToRegister(ModeReg, 0x3D); // CRC initial value 0x6363 __delay_ms(2); //writeToRegister(TxControlReg, 0x82); __delay_ms(2); setBitMask(TxControlReg, 0x03); // Turn antenna on. } //Checking MFRC522 Firmwareversion unsigned char getFirmwareVersion() { unsigned char response; response = readFromRegister(VersionReg); return response; } /**************************************************************************/ /*! @brief Sends a command to a tag. @param cmd The command to the MFRC522 to send a command to the tag. @param data The data that is needed to complete the command. @param dlen The length of the data. @param result The result returned by the tag. @param rlen The number of valid bits in the resulting value. @returns Returns the status of the calculation. MI_ERR if something went wrong, MI_NOTAGERR if there was no tag to send the command to. MI_OK if everything went OK. */ /**************************************************************************/ int commandTag(unsigned char cmd, unsigned char *data, int dlen, unsigned char *result, int *rlen) { int status = MI_ERR; unsigned char irqEn = 0x00; unsigned char waitIRq = 0x00; unsigned char lastBits, n; int i; switch (cmd) { case MFRC522_AUTHENT: irqEn = 0x12; waitIRq = 0x10; break; case MFRC522_TRANSCEIVE: irqEn = 0x77; waitIRq = 0x30; break; default: break; } writeToRegister(CommIEnReg, irqEn|0x80); // interrupt request clearBitMask(CommIrqReg, 0x80); // Clear all interrupt requests bits. setBitMask(FIFOLevelReg, 0x80); // FlushBuffer=1, FIFO initialization. writeToRegister(CommandReg, MFRC522_IDLE); // No action, cancel the current command. // Write to FIFO for (i=0; i < dlen; i++) { writeToRegister(FIFODataReg, data); } // Execute the command. writeToRegister(CommandReg, cmd); if (cmd == MFRC522_TRANSCEIVE) { setBitMask(BitFramingReg, 0x80); // StartSend=1, transmission of data starts } // Waiting for the command to complete so we can receive data. i = 25; // Max wait time is 25ms. do { __delay_ms(1); // CommIRqReg[7..0] // Set1 TxIRq RxIRq IdleIRq HiAlerIRq LoAlertIRq ErrIRq TimerIRq n = readFromRegister(CommIrqReg); i--; } while ((i!=0) && !(n&0x01) && !(n&waitIRq)); clearBitMask(BitFramingReg, 0x80); // StartSend=0 if (i != 0) { // Request did not time out. if(!(readFromRegister(ErrorReg) & 0x1D)) { // BufferOvfl Collerr CRCErr ProtocolErr status = MI_OK; if (n & irqEn & 0x01) { status = MI_NOTAGERR; } if (cmd == MFRC522_TRANSCEIVE) { n = readFromRegister(FIFOLevelReg); lastBits = readFromRegister(ControlReg) & 0x07; if (lastBits) { *rlen = (n-1)*8 + lastBits; } else { *rlen = n*8; } if (n == 0) { n = 1; } if (n > MAX_LEN) { n = MAX_LEN; } // Reading the received data from FIFO. for (i=0; i } } } else { status = MI_ERR; } } return status; } /**************************************************************************/ /* @brief Checks to see if there is a tag in the vicinity. @param mode The mode we are requsting in. @param type If we find a tag, this will be the type of that tag. 0x4400 = Mifare_UltraLight 0x0400 = Mifare_One(S50) 0x0200 = Mifare_One(S70) 0x0800 = Mifare_Pro(X) 0x4403 = Mifare_DESFire @returns Returns the status of the request. MI_ERR if something went wrong, MI_NOTAGERR if there was no tag to send the command to. MI_OK if everything went OK. */ /**************************************************************************/ int requestTag(unsigned char mode, unsigned char *data) { int status, len; writeToRegister(BitFramingReg, 0x07); // TxLastBists = BitFramingReg[2..0] data[0] = mode; status = commandTag(MFRC522_TRANSCEIVE, data, 1, data, &len); if ((status != MI_OK) || (len != 0x10)) { status = MI_ERR; } return status; } /**************************************************************************/ /*! @brief Handles collisions that might occur if there are multiple tags available. @param serial The serial nb of the tag. @returns Returns the status of the collision detection. MI_ERR if something went wrong, MI_NOTAGERR if there was no tag to send the command to. MI_OK if everything went OK. */ /**************************************************************************/ int antiCollision(unsigned char *serial) { int status, i, len; unsigned char check = 0x00; writeToRegister(BitFramingReg, 0x00); // TxLastBits = BitFramingReg[2..0] serial[0] = MF1_ANTICOLL; serial[1] = 0x20; status = commandTag(MFRC522_TRANSCEIVE, serial, 2, serial, &len); len = len / 8; // len is in bits, and we want each unsigned char. if (status == MI_OK) { // The checksum of the tag is the ^ of all the values. for (i = 0; i < len-1; i++) { check ^= serial; } // The checksum should be the same as the one provided from the // tag (serial[4]). if (check != serial) { status = MI_ERR; } } return status; } /**************************************************************************/ /*! @brief Calculates the CRC value for some data that should be sent to a tag. @param data The data to calculate the value for. @param len The length of the data. @param result The result of the CRC calculation. */ /**************************************************************************/ void calculateCRC(unsigned char *data, int len, unsigned char *result) { int i; unsigned char n; clearBitMask(DivIrqReg, 0x04); // CRCIrq = 0 setBitMask(FIFOLevelReg, 0x80); // Clear the FIFO pointer //Writing data to the FIFO. for (i = 0; i < len; i++) { writeToRegister(FIFODataReg, data); } writeToRegister(CommandReg, MFRC522_CALCCRC); // Wait for the CRC calculation to complete. i = 0xFF; do { n = readFromRegister(DivIrqReg); i--; } while ((i != 0) && !(n & 0x04)); //CRCIrq = 1 // Read the result from the CRC calculation. result[0] = readFromRegister(CRCResultRegL); result[1] = readFromRegister(CRCResultRegM); } |
|
|
|
经验法则:如果你不想添加到一般的混乱中,就不要在没有通知的情况下上传上传!问题:随着修改,状态(“不工作”)仍然没有改变?
以上来自于百度翻译 以下为原文 Rule of thumb: don't exchange uploads without notice if you don't want to add to general confusion! Question: with the modifications the status ("doesn't work") is still unchanged? |
|
|
|
是的,我给了你示波器上的照片。谢谢你的帮助:看看这个。我在SPI主机上配置了SPI模式0MISO:http://Dr.GooLe.COM/FIL/D/1B7DAEDMWKG7ZUOKT1DWRZVK1SNWDTAMOSI:http://Delo.谷歌HistaVHFHHFLCWYHYJEN
以上来自于百度翻译 以下为原文 Yes, i gave you the pics from the oscilloscope. Thank you for your help EDIT : Look at this. I config the pic on SPI master with the SPI MODE 0 MISO : https://drive.google.com/file/d/1b7dAepdmWKG7zuokt1dWiRZvk1SnwDTA MOSI : https://drive.google.com/...HIsaCvhFHhFlCWYHyjENne |
|
|
|
我无法编辑…我试着调试。我发现我总是有一个基本的标签
以上来自于百度翻译 以下为原文 I couldn't edit... I tried to debug. I find that i always have Foundtag = MI_ERR |
|
|
|
|
|
|
|
我建议首先将编译器选项设置为-WALL,并取消所有编译器警告。最后,开始初始化RFID阅读器(至少在源代码[/OS]之间的代码中,我不能看到RFID阅读器的任何初始化)。这可能对DE有进一步的帮助。长度误差和其他误差之间的关系如MieErr目前只说明“有些事情是错误的”-没有进一步的诊断能力。在顶层进行函数而不是仅仅进行“调试”,无疑会有助于找到错误。
以上来自于百度翻译 以下为原文 I'd suggest to start with setting the compiler options to -Wall and get rid of all compiler warnings. Eventually proceed with initializing the RFID reader (at least in the code goven above between [ source ] / [ /source ] I cannot see any initialization of the RFID reader). It might further help to descern between the length error and other errors as MI_ERR is currently only telling "something is wrong" - without further diagnosis capabilities. And stepping into the functions instead of just "debugging" on the top level would certainly help to find the error(s). |
|
|
|
这是初始化:我把这个添加到触控者的代码中。
以上来自于百度翻译 以下为原文 This is the initialisation : void begin() { IO_RC6_SetHigh(); reset(); //Timer: TPrescaler*TreloadVal/6.78MHz = 24ms writeToRegister(TModeReg, 0x8D); __delay_ms(2);// Tauto=1; f(Timer) = 6.78MHz/TPreScaler writeToRegister(TPrescalerReg, 0x3E); // TModeReg[3..0] + TPrescalerReg __delay_ms(2); writeToRegister(TReloadRegL, 30); __delay_ms(2); writeToRegister(TReloadRegH, 0); __delay_ms(2); writeToRegister(TxAutoReg, 0x40); // 100%ASK __delay_ms(2); writeToRegister(ModeReg, 0x3D); // CRC initial value 0x6363 __delay_ms(2); //writeToRegister(TxControlReg, 0x82); __delay_ms(2); //setBitMask(TxControlReg, 0x03); // Turn antenna on. AntennaOn(); } I add this to the code for the antenna void AntennaOn(void) { unsigned char temp; temp = readFromRegister(TxControlReg); if (!(temp & 0x03)) { setBitMask(TxControlReg, 0x03); REDLED = 1; } } void AntennaOff(void) { clearBitMask(TxControlReg, 0x03); } i got theses warnings rfid2.h:135: warning: (373) implicit signed to unsigned conversion rfid2.h:150: warning: (373) implicit signed to unsigned conversion rfid2.h:155: warning: (343) implicit return at end of non-void function rfid2.h:164: warning: (373) implicit signed to unsigned conversion rfid2.h:174: warning: (373) implicit signed to unsigned conversion rfid2.h:271: warning: (373) implicit signed to unsigned conversion rfid2.h:309: warning: (373) implicit signed to unsigned conversion rfid2.h:333: warning: (373) implicit signed to unsigned conversion rfid2.h:363: warning: (359) illegal conversion between pointer types pointer to unsigned int -> pointer to int main2.c:41: warning: (373) implicit signed to unsigned conversion main2.c:57: warning: (346) declaration of "i" hides outer declaration main2.c:59: warning: (373) implicit signed to unsigned conversion main2.c:59: warning: (373) implicit signed to unsigned conversion main2.c:94: warning: (373) implicit signed to unsigned conversion "C:Program Files (x86)Microchipxc8v1.45binxc8.exe" --chip=16LF1459 -G -mdist/default/production/RC522SPI.X.production.map --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/default/production/memoryfile.xml -odist/default/production/RC522SPI.X.production.elf build/default/production/mcc_generated_files/spi.p1 build/default/production/mcc_generated_files/mcc.p1 build/default/production/mcc_generated_files/device_config.p1 build/default/production/mcc_generated_files/pin_manager.p1 build/default/production/main2.p1 Microchip MPLAB XC8 C Compiler (Free Mode) V1.45 Build date: Nov 15 2017 Part Support Version: 1.45 Copyright (C) 2017 Microchip Technology Inc. License type: Node Configuration :: warning: (1273) Omniscient Code Generation not available in Free mode mcc_generated_files/spi.c:130: warning: (520) function "_SPI_Exchange8bitBuffer" is never called mcc_generated_files/spi.c:169: warning: (520) function "_SPI_IsBufferFull" is never called mcc_generated_files/spi.c:174: warning: (520) function "_SPI_HasWriteCollisionOccured" is never called mcc_generated_files/spi.c:179: warning: (520) function "_SPI_ClearWriteCollisionStatus" is never called mcc_generated_files/pin_manager.c:103: warning: (520) function "_PIN_MANAGER_IOC" is never called rfid2.h:189: warning: (520) function "_AntennaOff" is never called rfid2.h:225: warning: (520) function "_getFirmwareVersion" is never called rfid2.h:387: warning: (520) function "_antiCollision" is never called rfid2.h:425: warning: (520) function "_calculateCRC" is never called main2.c:25: warning: (520) function "_checktag" is never called main2.c:38: warning: (520) function "_readRFID" is never called mcc_generated_files/spi.c:146: warning: (1498) pointer (SPI_Exchange8bitBuffer@dataOut) in expression may have no targets mcc_generated_files/spi.c:158: warning: (1498) pointer (SPI_Exchange8bitBuffer@dataOut) in expression may have no targets rfid2.h:446: warning: (1498) pointer (calculateCRC@result) in expression may have no targets rfid2.h:447: warning: (1498) pointer (calculateCRC@result) in expression may have no targets |
|
|
|
OK -您可以保留警告(520)(函数XXX从未被调用),但是要去掉其余的!考虑到隐式类型转换的警告等,提高希望——也许只是——一旦多余的警告被消除,你就会得到线索。P.S.:当计算机101讲座举行时,你在哪里度过你的时间?
以上来自于百度翻译 以下为原文 OK - you may keep the warnings (520) (function xxx is never called), but get rid of the rest! Considering warnings about implicit type conversions etc. raise tha hope that - just maybe - you'll get a clue once the superfluous warnings are eliminated. P.S.: Where did you pass you time when the computer 101 lectures were held? |
|
|
|
嗨,我猜引脚连接是错误的,来自RC522的MOSI与PIC和MISO从RC522到SDI一起去SDI
以上来自于百度翻译 以下为原文 Hi I guess pins connection are wrong, MOSI from RC522 go with SDO from PIC and MISO from RC522 go with SDI |
|
|
|
只有小组成员才能发言,加入小组>>
5159 浏览 9 评论
1998 浏览 8 评论
1927 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3170 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2224 浏览 5 评论
726浏览 1评论
612浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
501浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
625浏览 0评论
524浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-20 20:42 , Processed in 1.501854 second(s), Total 108, Slave 92 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号