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) Debug the board with two COM ports. (Read 5133 times)
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Debug the board with two COM ports.
Mar 14th, 2018 at 12:47pm
Print Post  
Hey.I have a USB TTL converter.Screenshot below.
How do I set up debugging on my board (UNO, Nano, Leonardo)?
I need to send from the computer the text strings, in the Arduino board to analyze what came from the computer.
Please give a step by step instruction
What and how to connect and most importantly how to configure the Visual Micro.
« Last Edit: Mar 14th, 2018 at 12:48pm by Aleks »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug the board with two COM ports.
Reply #1 - Mar 14th, 2018 at 1:37pm
Print Post  
You can use the vMicro>Debugger menu to set the local and remote port

In your case your boards will not know about the 2nd port so you need to use SoftwareSerial.

Visual Micro shows SoftwareSerial as a "Remote Port" in this case you also need to specify the rx and tx pins and set the Remote speed to max 56k in the "Remote Speed".

There is more info here
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debug the board with two COM ports.
Reply #2 - Mar 14th, 2018 at 3:26pm
Print Post  
Sorry, I do not know much English and the documentation is not so clear.

Let's start in order
There is a COM port through which the board will be programmed.
The same port (if I understand it correctly) will be used by the board for official debugging purposes.

But I need this port in order to send my data to the board and I do not want the official data to get in the way.
If I correctly understood that the board would not use this port for its purposes.
Do I need to configure SoftwareSerial?
Specify the COM port of the TTL converter  in the Remote Port parameter, the speed, and the Rx and Tx pins that are connected to the TTL converter?

Could you give an example of a sketch when working with such a debugging configuration?
An example is desirable with the use of the Serial class
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug the board with two COM ports.
Reply #3 - Mar 14th, 2018 at 5:42pm
Print Post  
Hi,

You just set the "vMicro>debugger" menu as stated previously.

Ensure the Rx/Tx pins on the visual micro debugger menu reflect the rx/tx pins you have used on your arduino board.

  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debug the board with two COM ports.
Reply #4 - Mar 15th, 2018 at 2:41pm
Print Post  
I can use any analog and digital PINs?
  
Back to top
 
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debug the board with two COM ports.
Reply #5 - Mar 15th, 2018 at 8:23pm
Print Post  
Tim@Visual Micro wrote on Mar 14th, 2018 at 5:42pm:
Hi,

You just set the "vMicro>debugger" menu as stated previously.

Ensure the Rx/Tx pins on the visual micro debugger menu reflect the rx/tx pins you have used on your arduino board.



Give me a step-by-step instruction on how to set me up?
or return the money, I'm already tired of keeping a correspondence.
Your instruction is incomprehensible.
http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Por...

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug the board with two COM ports.
Reply #6 - Mar 15th, 2018 at 10:00pm
Print Post  
That's not fair the document you linked has been used by many quite adequately. By the way there are many free trials in the software to allow people to try before they buy. 

Your problem is you need help with arduino more than with visual micro so please play nice. I am trying to help you but you do need to give more information. 

It is also fair to say that you have an advanced additional serial port extension which allows you to use arduino to send serial messages over software serial. It is your responsibility to learn about the hardware you buy and there are many software serial examples and tutorials on the arduino.cc web site. None of this connectivity is unique to visual micro it is just standard arduino.

The visual micro debugger does allow you to debug using software serial without requiring much learning on your part. You do need to know how you want to connect your rx/tx pins. This is your choice based on your hardware and nothing to do with visual micro.

You can find many SoftwareSerial arduino guides that allow you to decide which pins you want to use. Common pins for the Leondardo are pin 8 and pin 9. So connect a wire from pin 8 and pin 9 to your usb adapter noting which is rx and which is tx. Look on your adapter to see the the rx/tx labels.

When you have set your rx/tx (and connected power if required). Please don't ask me how to connect power to the usb adapter that's your job to resolve and differs for all adapters.

After you have connected the arduino to your usb adapter connect a usb cable from your adapter to your pc. If you have installed usb drivers correctly a new COM port will appear in the ports list.

To this point in this message I have not mentioned anything related to visual micro. Just standard arduino and things you need to learn about.

Now that you have a 2nd connection to your pc from your arduino you have the few bits of info you require to follow my original instructions:-

Set the vMicro>debugger>local port to the new COM port
Set the vMicro>debugger>local speed to 57600
Set the vMicro>debugger>Remote port to SoftwareSerial
Set the vMicro>debugger>Rx and Tx pins to the numbers you noted earlier

Now you should be good to go.

If debug does not work then you need to prove your software serial connection is working. Do that by switch the combo on the toolbar from Debug to Release and opening an Arduino Software Serial example that prints to the serial terminal. When not debugging you can open a serial monitor on your new COM port using the "Other" option next to the ports list on the tool bar.  Learn about software serial here https://www.arduino.cc/en/Reference/SoftwareSerial
 
Software Serial has been around for a long time. If you have any issues at all we always recommend that people learn the Arduino IDE basics for a few days or weeks and follow their basic tutorials to first understand your hardware before jumping to quickly into advanced IDE's.

Thanks
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debug the board with two COM ports.
Reply #7 - Mar 16th, 2018 at 3:41pm
Print Post  
Thanks for the extensive response.

But I'm not entirely clear.
In the documentation you write, you can specify any pin.
Do you respond to me that only spec?
Where is the truth?

The fact that you wrote, and so I tried, and swapped the RX and th. Nothing works. The only thing I did not do.

I'm not a dummy:).
I wrote my first program in 1985 at the age of 10 on the ZX Spectrum.
I have a problem, as it is correct, on which pins to connect arduino.
What settings can be set in the project properties.
(I do not understand what the local port means, which means a remote port)
I do not understand how to work with two ports in a sketch and handle the necessary port for which I will send text from the computer)

PS You need pictures for some documentation:)
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug the board with two COM ports.
Reply #8 - Mar 16th, 2018 at 4:20pm
Print Post  
Please open arduino ide and make blink or a simple program work with software serial.

You can also do this in visual micro with tool bar set to release instead of debug.

Now you will be in pure arduino and can use arduino tutorials to establish a connection

When you understand the simplicity of arduino software serial and how it works you will answer all your questions  Smiley


« Last Edit: Mar 16th, 2018 at 4:22pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint