Is it possible to use the serialport object to connect exactly like Putty is able to?
I am using a MATLAB GUI app I wrote to connect via serial over USB to an Arduino. Unfortunately whenever I open the connection, the Arduino resets. This is expected behaviour, and there are hardware workarounds (including cutting the reset line, or using a 22uF cap like discussed here https://electronics.stackexchange.com/questions/24743/arduino-resetting-while-reconnecting-the-serial-terminal).
However, it IS also possible to prevent this behaviour by controlling the DTR line on the connection. For example, in Putty, if I select DSR/DTR mode, then the Arduino does not reset, so I know it is possible. I have not however been able to work out how to do it with MATLAB, and don’t know whether it is possible. I have explored the SerialPort object help, and am aware of the DTR option. However, I have exhausted all attempts at getting this to work and am now not sure whether it is even possible.
Has anyone ever done this or got it working?
Many thanks,I am using a MATLAB GUI app I wrote to connect via serial over USB to an Arduino. Unfortunately whenever I open the connection, the Arduino resets. This is expected behaviour, and there are hardware workarounds (including cutting the reset line, or using a 22uF cap like discussed here https://electronics.stackexchange.com/questions/24743/arduino-resetting-while-reconnecting-the-serial-terminal).
However, it IS also possible to prevent this behaviour by controlling the DTR line on the connection. For example, in Putty, if I select DSR/DTR mode, then the Arduino does not reset, so I know it is possible. I have not however been able to work out how to do it with MATLAB, and don’t know whether it is possible. I have explored the SerialPort object help, and am aware of the DTR option. However, I have exhausted all attempts at getting this to work and am now not sure whether it is even possible.
Has anyone ever done this or got it working?
Many thanks, I am using a MATLAB GUI app I wrote to connect via serial over USB to an Arduino. Unfortunately whenever I open the connection, the Arduino resets. This is expected behaviour, and there are hardware workarounds (including cutting the reset line, or using a 22uF cap like discussed here https://electronics.stackexchange.com/questions/24743/arduino-resetting-while-reconnecting-the-serial-terminal).
However, it IS also possible to prevent this behaviour by controlling the DTR line on the connection. For example, in Putty, if I select DSR/DTR mode, then the Arduino does not reset, so I know it is possible. I have not however been able to work out how to do it with MATLAB, and don’t know whether it is possible. I have explored the SerialPort object help, and am aware of the DTR option. However, I have exhausted all attempts at getting this to work and am now not sure whether it is even possible.
Has anyone ever done this or got it working?
Many thanks, matlab, serialport, arduino, dtr MATLAB Answers — New Questions