NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Is the food loader altered for a 328p?

April 20, 2010
by icarus
icarus's Avatar

i just bought an ISP programmer ( the SparkFun pocket programmer) and some blank atmega328p chips and I'm wondering what changes to the foodloader are necessary to install it on them.

also, I'm wondering if its really as simple as connecting the isp programmer's wires and running "make" on the foodloader in the command line. Ive heard the makefile for the individual programs has to be altered to know they are going onto 328's but im wondering what else?

April 21, 2010
by icarus
icarus's Avatar

I noticed that this subject is not new, and that an individual had already posted something similar, titled: "interesting Behavior with AtMega328 after loading Nerdkits Bootloader"

However, it was not solved all the way. the nerdkits staff member had said that the device signature had to be changed in the config.h file. I'm wondering what that signature is and also, any other changes to be made. also, the staff member had mentioned that they had produced a bootloader compiled for the 328, perhaps i can just get a hold of it, and save the headache...

Any help is greatly appreciated. :)

April 21, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi Icarus,

Just e-mailed the 328P version of the bootloader to you. Does that solve everything?

Mike

April 21, 2010
by icarus
icarus's Avatar

holy cow you guys are on top of things! thanks so much for e-mailing me the new bootloader! i have not had a chance to test it yet but i'll be on it soon. once i have, i'll let everyone know how it went.

thanks again,

Icarus

April 22, 2010
by icarus
icarus's Avatar

News! hot off the press:

I was able to install the bootloader(after much confusion of wiring of course!) but im unsure if the fuse and lock bits have been set, after loading the bootloader, i tested it by connecting the nerdkit programmer and opening the hyper terminal to see the "ba" or "bp" on reset, which it did!

however, I'm still wondering if i need to manually set the fuse bits in the command line or does the boot loader makefile do that for me?

-Icarus

April 30, 2010
by robtrang
robtrang's Avatar

Could anyone from the Nerdkits team could detail this information and maybe make a bootloader available for download (or at least better instructions for building)?

May 01, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi robtrang,

The ATmega328P version of the bootloader has been added to the "NerdKits Sample Source Code" ZIP file on the Members area download page. The ATmega328P datasheet has also been added there.

As I told Icarus via private e-mail, the Makefile we include with the datasheet does all the work of setting the fuses properly before programming the bootloader onto the chip. You probably just need to edit the first line of the Makefile in order to configure it for your specific ISP programming device.

Mike

May 05, 2010
by robtrang
robtrang's Avatar

Thank you!

Perfect

May 06, 2010
by icarus
icarus's Avatar

sorry i haven't checked the forum lately, but i have news and results!

Ive successfully programmed 4 of my new chips with the nerdkit bootloader and ive gotten code successfully onto the chips through the nerdkit programming cable. all in all, it was worth it as the nerdkit setup is so easy to use.

good programming all!

-Icarus

May 11, 2010
by Phrank916
Phrank916's Avatar

Mike and Humberto are always right on top of things when it comes to helping out their customers. I purchased a few blank 328Ps and wanted to put the foodloader on them. A few emails later and I had the file sent right over. I have put the foodloader on 2 blank 328Ps and even another one that had the Arduino bootloader on it. They all loaded up just fine.

The only change I had to make was in the make file, changing the "dapa" programmer to "usbtiny" (I too got the pocket programmer from Sparkfun, it's a good little programmer!)

One small bit of advice I will give to avoid headaches: When programming thru the ISP from the foodloader makefile, please have your crystal in hand. The programmer will see the chip in it's factory state because it's default fuse setting has it running off the internal oscillator. BUT, when the makefile goes through the first few lines of setting up the fuses, the MCU will be set for an external oscillator and then when it hits the line that uploads the actual foodloader, it will fail and the programmer will no longer see the MCU until an oscillator is connected. My best advice is to just connect up the external oscillator from the get go, it won't harm the chip.

Ted

May 27, 2010
by JimSmith4321
JimSmith4321's Avatar

I too bought a number of blank 328p's and would also very much like to have a copy of the 328p bootloader.

Thanks

JimSmith_4321@roadrunner.com

May 28, 2010
by Phrank916
Phrank916's Avatar

I had a copy, so sent.

May 29, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi all,

For future reference, there is now a "bootloader328P" directory inside the "NerdKits Sample Source Code" ZIP file which you can get from our member downloads page. This is identical to what we had distributed by request earlier. Recently, it's been added to the standard download package for everyone's convenience.

Mike

August 04, 2010
by gnkarn
gnkarn's Avatar

As im running out of memory on my 168, I need to load the bootloader to a fresh 328, i wont to do this by wiring the programmer myself, so my question is what is the easiest way to do it without buying a programmer?

thank you

August 04, 2010
by Rick_S
Rick_S's Avatar

You can build a programmer provided you have a pc with a true parallel port in it (AKA not a USB to parallel adapter). There are several links on the web describing how to do this. Here is a LINK to one with build instructions. This type of programmer is commonly known as a DAPA programmer.

This LINK shows some variations of home built programmers.

However, be sure to excercise extreme caution when building a programmer such as this because incorrect wiring or accidental shorts could wreak havoc not only on the microcontroller but possibly damage the PC's parallel port or the PC itself.

If you are unsure about building a programmer from scratch, you can purchase programmers on e-bay for under $20 US.

Rick

August 04, 2010
by gnkarn
gnkarn's Avatar

Thanks Rick, researching on your links and arduino i found this also, http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

it seams that if you have an arduino it is possible to program another 328 without anything else, do you have an opinion on this alternative?.

Gustavo

Post a Reply

Please log in to post a reply.

Did you know that hobby servos are controlled through a particular kind of PWM (Pulse Width Modulation) signal? Learn more...