Activity Forums Questions & Troubleshooting Software & Firmware Disable automatic reset Reply To: Disable automatic reset

  • jasin

    July 3, 2019 at 1:18 pm


    Ad connecting and reconnecting to Serial port of Controllino and Arduino in general.

    In C# when You use SerialPort Class there is SerialPort.DtrEnable Property which enables or disables DTR (Data Terminal Ready) signal during serial communication.

    When it is disabled connecting and reconnecting to Controllino (tested on Mini, Maxi and Mega) do NOT cause Controllino to reset.

    Here is example of my Class and Constructor I used for tests:


    using System.IO.Ports;


    /// Defines the

    public class COMPort : SerialPort


    /// Initializes a new instance of the class.

    /// The aPortname
    /// The aBaudRate
    /// The aDataBits
    public COMPort(string aPortname, int aBaudRate, int aDataBits, bool aDtrEnable)
    // open ComPort
    this.PortName = aPortname;
    this.BaudRate = aBaudRate;
    this.DataBits = aDataBits;
    this.Parity = System.IO.Ports.Parity.None;
    this.StopBits = System.IO.Ports.StopBits.One;
    this.Handshake = System.IO.Ports.Handshake.None;
    this.RtsEnable = true;
    this.DtrEnable = aDtrEnable;

    And when I open COM port with aDtrEnable=true it causes reset, but when I open COM port with aDtrEnable=false the Controllino (even Arduino UNO and Arduino MEGA) do NOT reset.