Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
We tried so many things, including switching to hardware SPI pins of ESP12, which solved that exception mentioned. Now, the only problem is that we can not get any NFC cards read by module via ESP12. We are only switching the reader's SPI pins between STM32F407-Discovery Board and ESP12 module. Same code (except for pin setup) works just great on STM32-Discovery, but fails to read NFC cards without throwing any exception.
We would try to compare whole communication sequence of STM32 and ESP12. We connected the logic analyzer to ESP12's SPI pins and we managed to capture all communication signals. Then we connected the logic analyzer to STM32-Discovery. The original exception is thrown when we connect MOSI pin to analyzer (other pins do not cause any exceptions). So we failed to compare.
FYI: I will try to convert current driver to use I2C.
Interestingly the Arduino code looks slightly different:
I wonder whether just writing '0' to the set/clear registers has some undesired effect.
... I am torn though. Doing
We are working with @ceremcem and we are still chasing this problem. Current situation is that
In our ESP-12 - MFRC522 pin configuration is :
My test code is as follows:
I want to use software SPI port. I created new object from SPI class.
What am i doing wrong ?
As you know the
I just did some tests. I'm not seeing any glitches, other than cross-talk between the lines. Both HW and SW SPI seem to work fine. I don't have an SPI device handy so I just looped MISO & MOSI back into one another. SW SPI runs at just under 1Mhz, HW you can control. Here's my little test program:
Output should be:
@gfwilliams I switched the i2c and digitalWrite implementations to use a single I/O write with an if statement like they do in arduino 'cause I tried it to see whether it makes a difference and I found that it's just so slightly faster. But no difference WRT glitches or so. tve/Espruino@6e09066
@tve thanks! Interesting that it's faster...
Most likely it's wiring then. I'd say use software SPI - there are less possible things to go wrong.
It getting 12 returned sounds like either an MOSI or CS not working properly.
@tve Regarding to your suggestion, I connected GPIO15 to GND via 10K resistor and GPIO2 to VDD (3.3V) via 2.2K resistor, then tried your test code.
When I tried software SPI, output was as expected, and as follows:
But when I tried hardware SPI, output wasn't the same as before:
After this successful test, I used software spi in my test code.
It is WORKING
This is my test code:
Output is :
But I have some problems.
When I put the
After I got this error, i reverted the code to exclude
You need to initialise the reader on
So basically the 'bug' here was that you'd shorted pin D15 to ground, and then also connected it to CS?
I think we can probably close this issue.
everything works as expected, with a little hack: we need to call
Steps to regenerate the problem:
Why do we need two
Hello friends I'm new to developing with esp8266, I'm trying to connect both an RFID reader rc522 and screen nextion 2.4 "in a NodeMCU 1.0, using arduino IDE v 1.6.11 to read an RFID tag and display the UID in Nextion 2.4 screen ".
I managed to connect and work with each separately, but I can not make them work together.
when the connections operate separately in NodeMCU v 1.0 are the following:
Nextion 2.4 "||| MCU Node 1.0
RC522 ||| MCU Node 1.0
Both devices need to use the pin D7 (RXD2), I would like to use both at the same time, I read that I use UART but do not understand how to apply.
any help is welcome