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 » More Powerful Micocontroller?

December 16, 2012
by alex555
alex555's Avatar

Would it be possible to get a more powerful microcontroller that is compatible with the Nerdkit?

December 16, 2012
by Noter
Noter's Avatar

If by more powerful you mean more memory - yes. Faster - yes. More I/O pins - yes. But they don't come that way so you'd have to put the bootloader on yourself and in some cases make minor modifications to it first.

December 17, 2012
by alex555
alex555's Avatar

Is the bootloader directly compatible for the most part? How much do the programmers cost?

December 17, 2012
by Noter
Noter's Avatar

The bootloader is compatible for the most part. Probably have to make changes for the baudrate and serial pins but the rest should be ok.

ISP programmers can be purchased for around $10 on ebay and not much more at other places. I built my own - http://www.nerdkits.com/library/codelib_isp_programmer/. Rick has a put together a good document on how to install the bootloader - http://www.nerdkits.com/library/howto_install_bootloader/.

What's your project that you need more power for?

December 17, 2012
by alex555
alex555's Avatar

I want to make various pieces of digital test equipment, mainly a programmable "truth table" and a signal generator I can program any waveform into. Do you have any idea what microcontroller has decent I/O and memory while still being DIP? Also, would the Nerdkit guys be able to sell a few with a bootloader already on them?

December 18, 2012
by Noter
Noter's Avatar

Nerdkits sells the atmega328 with the bootloader installed which has double the memory of the regular Nerdkit but I think that's the only other choice. There's a couple of ATmega microcontrollers in DIP packages that have more pins and memory than the Nerdkit (Mouser list) but you'll have to put the bootloader on them yourself if that's the way you want to go.

December 18, 2012
by Rick_S
Rick_S's Avatar

If you are looking for more I/O, I put the bootloader on a 40 pin mega324. I detailed the process Here

Rick

December 21, 2012
by alex555
alex555's Avatar

Thank you very much, I may just do that. But now I am curious, if I have an AVR programmer do I need a bootloader at all to still be compatible with Nerdkit codes and setups?

December 21, 2012
by JimFrederickson
JimFrederickson's Avatar

The booloader enables the ability to program the AVR using the Serial Connection.

The bootloader does not have any affect on the code you are running. Once you have your compiled code programmed into the AVR that is what is running.

NOTE: The bootloader does run each time your AVR Resets. It does do some setup and does check to see if the "Programming Switch" has been set. If something in "your program" is relying on something that has been "setup by the bootloader" to function properly then if there is not a bootloader your code would fail. As long as your code is configuring everything that it needs to run, there will not be a problem.

December 22, 2012
by alex555
alex555's Avatar

So I could just use a different programmer, but use the same software and code I have been using?

December 22, 2012
by Ralphxyz
Ralphxyz's Avatar

Hi Alex, essentially yes unless there is something in an installed bootloader that prevents just loading/running any old .hex file, as Jim said.

You do not need to have a bootloader which saves you ram space (approx 2k??).

I am still looking for a good tutorial on using just the command line and an ISP ( as in Inline Serial Programmer).

Ralph

December 22, 2012
by Noter
Noter's Avatar

There is nothing in the nerdkits examples that depends on anything in the bootloader beyond loading and starting the program. You could possibly use the USART without initializing it since the bootloader leaves it configured but that is probably not good practice anyway. I still use the bootloader occasionally but for the most part just the ISP programmer because it is so much easier. With an ISP programmer you don't have to mess with the program/run switch or manual reset.

December 22, 2012
by alex555
alex555's Avatar

I meant the software on my computer. Would I be able to use an avr programmer instead of the bootlaoder, but still use programmer's notepad, the compiler, and command prompt?

December 22, 2012
by Noter
Noter's Avatar

You would still use avrdude on your pc to download your program to the chip and your c source program for the micro-controller will not change. Basically everything is the same on your PC except a minor edit to the makefile to give the new ISP programmer name and possibly a different comm port to avrdude.

December 23, 2012
by alex555
alex555's Avatar

Does avrdude support most of the avr chips? Or do I need to add something to support chips other than the '168 or '328?

December 23, 2012
by Rick_S
Rick_S's Avatar

Avrdude supports most if not all 8 bit AVR microcontrllers.

December 24, 2012
by Ralphxyz
Ralphxyz's Avatar

Sometimes you have to add the processor to the config file.

Ralph

December 24, 2012
by JimFrederickson
JimFrederickson's Avatar

The short answer yes, the AVRDude "can program any chip in the AVR Line of Microcontrollers". ("Support" is a slightly different question, see below...)

AVRDude already supports communicating to devices/circuits that support all of the various "methods for programming any individual chip in the AVR Line of Microcontrollers".

For me I only use the ISP Programming Method, and I make sure I don't change any of the fuse bits on the chips I use that prevent that method from being useable.

One of the things that Atmel has done is to create a broad line of Programmable Microcontrollers that adhere well to common design. Additionally the AVR Micrcontrollers also have several common methods of programming. (While they weren't the first to do this, Microchips and their PIC had been out there amongst others, they were the first that did it well from my viewpoint. Also since they were pushing Flash for Code Storage that was a great choice, from my point of view, as well.)

The programming of virtually all of the AVR Microcontrollers is common across the entire range of chips (There are several methods of programming and some things can be done using the Fuse Bits that will alter "how/what methods of programming" can be used for a chipe)

Some of the chips within the AVR Line have software/configuration/hardware differences. To handle these differences only changes within the chip definitions in the AVRDude are necessary. (Sometimes you may have to recompile your source program as well at times.)

You do have to know the chips you are writing the program for though, because even though the AVR Microcontrollers have a "common architecture and design" there are differences between chips that can get you. All of the information is contained in the "Full Datasheets". (Some of the datasheets that Atmel distributes are "abridged" with only important parts but when you are programming a Micronctrollers often times everything is important...)

December 24, 2012
by Noter
Noter's Avatar

Yes, each chip has it's own unique definition within the avrdude configuration file but all of them are already defined so unless you want to customize those configurations there is no need for concern about the configuration file, just use it as is.

Post a Reply

Please log in to post a reply.

Did you know that inductors try to keep their current constant over short periods of time? Learn more...