Atmega bootloader programmer comments

Posted by Paul_N on Fri 10 Aug 2012 03:24 AM — 9 posts, 38,381 views.

#0
Hi Nick --

I'm not quite sure where to comment about your boot loader programmer, but I want to thank you for taking the time to so thoroughly document your work on that project and others. 20 years ago I did a lot of bare-bones ASM programming on z80s and 8051s and haven't done much with microcomputers in the last 10 years, and I'm working with the AVR and Arduino systems to get familiar again.

There's a fair amount of New-Old-Stock of ATMEGA328 (no "P" suffix) in the inventory of one of the distributors here in the states that sells parts in singles at reasonable prices. I was able to modify your programming sketch to include the 328 signature, but if you ever revise your program you may want to include the 328 in your version so that others can use the 328 with your program.

I wonder if you have any plans to do a posting for a HV parallel programer to restore incorrect fuse settings. In googling I see that a lot of people are concerned about "high voltage" needed for a parallel programmer. But it seems to me that the current is only 10 to 15 mA. And that the 12V power source could be provided by either a little step up voltage converter from 5V, or just two 9V batteries in series that feed a 12V linear regulator to drop the 18 to 12.

Anyway, thanks again for all your great work. I find it a valuable learning tool as well as good tools in and of themselves.

Best wishes,

Paul
Australia Forum Administrator #1
Quote:
I was able to modify your programming sketch to include the 328 signature ...


Which is, to save me looking it up?

Quote:

I want to thank you for taking the time to so thoroughly document your work on that project and others ...


Thanks for that. :)

Quote:

I wonder if you have any plans to do a posting for a HV parallel programer to restore incorrect fuse settings.


There are a few available already for around the $30 mark I believe.

You can get an AVR Dragon for $US 51, it isn't that difficult an exercise.

So, not really. It would be quite a bit of work just to save a few dollars.

The bootloader programmer was done with off-the-shelf stuff (another Arduino) so I thought that had more general appeal.
#2
For the 328, the second line is what I added right after your 328P definition...

{ { 0x1E, 0x95, 0x0F }, "ATmega328P", 32 * kb, 512 },
{ { 0x1E, 0x95, 0x14 }, "ATmega328", 32 * kb, 512,

So the 328 (no p suffix) sig is 0x1E, 0x95, 0x14


On a no-so-related topic, are there any low end logic analyzers that use a PC for processing and display that you like? Perhaps one of those gizmos that are implemented with some sort of a USB dongle with 8 or 16 parallel inputs with the other end of the USB going to a PC?

I'm new to your site so you may have mentioned that elsewhere and I just haven't yet seen it.

thanks,

Paul
Australia Forum Administrator #3
I use this one practically every day:

http://www.saleae.com/logic/

It's $US 149 for the 8-channel one but worth every cent.

Works on Mac, Windows, Linux, and the supplied software is very easy to use. You can download the software from their site for free and try it in simulation mode to see what it is like.
#4
Awesome! I'll check it out. Thanks.
#5
Sir,

I have bought a few atmega 48PA, 88PA, 168PA's from market. I am a newbie and really looking for help how to bootload and upload sketch into these chips. Luckily I do own a Arduino UNO having a atmega 328. But its not helping much.

It would be a great help if you please provide me hex files for 48PA, 88PA, 168PA .

Thanks in advance.

shemul.
Australia Forum Administrator #6
Could you post this question on the Arduino forum please?

http://arduino.cc/forum/
#7
Hey Nick,

Really thanks. It was very useful to me.

I have a question too, I just get my USB ASP (chinese) but every time I try to program with it, I receive a message complaining about SCK and firmware update. I want to update it to the last firmware, but I'm afraid that maybe chinese did some modification on their firmware.

So I was thinking to dump all the memory and save it, so if I have any problems I can go back to that version.

I was thinking to add a function dumpMemory.

###

void dumpMemory() {
unsigned long addr = signatures [foundSig].loaderStart;
unsigned long flash = signatures [foundSig].flashSize;

Serial.println("DUMP");

for (unsigned long i = 0; i < flash ; i++) {
byte found = readFlash (addr + i);
showHex(found);
}

}

###

All the time that I use it, it prints a lot of 0xFF, that make sense, since it is not full, but it keeps freezing on the end.

Any ideas why? Is it possible to do this kind of backup?

Thank you again,
Best Regards,
Matheus
Australia Forum Administrator #8
My sketch here lets you save program memory to disk (an SD card):

http://www.gammon.com.au/forum/?id=11638

However your suggested function looks sound.

I prefer you to ask these question on the Arduino forum. You can send me a link via personal message on that forum if you like.

http://arduino.cc/forum/