My ProMini-PB connected to an OLED, nothing else in the ckt. This will not start the OLED (or maybe not start the Wire) when power is applied. The led will still toggle but no OLED display.
Once i press the reset button, the wire and OLED work as expected.
I have a Pro Mini with a ATMega-328PB processor. I installed the urBoot using the minicore board driver.
Any thoughts?
Thanks
John
I've removed all code that was not necessary to show the issue (see below)
Have you tried adding a small delay at the beginning of setup()? The OLED might need longer to complete any power-on reset and initialization than the Pro Mini.
Its a DIY-More display 128 x 32. Board and display are at 5V.
Board has no RST pin, only Vcc, GND, SCK, SDA
I also noticed if I remove the display when powered, replace the display, even a reset button on the pro mini doesn't start the display (just stays blank)
A similar board with a 328P (i.e. not the PB) and the "standard" boot loader works as expected.
My next step is to program the 328PB using ISP and no boot loader.
So at this point I don't know if it's the 328PB, or the bootloader or the hardware board.
I should state that I've used this/these displays for a number of projects with no issues up to now. Same display with an ESP8266 works fine.
I hadn't yet connected the scope to reset. I measured the power rise time which was pretty sharp.
Now looking at the reset, it seems the on board reset cap goes to DTR and not GND. Its one of those things one doesn't really see when looking at the schematic.
Of course this schematic may not match the board I have. I'll have to trace out the Reset Ckt. Also curious why the 328p (i.e. not th328PB) board seems to work.
I'll have to check. In the meantime, I physically verified on these boards the Reset Capacitor goes to DTR not GND. Now looking at the "official" pro mini schematic it is wired the same way, and yet I've never had an issue before with other boards.
That was my mistake it goes to DTR and other boards don't have a cap to ground.
However there can be a big difference in how urboot does a reset as compared to optiboot. Urboot has a lot of options for checking the reset reason and what to do for each. I'm not all that familiar with urboot but I think adding the cap will make it assume there was an external reset.
The minicore installation of urBoot only exposes a few options:
I prefer to ground the DTR pin when not using a programmer (FTDI serial) because if I put a cap from Reset to ground, in theory with a cap from Reset to ground a reset from the DTR line may only provide 1/2 the voltage at the Reset pin.
Curious that I've been playing with the Pro Mini for years and have never had a reset issue and I was blissfully ignorant of the capacitor ending at the DTR pin. I guess for some reason the urBoot and maybe the AT328PB are more finicky about the reset function.
Do you need a Bootloader?
There is no USB connector for direct programming.
Also when any Arduino (UNO , NANO) is used to program another UNO or Nano the Bootloader is deleted.
Note: I am not the expert here just curious, recently got a few Pro Mini's that I will test with an OLED.
Found this very old forum post regarding Bootloader and Pro Mini.
This is true. However, we would typically connect an external USB to serial adapter module (or cable) to the board. Although you could use an ISP programmer instead of that to upload sketches, you are probably going to want a serial connection to the board at least for debugging during project development, so it is convenient to use the serial connection for uploads as well.
The Pro Mini has a dedicated "FTDI header" specifically intended for the connection of an external USB to serial adapter. You can get adapters that have a header with the standardized pinout that allows you to plug it right into the header on the Pro Mini:
The Pro Mini is programmed via the bootloader from the serial port. I use an FTDI interface board to program this way. This of course requires a bootloader.
I could program this board using the ISP method of programming which will not require a bootloader. Without a bootloader the initial startup may be faster (milliseconds) but cannot be programed via the serial port. If I were to make a production device I would program the processor via ISP.