When trying to read data from the USB Serial driver used on the Pico, it would not read anything in my C# program. It turned out that the Pico library also simulates the RTS and DTR signals in its CDC driver, unlike the typical FDTI chips, which simply ignore them. This gives us two options to deal with it in the SerialPort
class of .NET:
-
Set
DtrEnable
to true, and keep theHandshake
toNone
This ignores the RTS input, which could lead to overflow, but it is a setting that also works with ports that do not use RTS/DTR handshakes. -
Set
DtrEnable
andRtsEnable
to true, and theHandshake
toRequestToSend
This enables hardware handshaking, and behaves unpredictable when no HW handshake is implemented.