From a3c7653ef335a52cdb2041cc92d4d9cf87d73ece Mon Sep 17 00:00:00 2001 From: BlueFox Date: Sat, 14 Sep 2024 23:08:45 +0200 Subject: [PATCH] First commit! Added README.md --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c88baaa --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# micropython-rp2-rs485-examples + +## Whats this? + +This is a small collection of some programs I wrote to test the functionality of +some cheap TTL-UART to RS485 converters, written in [MicroPython](https://micropython.org/) + +Here's a short list of the different programs and what they do: + +- **rs485_send.py**: sends a incrementing counter (starting at 0) as an UTF-8 encoded string with \r\n as delimiter over rs485 + +- **rs485_receive.py**: receives utf-8 encoded strings and prints them out as soon as a \n is received. + +- **rs485_pingpong.py**: this implements a simple ping-pong over two channels (4 converters needed). For more information, see [Wiring]. + + +## Wiring + +TODO + + +## Useful links + +- [https://www.berrybase.de/2-kanal-rs485-modul-fuer-raspberry-pi-pico-sp3485-transceiver](https://www.berrybase.de/2-kanal-rs485-modul-fuer-raspberry-pi-pico-sp3485-transceiver) - Pinout for a two-channel rs485 converter HAT by waveshare for the pi pico I used during development +- [https://www.analog.com/media/en/technical-documentation/data-sheets/MAX1487-MAX491.pdf](https://www.analog.com/media/en/technical-documentation/data-sheets/MAX1487-MAX491.pdf) - Datasheet of MAX485, a well-known chip soldered on another converter I bought (gives useful insights in how the UART communications work, and how to enable/disable read/write) +- [https://www.python-forum.de/viewtopic.php?t=56795](https://www.python-forum.de/viewtopic.php?t=56795) - German forum entry with sample code +- [https://www.waveshare.com/wiki/Pico-2CH-RS485](https://www.waveshare.com/wiki/Pico-2CH-RS485) - the wiki entry of waveshare about the 2-Channel converter I used among other converters (also contains sample code) +- [https://docs.micropython.org/en/latest/library/machine.UART.html](https://docs.micropython.org/en/latest/library/machine.UART.html) - Documentation of the UART library of MicroPython I used for transferring data to the converters + + +## License + +see LICENSE.md +