Pages: [1]   Go Down
Author Topic: Bootloader with crystal question.  (Read 655 times)
0 Members and 1 Guest are viewing this topic.
Norman, OK, USA!
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Klingon Machinist
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

M.S.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 442
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Norman, OK, USA!
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Klingon Machinist
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...

Logged

M.S.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 442
Posts: 23834
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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.

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.   
« Last Edit: March 07, 2011, 07:26:55 am by alparent » Logged

Norman, OK, USA!
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Klingon Machinist
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

M.S.

Pages: [1]   Go Up
Jump to: