Pages: [1]   Go Down
Author Topic: Standalone ATmega328 with bootloader sketch upload  (Read 1411 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm very knew to the entire arduino scene - just started playing with arduino uno. If one would like to upload a sketch to an atmega328 that was already burned with a bootloader, I imagine that the arduino board could be used. RX, TXD, VDD, GND and RESET are the pins needed from the board to the standalone atmega, correct? I don't want to start fiddling with my new board without a second opinion.
Thanks
Logged

Scotland
Offline Offline
Edison Member
*
Karma: 25
Posts: 1311
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Correct - plus you would need a 10K resistor for the reset pullup, and a 16Mhz Crystal with supporting caps as well.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot spycatcher. I guess the downside of using this method would be that the sketch would be uploaded also to the atmega sitting on the arduino board.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
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

No. You could put  the installed ATmega into a reset condition, and have the new part be the only one responding.
Alternately, you could get a standalone USB/Serial adapter, and not need the original Arduino at all.
http://www.sparkfun.com/products/10009
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
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mean RESET to GND, crossroads? I think I will use the USB to TTL adapter that I already have. I guess I didn't want to use it because the DTR line was not soldered to any pin header and didn't feel like warming up the soldering iron  smiley-roll
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
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, RESET to GND on the Arduino.
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
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks crossroads.
The problem is that I couldn't upload any sketch to the new mcu and so I thought that something was wrong with the bootloader. Trying to re-burn the bootloader, using the same method I used previously with success, I'm getting the error:
"avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check."
Is the chip faulty?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
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

The problem with that setup is that you have 2 uC running in parallel.
I think you need to pull reset low on the SMD arduino, and let the other be controlled by its pullup resistor.
When you want to download, start the sketch download, press & hold the DIP part's reset button; when the IDE says "compiled xxx of 32xxx bytes" , release the DIP part's reset button.
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
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After few hours of tinkering with the connections, a lot of scenarios and IDE and getting all sorts of errors with ArduinoISP, I managed to use the optiboot fixer on the mcu. There are few issues left:
1. If I replace on the arduino uno board the new mcu with opti, I can upload a sketch only if I select "arduino duemilanove w/ atmega328". For the original mcu, "Arduino uno" still works.
2. The mcu on the breadboard doesn't execute the code: a simple "hello world", the "Blink" sketch. Maybe the problem is with the oscillator: http://parts.digikey.com/1/parts/403831-cer-resonator-16-00mhz-ztt-16-00mx.html - that seems to have the built in caps.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
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

"CER RESONATOR 16.00MHZ"
Yes, a resonator has built in cap's.
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
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know how important is the value of the filter caps, everywhere it says 18-22pf and I saw in the ceramic resonator datasheet that its caps are 30pf.
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Careful.  Resonators don't always have built-in caps.  I have both in my parts bin, purchased from Digikey.

I use 27pf caps pretty much all the time.  I have 20 and 30 as well, in case I ever need to fine-tune the frequency, but I haven't yet had any occasion to bother.  Use the crystal cap formula (5-8pF trace capacitance is usually a safe assumption) if in doubt, using the datasheet load capacitance as a guideline.

Or just buy a three-pin resonator.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've working with PICs and didn't pay much attention to the filter caps of the oscillator. With arduino I got the feeling from what I read that the caps have to be 18-22 pf and couldn't understand why.
The resonator that I have has 3 pins and it seems to be working fine.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26970
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

"The resonator that I have has 3 pins and it seems to be working fine. "
The part # you provided a link for, the spec for it says it has internal caps.
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.

Pages: [1]   Go Up
Jump to: