USART/UART Capabilities
-
This is a question that is about both the Duet 2 Ethernet board as well as the upcoming Duet 3 6HC board.
First, I know that I could technically hijack the USART pins that are used for the PanelDue in order to implement my own connection by modifying the firmware. Are there any other exposed pins that have USART capability or is this the only way to create a custom connection to another board?
In general, is there anyway to send arbitrary I2C or RS232 commands to a separate board?My same question applies for the Duet 3 6HC. Are there any available USART enabled pins or does the board support sending I2C/RS232 commands directly from the firmware?
Thanks
-
You can send arbitrary I2C commands on Duet 2 using M260. I advise against using I2C to connect anything that isn't located very close to the Duet and powered from it. I2C was designed to be used to interconnect chips within a single PCB, so it is not noise-tolerant, and the I2C protocol does not include error detection or recovery.
I2C is not currently supported by Duet 3. Although Duet 3 has some I2C-capable pins, you would need to make a hardware modification (change a resistor) to make them usable for I2C.
Duet 3 supports UART Tx/Rx on some of the IO connectors. I will provide facilities to access these UARTs via GCode in due course. I expect to make the same facility available on the PanelDue port of Duet 2 in RRF 3.