Debugging the USB Serial port on Arduino
Moderator: Benj
- CamargoF
- Posts: 36
- Joined: Thu Aug 02, 2018 8:16 pm
- Location: Sao Paulo, SP - Brazil
- Has thanked: 6 times
- Been thanked: 7 times
- Contact:
Debugging the USB Serial port on Arduino
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
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
- CamargoF
- Posts: 36
- Joined: Thu Aug 02, 2018 8:16 pm
- Location: Sao Paulo, SP - Brazil
- Has thanked: 6 times
- Been thanked: 7 times
- Contact:
Re: Debugging the USB Serial port on Arduino
By the way.
Please, help me. This is the last issue to release the firmware.
- 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.
Please, help me. This is the last issue to release the firmware.
- CamargoF
- Posts: 36
- Joined: Thu Aug 02, 2018 8:16 pm
- Location: Sao Paulo, SP - Brazil
- Has thanked: 6 times
- Been thanked: 7 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
I dislike the solution, but it works.
It looks like there is some problem on USB Serial component that does not transmit anything.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- CamargoF
- Posts: 36
- Joined: Thu Aug 02, 2018 8:16 pm
- Location: Sao Paulo, SP - Brazil
- Has thanked: 6 times
- Been thanked: 7 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
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.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
Works with simulation as well as hardware.
Martin
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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
Thanks for your suggestion. I would like to have your Flowchart. Would like to understand more of the simulation with USB/Uart ...
regards
Stefan
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
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.
- Attachments
-
- Ardunio UART Test 1.fcfx
- (9.75 KiB) Downloaded 311 times
Martin
- CamargoF
- Posts: 36
- Joined: Thu Aug 02, 2018 8:16 pm
- Location: Sao Paulo, SP - Brazil
- Has thanked: 6 times
- Been thanked: 7 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
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
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.
Last edited by zimmerMAN on Thu Sep 05, 2019 2:14 pm, edited 1 time in total.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Debugging the USB Serial port on Arduino
I use Putty, it does simple COM ports as well as SSH and telnet
http://www.putty.org
http://www.putty.org
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Debugging the USB Serial port on Arduino
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.
It even has a spy feature so you can snoop on a COM port but this requires payment and licensing.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel