Difference in port numbers. COM8 or COM9 ?

I am confused by this Serial Monitor output giving different port numbers. Please explain. Thanks

New Nano 33 IOT connected to PC.
Successfully uploaded and ran sketch at Files > Examples > Basics > Blink.
But something I don't understand on the serial monitor regarding Port Numbers.
Line 4 says PORT COM8
Line 6 says PORT COM9
Status Bar on IDE 2.1.1 says "Arduino NANO 33 IoT on COM8"

QUOTE
Sketch uses 11444 bytes (4%) of program storage space. Maximum is 262144 bytes.
Global variables use 3560 bytes (10%) of dynamic memory, leaving 29208 bytes for local variables. Maximum is 32768 bytes.
Performing 1200-bps touch reset on serial port COM8
Waiting for upload port...
Upload port found on COM9
"C:\Users\edabl\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM9 -U true -i -e -w -v "C:\Users\edabl\AppData\Local\Temp\arduino\sketches\751EBA729472AE77CEE8DBA3876B1DCE/Blink.ino.bin" -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
etc.....
UNQUOTE

The Arduino Nano 33 IoT uses native USB. That means the USB is handled by the microcontroller that runs your sketch. That USB code uses two different endpoint configurations. One for programming mode and one for normal mode. Only one of them is active at a time. Windows detects the configuration and uses different COM port numbers.

You can switch between the modes when using the reset button on the Arduino. Click vs double-click. Check the device manager. You should see one or the other COM port.

The IDE knows when it switches between the two modes and therefore you see the use of both COM ports.

On old Arduinos there is an additional chip that handles USB. It stays connected all the time and uses serial to talk to the main microcontroller.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.