Change Bootloader on Arduino Pro Mini 3.3V/8Mhz

Hello,

I am using an Arduino Pro Mini 3.3V/8Mhz and need to modify to bootloader, because I need one Pin to be high as soon as possible after turning on. I thought while I am at it, I might change to optiboot to free some flash. So the first step is to burn an optoboot bootloader and see if its working.

Now my question: Can I use an Duemilanove@5V with ArduinoISP to programm the Pro@3.3V by just using a voltage divider for SCK and MOSI? Does it matter that SPI on the Pro is connected to something else, too? (it shouln't, right?)

Can I use the bootloader built from 1.01 source for atmega328_pro8 target? Are there any traps I need to be aware of, like Fuses?

Thank you!

Would a pull-up resistor do it ?

Not sure what you mean: -For the original problem: No, certainly not. -For programming: How? ;)

Can you explain why it should be high, what is connected to it ? Can upload your schematic, or a photo, links to a sensor or driver that is connected... and so on.

At power up, all digital and analog pins are high impedance (floating, inputs). So it depends on what is connected to it, how it will behave at power up. The bootloader uses the RX and TX pin, but doesn't use the other pins. The other pins stay high impedance.

Only after pinMode() a pin is set low. Or if you use digitalWrite() first, the pinMode(OUTPUT) sets it high.

De normal way to set a pin high or low, is to use a pull-up or pull-down resistor. Suppose you use a pull-up resistor of 10k to Vcc (3.3V), that would make the pin high. After using pinMode(), the output of the Arduino overrides the 10k, and you can set it high or low with digitalWrite().

You see, I'm not answering your questions yet, I think it is better to fix the original problem first.

Ok, I am trying to get the software to turn off the Arduino with as less parts as possible. I use a ncp1402 as powersupply. The CEpin is pulled to ground. To turn power on, a button connects 3.3V to the CE pin of the ncp1402. A small capacitor holds CEup till the arduino sketch starts and turn on an output pin which is connected to CE. The gain more reliability I could either use a bigger cap (what also make the shutdown time longer) or solve it in software. I cannot use a pull-up, because I use a pull-down to ensure my device is turned off..

I am currently at a sketch size close to the limit and started to ditch the print class just to save a few bytes, so additional flash would be great.

So I have to problems pointing me to switching the bootloader..

The "programmer" running ArduinoISP should detect 3V3 as high, because 3V3 > 0.6*5V, right? For the fuses I would use : pro328.bootloader.low_fuses=0xFF pro328.bootloader.high_fuses=0xDE pro328.bootloader.extended_fuses=0x05

What is the "most bug free" version of optiboot?

Could you kill two birds with one stone by using an ISP (maybe something like this http://www.suntekstore.co.uk/goods.php?id=14002608&utm_source=gbuk) You could free the memory used by the bootloader for your program and because there is no bootloader your program will run sooner thus allowing you to set the output pin quicker.

That would also be an option. But I would rather first try to use the 5V Arduino as ISP programmer and install optiboot..

Doesn't anybody have informations about whether it's possible as described or not?

Thanks!

"Doesn't anybody have informations about whether it's possible as described or not?"

Sure, its just software, right? You're limited on how much memory you can free tho by the fuse settings. For a '328, your choices are: 256 words 512 words 1024 words 2048 words

I believe plenty of work has been done already to squeeze down into 512 byes. I don't know where the source code is; perhaps stored on github somewhere.

yeah, that is optiboot. I know and want to install exactly that bootloader. My question is whether I can use a 5V arduino to programm the 3.3v pro mini. Second question is: do i need additional patches to the github 1.01 source?

Yes you can. Disconnect it from other stuff. Connect Arduino's 5V to promini's VCC pin (not RAW). Promini will run just fine at 8 MHz, 5V.

"Second question is: do i need additional patches to the github 1.01 source? " I don't know, I've not tried to create a bootloader, I've only installed what others had created.

thank you, can use a voltage divider and run the pro mini at 3.3v? i want to programm while other, non 5v tolerant devices are connected to vcc..

You'll have better results using a active voltage level shifter chip due to the speeds involved. How much 3.3V current does the rest require?

Is "better results" a kind way of saying it won't work or just not reliable? ;)

The other devices drain not much current, max. 20mA. But to disconnect them from VCC I would have to disassemble the whole project..

Not reliable.

Next project plan to socket the uC.

I use these pins on promini's in these sockets, or wirewrap sockets.

http://www.dipmicro.com/store/HDR40X1MM http://www.dipmicro.com/store/HDR40X1FM