Go Down

Topic: Need help using AVR ISP MKii with Duemilanove (Read 2 times) previous topic - next topic

Nick Gammon

Yep the poor thing thinks it's a Uno now. It's had a personality change. :)
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

CrossRoads

It works tho, that's what I needed.
Wonder why the IDE cares whether its downloading to an Uno vs a Deumilanove? Functionally, I don't care.

Here's a pic of the setup, unpowered. Got a couple of 3mm blue LEDs, things are way too bright with 120 ohm resistors, need to change those.

Now to write some code to receive bytes from the serial interface, update a 12x8 array, and multiplex some LEDs.
Well, as soon as the resistors arrive to be installed, and the array gets gets wired up ...
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.

spycatcher2k

C:\Arduino-1.0\hardware/tools/avr/bin/avrdude -CC:\Arduino-1.0\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m


Maybe remove -Pusb - I have a clone on order but it will be a week or so comming so this is untested.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

retrolefty

Quote
Wonder why the IDE cares whether its downloading to an Uno vs a Deumilanove? Functionally, I don't care.


Simple, the boards.txt file shows the definitions for both the Deum and Uno boards and clearly shows they talk at different baudrates, so the IDE is selecting the wrong baudrate to attempt a upload if you select a Deum board with a target that has a Uno bootloader installed and visa versa of course.

Lefty

CrossRoads

Thanks for that Lefty. Just a couple too many pieces to keep track of it seems. I guess I need to make a list of all the bits that need to be in sync.
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.

retrolefty


Thanks for that Lefty. Just a couple too many pieces to keep track of it seems. I guess I need to make a list of all the bits that need to be in sync.


I think there are only three key pieces that the IDE uses from the board.txt definitions to use when compiling and uploading:

Processor chip type (needed to compile sketches correctly for the target chip being used)
Clock speed of the target (so some arduino functions like timer setups work correctly)
Baudrate to use when uploading (so correct speed is passed on to AVRDUDE commands)

Lefty

CrossRoads

Baudrate to use - so one has to know what the bootloader set it to.

Maybe the Serial downloader could be smartened up a little - try a simple command, kind of like AT on a modem, see if get ak OK back. Try a few speeds until a good answer comes back, then use that speed for programming.
Guess the bootloader would need matching code to reply with as well.
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.

Nick Gammon


I think there are only three key pieces that the IDE uses from the board.txt definitions to use when compiling and uploading:


And Protocol. So it knows to use stk500v2 for the Mega to handle the extra address space.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

retrolefty



I think there are only three key pieces that the IDE uses from the board.txt definitions to use when compiling and uploading:


And Protocol. So it knows to use stk500v2 for the Mega to handle the extra address space.


Yes that would be important too.  ;)
I don't know if it's just me or not, but the arduino system sure seemed to be a lot simpler 3-4 years ago.  ;)

Go Up