Pages: [1]   Go Down
Author Topic: SOLVED - Cannot interface with the Due as a COM port  (Read 385 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm building a Windows application to interface with a board I'm working on that uses a SAM3X8E, same as the Due - and am just starting on the programming between Windows and the board.

I'm using a Due to test this interface, however - when I connect the Due (either USB port), it doesn't show up as a COM port in the Device Manager - just as 'Arduino Due Prog. Port' under 'Other Devices' - and the Visual Basic code I've found references COM ports. If however I use my Uno, it shows up as COM 4 and the VB code works with this.

I've written the software on the Due to take a 0 as LED off, 1 as LED on, 2 and LED flash - and I've got three buttons in my VB program, that work perfectly using the Uno.

Any ideas how to either get the Due to show up connected to a COM port, or else how to interface Visual Basic with the Due?

Code:
Imports System.IO
Imports System.IO.Ports
Imports System.Threading

Public Class Form1
    Shared _continue As Boolean
    Shared _serialPort As SerialPort

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SerialPort1.Close()
        SerialPort1.PortName = "com4"
        SerialPort1.BaudRate = 9600
        SerialPort1.DataBits = 8
        SerialPort1.Parity = Parity.None
        SerialPort1.StopBits = StopBits.One
        SerialPort1.Handshake = Handshake.None
        SerialPort1.Encoding = System.Text.Encoding.Default
    End Sub


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        SerialPort1.Open()
        SerialPort1.Write("1")
        SerialPort1.Close()
    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SerialPort1.Open()
        SerialPort1.Write("0")
        SerialPort1.Close()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        SerialPort1.Open()
        SerialPort1.Write("2")
        SerialPort1.Close()
    End Sub

End Class

Many thanks in advance!

EDIT - Oops, I just hadn't installed the drivers for the Due yet...
« Last Edit: July 31, 2013, 04:24:57 pm by jtw11 » Logged

Germany
Offline Offline
Edison Member
*
Karma: 1
Posts: 1355
Here we go!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just keep in mind, for the future, if you plan to use Linux that for that you don´t need any driver.

smiley

Bye
Logged

L'impossibile...richiede solo piu' tempo!

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep - I also use OSX, and didn't require any drivers.

A slightly off but on topic question here then I suppose, what exactly do the drivers tell the PC? Why does the Due not appear connected to a COM port prior to installation the drivers?
Logged

Pages: [1]   Go Up
Jump to: