Go Down

Topic: Pro Micro seen as Leonardo / COM port not reserved (Read 142 times) previous topic - next topic

michaelpop

Hello,
I have two problems.
First is that I bought three Pro Micro and one of them is seen as Leonardo, guess it has the wrong Bootloader on it. I'm not very into this, therefore I can't seem to find the instructions how to write the Pro Micro firmware to be seen as the other two ones, as Arduino Micro.

Second problem is that I need for my project two Micros connected to the computer. Each is doing another task, but they are controlled by the same software. I have to define in the software which COM port is doing which task. Unfortunately, after each restart they seem to switch randomly between them the comport numbers. It's always COM3 and COM8, but each time randomly assigned, although they are connected to the same USB ports in the USB hub. Is there any workaround to reserve a com port for a board, based on a hardware ID or something similar?

Thanks in advance for your kind responses.

sterretje

#1
Dec 21, 2020, 06:17 pm Last Edit: Dec 21, 2020, 06:19 pm by sterretje
Steps to burn the boot loader; never done it myself for the ProMicro

1)
If you haven't added the SparkFun boards yet
a)
In the IDE, open File->Preferences
b)
Add the following to the Additional boards manager urls: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
c)
Click OK
d)
In the IDE, open Tools -> Board -> Boards Manager
e)
Search for SparkFun AVR boards and click it.
f)
Click install
g)
Close the boards manager

You should now have entries for the SparkFun AVR boards in the IDE under Tools -> Board

2)
a)
Use a programmer or an Arduino as a programmer; for the latter, instructions on the web how to use an Arduino as an ISP
b)
Wire everything up; again, if you use an Arduino as the programmer, follow instructions on the web
c)
Select the COM port of your programmer
d)
Select the correct board ( SparkFun Pro Micro ) in the IDe under Tools -> Board
e)
Select the correct processor ( AtMega32U4 3.3V/8MHz or AtMega32U4 5V/16MHz ) in the IDE under Tools -> Processor
f)
Select Burn bootloader from the Tools menu in the IDE

I understand that the above is a little sparse but it should get you going.

===
Regarding you second problem, I doubt you can fix the com ports. An alternative is to let your application talk to the ProMicros that it has found and wait for a reply; your one ProMicro can reply with "Hi, I'm A" and the other one can reply with "Hi, I'm B".
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up