I would like to say this is the first time I ever seek help on this forums, so sorry in advanced if I make mistakes! I’m having a (very) frustrating issue with a Binghe Pro Micro clone (ATmega32U4, 5V/16MHz, USB-C) which can be found here: Pro Micro Development Tips with 32U4 Chip Binghe Pro Micro 5V/16MHz Microcontroller Upgrade USB Standalone Type-C Interface Compatible with Arduino : Amazon.fr: Industrial & Scientific. When I upload a sketch via the Arduino IDE (detected as a Leonardo card), it works perfectly immediately after uploading, I do however have to ‘reset’ it before uploading I hooked up a push button to the RST pin. Furthermore, after I unplug and replug the board or reset it, the sketch does not run automatically. It’s like the board “forgets” the sketch or never starts it after a power cycle.
Here is what I’ve tried so far:
Verified correct board selection (SparkFun Pro Micro 5V/16MHz, Arduino Leonardo and Arduino Micro incase) in the Arduino IDE.
Flashed the official Caterina then SparkFun’s bootloader using an Arduino Uno as ISP programmer.
Tried “Upload Using Programmer” to bypass the bootloader, but I get errors like butterfly_recv(): programmer is not responding. Eventually it seemed to have work but now it seemd to have ‘bricked’ my board. Whenever I attempt to upload anything the two back LEDs stays run red without moving.
Checked all wiring for ISP programming multiple times; cables and connections seem fine. Which again wouldn’t have worked anyways but the burning/sketch tests (after power cycle) were absolutely dandy.
Tested multiple sketches including very simple ones like Blink and OLED display tests. (which works fine on my Uno, same code). Weirdly enough, if I use a built-in LED test sketch (pin D17 for this board) even after unplugging & plugging back the board. For this one, the board didn’t seem to have “forgotten” it.
Compared behavior with an Arduino Uno, which works flawlessly on power cycle.
Tried resetting the board multiple times, including double reset to activate bootloader manually.
I’m suspecting a bootloader issue or maybe a hardware difference with this Binghe clone that prevents auto-start of sketches after power on. I’ve been stuck on this for two days now… hopefully someone can help me, thanks in advance!
Are you saying that you can consistently upload either one of the blinkies or an empty sketch without having to use the reset button? If so the problem is in your sketch.
Upload using programmer wipes the bootloader and you can no longer do normal uploads; for that you need to burn the bootloader again.
PS
For further troubleshooting, can you tell us which operating system and which version of the IDE you are using?
Yes and no. Sometimes just uploading the sketch (never tried empty) without using the reset button. Sometimes it hangs until it gives me an error or until I cancel it. However, most of the time as reflex I do press the reset button so that isn’t really an issue. Also, the sketch works fine so it doesn’t seem to be a problem at all, as far as I know obviously.
I see, I had no clue! I’ll burn the Arduino Leonardo bootloader again. Unless you want me to try another one specifically?
Of course! I’m using Windows 11 (10.0.26100 Build 26100), as for the IDE:
P.S: I downloaded it literally the day I got these components delivered which was 3 days ago. As I wiped my PC around 2 months ago, so the installation of Arduino is fresh.
Disable Show verbose output during compile and enable Show verbose output during upload under File → Preferences. Also enable Verify code after upload under File → Preferences.
I'm not sure if your board will be recognised as an Arduino Leonardo in Windows device manager because there is no sketch loaded yet.
Now upload the empty sketch. If the board did not show in Windows device manager you can tap the reset button when you see the following message
Performing 1200-bps touch reset on serial port COM24
Upload should succeed and successive uploads of that empty sketch should consistently not require the reset button to be pressed at any time; not when starting a new upload and not after an upload was performed.
The output of the upload should look like
Performing 1200-bps touch reset on serial port COM24
Waiting for upload port...
Upload port found on COM6
...
...
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
...
...
avrdude: 3784 bytes of flash written
avrdude: verifying flash memory against C:\Users\bugge\AppData\Local\arduino\sketches\E543ED023CA4E73A8924637669713AF0/sketch_aug9b.ino.hex:
avrdude: load data flash data from input file C:\Users\bugge\AppData\Local\arduino\sketches\E543ED023CA4E73A8924637669713AF0/sketch_aug9b.ino.hex:
avrdude: input file C:\Users\bugge\AppData\Local\arduino\sketches\E543ED023CA4E73A8924637669713AF0/sketch_aug9b.ino.hex contains 3784 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.04s
avrdude: verifying ...
avrdude: 3784 bytes of flash verified
avrdude done. Thank you.
To have a visual indication if it all works you can replace the blank sketch by one of the blinkies or by the below sketch
After the upload you can open serial monitor and you should see an update roughly every second of the milliseconds in the serial monitor.
You can repeat the upload of this example and you should never need the reset button.
If you have inconsistent results where uploads sometimes don't seem to finish and you need to press the reset button to see blinkies or the output of the above test sketch you can post the full result of the upload here; please do not forget to embed it in output in code tags by using the <CODE/> button in the composer window.
It was recognized as Leonardo instantly. I did not see the message you mentioned, I have to press the reset button when at the phase “Waiting for upload port…”:
Sketch uses 3462 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.
Waiting for upload port...
Upload port found on COM6
avrdude: Version 6.3-20190"C:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega32u4 -cavr109 "-PCOM6" -b57600 -D "-Uflash:w:C:\Users\Kowaulsky\AppData\Local\arduino\sketches\4D27B4C0A120B5C84DD737F1A52F414C/Blink.ino.hex:i"
619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM6
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\Kowaulsky\AppData\Local\arduino\sketches\4D27B4C0A120B5C84DD737F1A52F414C/Blink.ino.hex"
avrdude: writing flash (3462 bytes):
Writing | ################################################## | 100% 0.38s
avrdude: 3462 bytes of flash written
avrdude done. Thank you.
So I did try this code; again it works when I upload the sketch I do see the blinking LEDs + the update in the serial monitor. If I unplug the board then plug it back, the sketch works perfectly.
I then decided to try out my OLED sketch test. It’s an I2C OLED module (product link). I used this code:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C // Common I2C address for SSD1306; may be 0x3D on some modules
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
// Initialize serial for debugging (optional)
Serial.begin(9600);
// Initialize the OLED display
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;); // Loop forever if initialization fails
}
// Clear the buffer
display.clearDisplay();
// Set text properties
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0, 0); // Start at top-left corner
// Display test message
display.println(F("Hello, World!"));
display.display(); // Show the display buffer on the screen
}
void loop() {
// No ongoing actions needed for basic test
}
But… when using it on the Uno it works fine. When using it on the Micro Pro, it doesn’t. Good news though is that now I indeed don’t have to use the RST pin everytime, it does it automatically.
Sketch uses 16216 bytes (56%) of program storage space. Maximum is 28672 bytes.
Global variables use 486 bytes (18%) of dynamic memory, leaving 2074 bytes for local variables. Maximum is 2560 bytes.
Performing 1200-bps touch reset on serial port COM5
Waiting for upload port...
Upload port found on COM6
avrdude: Version 6.3-20190619"C:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega32u4 -cavr109 "-PCOM6" -b57600 -D "-Uflash:w:C:\Users\Kowaulsky\AppData\Local\arduino\sketches\4CFD69B22B44791DA18787718387C1FC/ssd1306_128x32_i2c.ino.hex:i"
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Kowaulsky\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM6
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\Kowaulsky\AppData\Local\arduino\sketches\4CFD69B22B44791DA18787718387C1FC/ssd1306_128x32_i2c.ino.hex"
avrdude: writing flash (16216 bytes):
Writing | ################################################## | 100% 1.72s
avrdude: 16216 bytes of flash written
avrdude done. Thank you.
Keep in mind, yes I double checked the wiring and it worked before when I uploaded the sketch (just didn’t after a power cycle) now it’s not at all. I used a BUS Address scanner to find the address of the module and it’s indeed at 0x3C (which worked on Uno anyways).
I was not referring to your OLED sketch specifically. The upload is successful.
I can't really help you with the OLED sketch problems except for the advice to check the wiring against the official Pro Micro pinout. Maybe SDA and SCL swapped?
Nope I checked that 5 times already. I know it works as the OLED works with Uno + worked before I made this thread when uploading the sketch (not after power-cycle). Unsure what to do honestly it’s crazy. I think I’ll try to use my MicroSD SPI module see if that one works flawlessly, to see if it comes from the Micro Pro or the module itself.
I have a breadboard. It does come with headers just not with them soldered. However, funny enough, when I use the headers I can’t get the pins to work at all despite me testing them with my multimeter they do allow current to go through so unsure what’s going on with that.
Keep in mind I’ve always used this kind of wiring when prototyping, it has never caused me issues. I didn’t solder the headers as I plan to solder the wires directly onto the board, it’s how I was taught anyways.
Edit: This wiring is NOT for the OLED but for the MicroSD SPI module. Which surprisingly doesn’t work with the Micro Pro (even after double checking the wiring + test everything with a multimeter) but works fine with my Uno.
College degree that specializes in electronics and basic CS. Currently in Engineering university though which teaches the same way of using breadboards for prototyping, which has never caused any issues. So soldering will fix it? If so, should I just solder the headers then I suppose unsolder them to solder the final wires?
I see, thank you. Was never taught that weirdly enough but it makes sense. I’ll try and see how it goes, hopefully it was just that. Do you reckon I should just solder the header pins for testing then remove them for the final wires once the testing phase is over?