Go Down

Topic: Bootloader with crystal question. (Read 826 times) previous topic - next topic

Mr. Swarf

I poked around the archives and could not find an answer to this question...

If I were to use a minimal setup on a breadboard, just an ATMEGA, 10K resistor, .1 uF cap  and some wire, could I burn a bootloader with full external crystal support?

I'd then remove the ATMEGA from the board and place it in an Arduino 'compatible' board with an external oscillator (no ISP connector).

I'm ASSuming this would work. Yes? No?

Thanks!
M.S.

CrossRoads

Probably not without changing fuse settings.
Need one setup for internal oscillator settings, need another setup for external crystal.
Why not just get a crstal and 2 22pf caps?
http://www.dipmicro.com/store/XC7-16000 33 cents
http://www.dipmicro.com/store/C1K22-1000 40 cents for 2
$2.50 for shipping.
$3.25 and make a lot of problems go away.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Mr. Swarf

Maybe I was not clear...

The board the MCU would be actually running in has an external oscillator. It does not have an ISP connector. Although I could just rig some jumpers.

What I want to know is, can I burn the bootloader for the 328 in that board while the IC is on a breadboard without? I'd like to know if this works. Even if I can easily get a crystal and caps...

Heck, I ought to just try it and see for myself...

M.S.

CrossRoads

Yes, try it. Am not sure how cleanly the 16MHz carry over using jumper wires, that may cause you a problem.
All the examples I have seen using a depopulated Duemilanove for example jumpered over to a breadboarded part for programming had an oscillatar with the breadboarded part, which I would suggest to match your final configuration.
Some of the early discussions I saw when I started arduino-ing involved 2 and 4 parts on PCBs running off the same crystal (not sure if that was this forum or not,  I came across one or two less useful ones before settling here). But that was colocated chips & PCB traces, not wires up in the air.
Be sure to let us know if it works!
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

BenF


What I want to know is, can I burn the bootloader for the 328 in that board while the IC is on a breadboard without? I'd like to know if this works. Even if I can easily get a crystal and caps...

Heck, I ought to just try it and see for myself...

If I'm not mistaken, the burn sequence sets fuses first and then uploads the bootloader. When avrdude gets around to actually burn the bootloader code, the atmega will be expecting an external crystal and so will not respond unless one is present.

Fuse settings used for an external crystal will work equally well with an external oscillator so one option is to hook up a 16MHz oscillator (rather than crystal + caps) to your burn target.

alparent

#5
Mar 07, 2011, 01:24 pm Last Edit: Mar 07, 2011, 01:26 pm by alparent Reason: 1
Something like this?
http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Note that is the steps to burn a sketch to the breadboard chip. You need to remove the chip one the Arduino board and add a jumper between the reset on the Arduino board and the pin1 of the breadboard chip. 

Mr. Swarf

Interesting link Alparent.

Thus far I have not been able to communicate with the m328p on the breadboard. (USBasp via ISP connection)

I found some info while looking at the Sanguino that may help. I have not had time to try their suggestions.

Updates later when I can hack this.
M.S.

Go Up