Go Down

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

jumpjack

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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy