Go Down

Topic: disable auto-reset by serial connection (Read 53583 times) previous topic - next topic


Auto-reset can be avoided by disabling DTR signal on openingport (on Windows environment):

Connect your source to Microsoft Comm Control (MSCOMM32.OCX) , then:

Dim MSComm1 As Object

Sub ArduinoOpen()
   Set MSComm1 = CreateObject("MSCOMMLib.MSComm")
   MSComm1.Settings = "9600,n,8,1"
   MSComm1.CommPort = 4
   MSComm1.InBufferCount = 0
   MSComm1.DTREnable = False
   MSComm1.PortOpen = True
     If Err Then
        MsgBox "COM" & MSComm1.CommPort & ": not opened, Sorry!"
        Exit Sub
     End If
End Sub

Sub ArduinoClose()
   MSComm1.PortOpen = False
   Set MSComm1 = Nothing
End Sub

Tested on ArduinoUno.

Can this info be added to Arduino FAQ?

Go Up