Question

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Question

Post by Dead_Cat »

https://learn.adafruit.com/arduino-tips ... arduinoisp
After you've burned the bootloader, how do you program it?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

You can program it via the ISP.
Or via serial using the bootloader and an FTDI cable or FTDI Friend: http://aeturnalus.com/robotics/poor-man ... d-arduino/
Or indirectly using the USB/Serial capabilities of an Arduino board: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
Or you can stick it directly into an Arduino board and program it that way.

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

How would I program it with the arduino ISP? What are the steps if I got it in the avr board and have my sketch ready?

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

Also it does work with Arduino Uno right?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

The bootloader is just a program that loads other programs. You can load any program you want via the ISP. It doesn't have to be a bootloader. Just compile and upload your program as you would the bootloader.

And yes. If you are programming Atmega328 chips, they can be used in the Uno.

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

So the "programmer" option just needs to be on arduino as ISP and then everything I upload will be uploaded to the chip?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

Yes. Using the ISP, you can write your program directly to flash. If you want to upload a program via the serial port, you need a bootloader on the chip that can read from the serial port and write to flash for you.

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

What is flash (sorry kinda new to arduino and electronics in general)?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

Flash is non-volatile program memory. One of the three types of memory on the Arduino: http://learn.adafruit.com/memories-of-an-arduino

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

What if the chip needs an external resonator or crystal? Is the pin connections set up in a way that it can use the on board crystal?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

There are fuse settings that determine the clock source. If you purchase a raw chip, they usually come programmed to use the internal clock source. If you buy one pre-programmed for Arduino use, it will have fuse settings appropriate for use with the Arduino 16MHz crystal.

It's is good to familiarize yourself with the fuse settings before experimenting with them. You can 'brick' a chip with the wrong settings.

http://www.atmel.com/Images/doc8161.pdf

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

Well the ones I got is pre programmed and needs an external crystal/resonator. So should I just solder one to the clock pins?

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

Also if I solder a resonator or crystal with capacitors would I then be able to program chips that use the internal clock without de-soldering the resonator/crystal? Like will it break a chip to get external clock signals if it uses the internal clock?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Question

Post by adafruit_support_bill »

.This link shows the basic circuit for an external clock: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
If you re-program to use the internal clock, the external circuit can be eliminated.

Dead_Cat
 
Posts: 17
Joined: Tue May 06, 2014 12:07 pm

Re: Question

Post by Dead_Cat »

Well yes, but my question was: If I bought the kit could I just solder a resonator to the clock pins? And will it break a chip to give it external clock signals if it was configured to use it's internal clock?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”