Pages: [1] 2   Go Down
Author Topic: Reprogram Arduino's own microcontroller  (Read 1653 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to reprogram an Arduino's microcontroller without another chip or Arduino? I realize that if I have to ask this I probably shouldn't be messing with the bootloader, but I'd like to know for future reference, since I can't find an answer to this elsewhere.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4060
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The direct and technical answer to your question is no, whether programmed via ICSP or async serial (bootloader) there is bound to be another "chip" somewhere to communicate with the target MCU.

Is that really your question though?  Not sure what else you might be asking so I took the words very literally  smiley-grin
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, that answers my question. I was hoping one could edit the source code and easily upload it to the microcontroller, but as I figured, that's not possible. Thanks anyways!
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6746
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is  http://bitlash.net/ which allows you to edit programs (in source form) directly on the arduino, but you still need something with a keyboard/display to do the actual editing.  Since that something is usually a computer, it's usually not a big step toward running the full Arduino IDE.

AMFORTH will also allow this, if you consider Forth to be a usable language.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd never heard of Bitlash - that's pretty cool actually. By "source code" in my last post, I meant the source code of the bootloader, not a sketch. Sorry for the confusion.

Bitlash could be useful in the project I'm working on now. I don't consider Forth usable. smiley-grin
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5461
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to reprogram an Arduino's microcontroller without another chip or Arduino?

No. The bootloader is in protected memory (and for obvious reasons...!)
Logged

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

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4060
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, that answers my question. I was hoping one could edit the source code and easily upload it to the microcontroller, but as I figured, that's not possible. Thanks anyways!

Using the bootloader or ICSP isn't easy enough?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I mean, is can I reprogram the microcontroller without a breadboard, second microcontroller, or a dedicated programmer. Just using a computer, the Arduino, and the chip it came with.
Logged

NSW Australia
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3456
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes!
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4060
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What I mean, is can I reprogram the microcontroller without a breadboard, second microcontroller, or a dedicated programmer. Just using a computer, the Arduino, and the chip it came with.

Most Arduinos are self-contained in that respect and so only need a computer and a USB cable, so yes. Exceptions that I am aware of include the Arduino Pro and Pro Mini (these require an FTDI cable or equivalent breakout board), there may be a couple others, see http://arduino.cc/en/Main/Products for details. Apologies if I am restating the obvious.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So how exactly would I compile the bootloader source and upload it to my Uno? Avr-gcc and avrdude?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4060
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So how exactly would I compile the bootloader source and upload it to my Uno? Avr-gcc and avrdude?

Correct, AVR-GCC, AVRDUDE, plus an ICSP programmer. But Unos come with the bootloader already programmed. Maybe I'm not sure exactly what kind of programming we're discussing.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I mean I don't want to use any outside methods to program the chip. Just my computer and the Arduino. By programming I mean using a USBTinyISP or similar method for (re)loading a bootloader onto the chip.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5461
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So how exactly would I compile the bootloader source and upload it to my Uno? Avr-gcc and avrdude?

There's NO WAY to do it without extra hardware (ISP programmer or a second Arduino)
Logged

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

NSW Australia
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3456
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


So - does no-one believe me, or was my link wrong, or what?
Logged

Pages: [1] 2   Go Up
Jump to: