NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Bootloader and Programming Question
December 19, 2010 by Steeldeal |
I'm pretty sure that this has been talked about in the forums from my research. Unfortunately it seems like the topic is just grazed, or talked about by more seasoned individuals that know what they are doing. So the basics are not just blatantly outlined. I like to have a better understanding of all the building blocks so that I can understand how it all works. Maybe it's inconsequential to some until it is necessary later but I'm having a little trouble completely understanding the process of programming the bootloaders and the programming of the chips in general. I'd like to share my understanding thus far, to be corrected if I'm wrong, and to help others if they have the same questions. From what I've gathered so far, the bootloader is a basic program the opens up the microcontroller to be programmed easily based off of the methods in the NerdKit. It's like a basic root program. Not really an OS so much, in this case almost like a device driver to allow serial communications. This opens the door for additional programs to be added easily. Not sure if all bootloaders are like this like in the example of an Arduino bootloader, but at least in this case it is. To load this bootloader (the Nerdkit one), you'd need a board that has another already programmed microcontroller that can handle the communications like a middle man. Now from what I think I understand is an ISP (In System Programmer?) such as this would allow programming, of both the NerdKit BootLoader as well as other programs: (USBTinyISP) http://www.ladyada.net/make/usbtinyisp/index.html Naturally to use this you'd need a development board of some type with your chip loaded up and a 6 or 10 pin header connected to the proper leads on the ATmega168/328. With this you could then talk to the MCU and load the bootloader, at which point with the NerdKit bootloader you could plug up the USB to serial cable and continue compiling programs. But at the same time with this USBTinyISP and a development board, you could actually just load programs directly without ever putting a bootloader in place? Is that correct? I assume this might be handy if you had a large program and wanted to save the space of even loading the bootloader, like say on a finished project to use permanently in a certain instance? Just wanted to outline it out loud, I don't believe it's been gone over in detail in the forums anywhere. If it has then my apologies. |
---|---|
December 20, 2010 by Rick_S |
You are mostly correct in your descriptions above.
I believe there are a couple reasons bootloaders are as popular as they are.
Hope that helped a bit. Rick |
December 20, 2010 by Keyster |
Steel, One thing I have found over the last few months of using the nerdkit is that Programming with the Bootloader makes prototyping much quicker. I can write some code, test it, make a few changes, test it, make a couple more changes, test it, all in a few minutes or less. once I get the code exactly like I want it I can then use an ISP to program a "non-bootloaded" chip and place that chip in my project. Rick is exactly right about the fuses, it took me a couple of hours to figure out exactly what a fuse was and why I needed to set them on the non-bootloaded chip, something you need not worry about with the NK Bootload. Bryan "Keyster" |
December 20, 2010 by Steeldeal |
Excellent information guys. Thank you for your replies. It sounds like I definitely should keep to the bootloader method. It's much simpler. I never really planned on doing just straight programming just yet anyway. I was curious on how to load the NerdKit Bootloader myself if I choose to. This has clarified what I have been putting together through reading. It's also opened a few more questions. The Fuses and Lock bits are things I know nothing about and haven't even heard of before. Naturally I can worry about that down the road. At least now I will be aware of the fact that there is an extra component to programming directly that I'll need to be aware of. For now I'll stick to the Bootloader and continue learning a few additional projects. Thanks for the help. |
Please log in to post a reply.
Did you know that a flyback diode is important when driving a motor or any inductive load? Learn more...
|