Go Down

Topic: How is the bootloader burned? (Read 1 time) previous topic - next topic

sciguy77

Hi guys,

I'm considering doing my first surface mount project with an Atmel32U4. I'd like to use an assembly house and have the 32U4 come with the bootloader already installed. How is the Arduino bootloader burned on a small and large scale?


Thanks!

fungus


I'm considering doing my first surface mount project with an Atmel32U4. I'd like to use an assembly house and have the 32U4 come with the bootloader already installed. How is the Arduino bootloader burned on a small and large scale?


Students/interns with ZIF sockets...?

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Zapro

Put on an 6-pin ISP header for programming the boards after production ?!

// Per.

fungus

#3
Dec 31, 2012, 11:57 am Last Edit: Dec 31, 2012, 12:01 pm by fungus Reason: 1

Put on an 6-pin ISP header for programming the boards after production ?!


Yep. Using a bootloader on a production board seems silly to me, the chips are designed to be programmed with ISP signals.

Plus a bootloader makes programming into a two-step process (bootloader then software) when it only needs one step.

You could add an ISP header but it seems easier to add six bare pads on one edge of the board then stick the board into one of these to program it:


Edit: A six-pin version, obviously...

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

fungus

#4
Dec 31, 2012, 12:00 pm Last Edit: Dec 31, 2012, 12:02 pm by fungus Reason: 1
PS: How's this for a hack? I found this when I was searching for the pic of the PCB connector... :)



No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Zapro

That connector is called an Edge-connector and i would not recommend that for ISP.

You need to place 6 ISP pads and use a pogo-pin probe for programming.

http://www.mkroll.mobi/?p=665

// Per.

fungus


You need to place 6 ISP pads and use a pogo-pin probe for programming.

http://www.mkroll.mobi/?p=665


Those are cool, too... :)

(might have to get some...)
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

CrossRoads

You can also use a smaller connector, like a JST 1.5mm connector.
http://www.digikey.com/product-detail/en/B6B-ZR(LF)(SN)/455-1661-ND/926568
Crimp on male pins and stuff into a 2x3 housing for your AVR ISP to plug into.
http://www.pololu.com/catalog/product/1931
http://www.pololu.com/catalog/product/1911

Large scale, you would use a TQFP socket and to connect to the programmer, and program them before installation.
http://www.emulation.com/catalog/off-the-shelf_solutions/sockets/qfp/
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

sciguy77

Hmmm looking at Sparkfun's Arduino-compatible lineup I don't see anything that looks like what you guys are talking about. Looking here: https://www.sparkfun.com/products/11098 I can't figure out how they burned the bootloader to it...

CrossRoads

The 32U4 comes with an atmel bootloader preinstalled.

"- Optional Boot Code Section with Independent Lock Bits
    In-System Programming by On-chip Boot Program
    True Read-While-Write Operation
   All supplied parts are preprogramed with a default USB bootloader"

To change it, connect the programmer to SCK, PDI (i.e. MOSI), PDO (i.e. MISO), Reset, Gnd, +5, and download away.

"28.7 Serial Downloading
Both the Flash and EEPROM memory arrays can be programmed using a serial programming
bus while RESET is pulled to GND. The serial programming interface consists of pins SCK, PDI
(input) and PDO (output). After RESET is set low, the Programming Enable instruction needs to
be executed first before program/erase operations can be executed. NOTE, in Table 28-14 on
page 361, the pin mapping for serial programming is listed. Not all packages use the SPI pins
dedicated for the internal Serial Peripheral Interface - SPI."
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

sciguy77

Quote
The 32U4 comes with an atmel bootloader preinstalled.


The SFE page also says that its compatible with the Arduino IDE. So if I buy a 32U4 from Digikey will I still be able to program it via usb/Arduino IDE? Or will I need to replace the Atmel bootloader with an Arduino one first?

CrossRoads

I would figure you could download to it as is.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

sciguy77

From the SFE notes (https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/32U4Note.pdf)

"Any Arduino-compatible product that we build using the ATMega32U4 is going to ship with a new version of the Caterina bootloader (developed by Arduino for the Leonardo)."

So Sparkfun is burning bootloaders to the Pro Micros by the hundred, and I don't see an ISP header or the six pads mentioned earlier. How is SFE burning all these bootloaders?

CrossRoads

They connect to the ICSP pins - SCK, MISO, MOSI, Reset, +5, Gnd.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

CrossRoads

Or, they preprogram the parts in a TQFP socket before assembly.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up