
baccandr (Customer) asked a question.
Hi everyone,
I was directed to this forum for advice on using a P1AM-200 with both P1AM-GPIO and P1AM-SERIAL shields.
I would like to connect two sensors simultaneously:
- A 3.3 V TTL UART sensor through the P1AM-GPIO.
- An RS-485 sensor through one port of the P1AM-SERIAL.
I already tried using GPIO pins 13 (RX) and 14 (TX) for the TTL sensor with the P1AM-SERIAL shield connected, but they were not operational. This is consistent with the note in the P1AM-SERIAL manual ("If a P1AM-GPIO module is installed alongside a P1AM-SERIAL module, the above pins will be unavailable to the P1AM-GPIO.")
Since I only need one RS-485 port, is there a supported way to use the other hardware UART’s TX/RX pins for TTL communication through the GPIO shield?
Specifically:
- Can an unused P1AM-SERIAL port be disabled or isolated to free its hardware TX/RX pins?
- Is there a software configuration or jumper setting that allows this, or would it require a hardware modification?
- Is there another recommended way to access a hardware UART while keeping one P1AM-SERIAL port operational?
My preference is to use hardware TX/RX. If that isn’t possible, I’ll consider software serial on spare GPIO pins, potentially using SoftwareSerialM (https://github.com/FYSETC/SoftwareSerialM), which includes SAMD51 support. Has anyone successfully used this library, or a similar solution, on the P1AM-200 alongside RS-485 communication?
Thanks for any advice!
it will void any warranty but it shouldn't be hard to remove a couple 0 ohm resistors in the P1AM-SERIAL
https://github.com/facts-engineering/P1AM-Design-Files/blob/master/P1AM%20Shields/P1AM-SERIAL/P1AM-SERIAL_REVC.pdf
Thanks, I found an alternative that works without hardware modification (based on the P1AM-SERIAL Rev C schematic):
This lets me use Serial1 on pins 13/14 (via the P1AM-GPIO) for a 3.3 V TTL sensor, and Port 2 of the P1AM-SERIAL for RS-485.
There seems to be only a few minor caveats with this approach:
Did I miss anything? I am open to suggestions if anybody has a better way to handle this.
Thanks
Andrea