Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Can't debug using different USB port (Read 13216 times)
canol
Newbies
*
Offline


Posts: 8
Joined: Oct 30th, 2013
Can't debug using different USB port
Oct 31st, 2013 at 8:38am
Print Post  
Hello,

I am trying to use Visual Micro to debug my Arduino program. I need to use custom pins for RX/TX since I use the main USB port for communication between a PC program and Arduino.

I read the article below:

http://www.visualmicro.com/post/2013/04/26/How-to-debug-Arduino-on-a-different-u...

But I guess I have a problem with the hardware connections. I prepared my connections like the images below:




I connected to pins 0/1 in this setup but I tried different pins like 7/8 as well.

My project configuration is like this:

Local Port: COM6
Remote Pin RX: 0
Remote Pin TX: 1
Remote Transport: SoftwareSerial

But the computer cannot see any devices and so I don't know what is the port name (COM?).

Whereas if I connect the regular USB cable to the Arduino it works without any change in configuration:



And the device is seen to be connected to COM6.

So what might be the problem? Why is my device not seen by computer when I connect USB cable to pins 0/1?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't debug using different USB port
Reply #1 - Oct 31st, 2013 at 1:39pm
Print Post  
Hi,

The Arduino hardware has a usb chip connected to the main usb port which is why windows detects it.

To connect to digital pins you need a cable that has a chip on board like this one 

I hope that helps
  
Back to top
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: Can't debug using different USB port
Reply #2 - Oct 31st, 2013 at 1:43pm
Print Post  
Is that a regular USB cable you soldered up to the wire going to your Arduino.  That will NOT work.

At the bottom of the link to instructions you posted it says "There are lots of different cables and usb/serial converts.  I find this cable very useful for lots of things (you might find it cheaper elsewhere) FTDI 5v Cable (there is also a 3v version)"

An FTDI cable has an FTDI chip inside of it to translate between USB and serial because you cannot directly hook it up like that.  I actually prefer to use a device called an FTDI friend which just attaches to the end of a USB cable.

The following is an FTDI Friend :



And this is a standard FTDI cable


  
Back to top
 
IP Logged
 
canol
Newbies
*
Offline


Posts: 8
Joined: Oct 30th, 2013
Re: Can't debug using different USB port
Reply #3 - Nov 1st, 2013 at 8:18am
Print Post  
Thank you very much for your responses. Looks like my local distributer has that FTDI cable so I will buy it.

Is it enough to connect FTDI cable's RX and TX pins to the Arduino or should I connect the other pins as well? If I need to connect CTS or RTS pins then where should I connect those pins on Arduino?

I found this connection diagram on SparkFun web site for FTDI Friend, is this true:

Code
Select All
  FTDI Basic | Arduino
  DTR ---------- Reset
  TXO ---------- RXI
  RXI ---------- TXO
  VCC ---------- +5V
  CTS ---------- GND (pull low)
  GND ---------- GND 

« Last Edit: Nov 1st, 2013 at 8:45am by canol »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't debug using different USB port
Reply #4 - Nov 1st, 2013 at 12:58pm
Print Post  
Hi, the rx/tx are fine, not other pins required. 

Actually the RX is only required for break/pause and if you want to modify the values of variables while the Arduino is running.
  
Back to top
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: Can't debug using different USB port
Reply #5 - Nov 1st, 2013 at 7:23pm
Print Post  
Pretty sure the FTDI ground pin needs to be connected to the Arduino's ground as well.  

I suggest reading up Sparkfun's FTDI guide https://www.sparkfun.com/tutorials/245.  Scroll down to the picture that describes the connection that looks like this and read what it says:
  
Back to top
 
IP Logged
 
canol
Newbies
*
Offline


Posts: 8
Joined: Oct 30th, 2013
Re: Can't debug using different USB port
Reply #6 - Nov 4th, 2013 at 10:13am
Print Post  
Thank you very much. I connected 3 pins RX/TX and ground and it works. It looks like working even if I don't connect the ground pin (probably because I power and debug the Arduino from the same computer's USB ports so ground levels are the same). I connected it anyway just to be safe.
« Last Edit: Nov 4th, 2013 at 10:16am by canol »  
Back to top
 
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: Can't debug using different USB port
Reply #7 - Nov 4th, 2013 at 12:05pm
Print Post  
Great.  Glad to hear it is working.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't debug using different USB port
Reply #8 - Nov 4th, 2013 at 3:22pm
Print Post  
Great news, thanks for the update. If using the ftdi cable you certainly don't need ground. I've debugged happily with just one wire on tx.

The ftdi friend looks interesting, I'm going to get one of those  Smiley
  
Back to top
IP Logged
 
canol
Newbies
*
Offline


Posts: 8
Joined: Oct 30th, 2013
Re: Can't debug using different USB port
Reply #9 - Nov 4th, 2013 at 4:11pm
Print Post  
Yeah, I used this piece named "FTDI Basic Breakout" to be exact:

https://www.sparkfun.com/products/9716

This looked more durable than the cable and a little bit cheaper (since you need to buy an ordinary Mini-B USB cable with it if you don't have one already). I guess this is pretty similar to the FTDI Friend Dennis mentioned.
« Last Edit: Nov 4th, 2013 at 4:18pm by canol »  
Back to top
 
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: Can't debug using different USB port
Reply #10 - Nov 5th, 2013 at 3:27pm
Print Post  
canol wrote on Nov 4th, 2013 at 4:11pm:
I guess this is pretty similar to the FTDI Friend Dennis mentioned.


Yes they both use the same FT232RL chip but the Sparkfun version is a bit smaller because of the header placement.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint