Page 1 of 1

Debugging the USB Serial port on Arduino

Posted: Mon Aug 06, 2018 1:10 am
by CamargoF
I configured the Arduino USB as serial and I would like to know how FC8 can help me to see all transmitted data.

I set the Simulation COM Port on USB_Serial panel, but it is not displaying anything on console when I ran the code in Arduino.
The console displayed all USB_Serial messages when running my code on FC8 simulation, but I need the check the real world now.

Any recommendation?

Best regards,

Fernando

Re: Debugging the USB Serial port on Arduino

Posted: Mon Aug 06, 2018 3:44 pm
by CamargoF
By the way.
  • I created the driver, using the USB Driver option on USB_Serial Panel, but Windows 10 did not accept it due to the lack of signature.
  • I installed the USB Driver I got from USB Serial Wiki. The installation was a success, but Windows refuses to use it. The device manager shows the USB-SERIAL CH340 (COM3) is running the wch.cn driver.
I installed the (old) Hyperterminal to see the messages from Arduino, nut nothing has been displayed.

Please, help me. This is the last issue to release the firmware.

Re: Debugging the USB Serial port on Arduino

Posted: Mon Aug 06, 2018 7:50 pm
by CamargoF
I replaced the USB_Serial by the UART component and I was able to receive the data from USB port. :?
I dislike the solution, but it works.
It looks like there is some problem on USB Serial component that does not transmit anything.

Re: Debugging the USB Serial port on Arduino

Posted: Tue Aug 07, 2018 11:06 am
by Benj
Hello,

Most Arduino devices have an USB to Serial IC on board and so the USB is converted to serial data which is connected to the UART on the AVR IC.

Using the USB Serial component will not work because it requires a true USB connection from the microcontroller rather than a UART connection.

Under the Tools component menu there is a Serial Monitor component you can use to see the data coming from your Arduino using the Flowcode console.

Re: Debugging the USB Serial port on Arduino

Posted: Tue Aug 07, 2018 10:36 pm
by CamargoF
Understood.
The USB on Arduino Uno R3 is not a true USB, so I have to use the UART, correct?
I will check the console. Best regards.

Re: Debugging the USB Serial port on Arduino

Posted: Wed Aug 08, 2018 8:00 am
by medelec35
If you get stuck, then I have a test flowchart that sends and receives via USB/UART connection for UNO.
Works with simulation as well as hardware.

Re: Debugging the USB Serial port on Arduino

Posted: Wed Aug 08, 2018 8:23 am
by stefan.erni
Hi Martin

Thanks for your suggestion. I would like to have your Flowchart. Would like to understand more of the simulation with USB/Uart ...

regards
Stefan

Re: Debugging the USB Serial port on Arduino

Posted: Wed Aug 08, 2018 11:22 am
by medelec35
Hi Stefan,
There are two ways of achieving what you want to do.
1 Ben's suggestion which is using the Serial monitor (See attached flowchart)
2 Using a serial terminal emulator like Tera Term and setting it for the port that Arduino is set to.
If using either method and they have the port open, then you must make sure port is closed before sending any programs to hardware.
With the first option, you must manually change the serial monitor Connection from Open to close.
Relying on the automatic stopped my Uno from being programmed.
When finished programming then change back to open.
Don't forget as the serial is monitoring the hardware, no need to run simulation.
Serial Mon.png
(43.61 KiB) Downloaded 2718 times

Re: Debugging the USB Serial port on Arduino

Posted: Wed Aug 22, 2018 8:08 pm
by CamargoF
I was missing some tool to help me to see the USB serial port communication when I load the firmware into Arduino.

As I was not able to find any tool on Flowcode I installed Arduino to use its Serial Monitor tool, and it worked very well.
This tool allowed me to see the transmitted data as well as to sent commands to Arduino through the serial port. It is a handy tool.

Re: Debugging the USB Serial port on Arduino

Posted: Wed Feb 13, 2019 2:47 pm
by zimmerMAN
The only one I have found for x64 is Serial port monitor which is really quite good. Not free, but how is the output good. There is a 14-day trial. Honestly, I've been hoping (for quite a while now) that Mark R. would release a 64-bit version of portmon.

Re: Debugging the USB Serial port on Arduino

Posted: Wed Feb 13, 2019 3:50 pm
by LeighM
I use Putty, it does simple COM ports as well as SSH and telnet
http://www.putty.org

Re: Debugging the USB Serial port on Arduino

Posted: Wed Feb 13, 2019 4:10 pm
by Benj
I use RealTerm, It's a sourceforge project and works well.

It even has a spy feature so you can snoop on a COM port but this requires payment and licensing.