UART read inconsitencies on Pico Pi #11785
-
I am getting strange results reading tag data from an ID 12LA RFID module. Some tags read correctly, but others don't. The data output from the module should be 1 start byte, 10 bytes for the tag ID, 2 checksum bytes, then CR, LF and an end byte. e.g. on other platforms (Python3 on an RPI zero with a CP2102 to interface to the RFID module) I read : I'm using the same module and tags, and I have tested several different tags and RFID modules, all with the same consistent result. Some tags read correctly on both setups, others work on other setups, but fail on the Pico. I connect using : What am I missing? Is the serial read format different on RP2040 devices, or am I missing something with the encoding from the RFID module. My next idea was to try reading the serial data using C on the Pico to see if that works or not. I'm starting to go round in circles with this now though, so any help is much appreciated. Thanks P.S. I am using the latest stable version of Micropython (currently v1.20.0). I started using a Pico Lipo 16mb, but in case the problem was with that board I also tested on a Pico Pi with the same results. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I wrote a simple test using Arduino and I got the same results. So this issue isn't specific to MicroPython; It seems to be an issue with the RP2040's hardware uart implementation. So a follow on question would be if there are any known issues with the hardware uart implementation on the rp2040, or if anyone else has had issues using it? |
Beta Was this translation helpful? Give feedback.
-
I did a lot of tests with the RP2 UART, and it worked fine. If possible, check the real timing of the bits. |
Beta Was this translation helpful? Give feedback.
Oh sorry. Pin 9 looks like the right one, and you do not need an inverter. Without data, the output of the Pin should have a high level (~3.3V).