Go Down

Topic: disable auto-reset by serial connection (Read 16 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

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

shortcuts: alt+s submit/post or alt+p preview