Documente Academic
Documente Profesional
Documente Cultură
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
Author:02JanDal
I'm only 14 years old, so don't expect my instructables to be as good as if a 30 year old engineer had done them. I like to do things my self and see what's inside things. I really like Arduino and AVRs. I do also like model railroading.
Step 1: A list of that Atmels can be programmed with this and that is needed
Now you know something about that this is about, but you wonder; what MCUs exact can I program using this instructable? First of all, only ATmegas, AT90s or ATtinys. Perhaps some day, PICs to. Or ARM. Or.. Or.. But for now, just MCUs from Atmel. The frequency for each MCU can be found by choosing your MCU here , opening up the boards.txt file and then searching for your MCU. There will then stand yourBoard .bootloader.low_fuses=fuse and yourBoard .bootloader.high_fuses=fuse . Then copy the number that stands instead of fuse into the fields at the bottom of the page . Click "Apply Values" and then you can see what type and speed of crystal to use in the drop down menu further up on the page. To find out that type of upload you should use, go to the AVR developers page and look that stands there. So, here is a list of working MCUs, sorted by type and number: Name: == ATmega: ATmega8 ATmega8u2 ATmega16 ATmega32 ATmega32u4 ATmega48
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
ATmega64 ATmega88P ATmega128 ATmega128rfa1 ATmega165 ATmega165P ATmega168 ATmega169 ATmega324P ATmega328P ATmega640 ATmega644 ATmega644P ATmega645 ATmega1280 ATmega1281 ATmega1284P ATmega2560 ATmega2561 ATmega3290P ATmega8515 ATmega8535 == ATtiny: ATtiny26 ATtiny45 ATtiny85 ATtiny2313 == Others: AT90CAN128 AT90CAN32 AT90CAN64 AT90USB1286 AT90USB1287 AT90USB162 AT90USB646 AT90USB647 Now you know what MCUs you will be able to program with this. But what do you need? 1. An ISP programmer. This instructable will use an Arduino as ISP, but I will add a category on how you can use other ISP programmers at the end of the instructable. 2. An USB <-> Serial converter or an RS232 <-> UART converter (only needed for programming MCUs with bootloader). 3. An breadboard. You can also solder on a perfboard or a custom PCB, but that is up to you and will not be covered here. 4. An computer. (I think you have one, otherwise you couldn't read this :)) 5. The Arduino program. It can be downloaded from here . 6. The core files available at avr-developers.com . See the next step for how to install it right. 7. The MCU to program. 8. Some really cool idea on that you want to do after reading this. (Optional, but recommend)
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
Image Notes 1. MCU to program 2. Arduino working as ISP (ArduinoISP) 3. SCK, MISO and MOSI data lines 4. Supply lines 5. Reset pull-up resistor 6. CS (ChipSelect) (reset)
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
hardware PWM. Serial pins: Serial pins are defined as RXD and TXD. Some times there are multiply hardware Serial lines. If this is present, TXD and RXD are Serial, TXD1 and RXD1 are Serial1 etc. etc. Other pins: To see that pins have I,,2,,C, SPI etc. look at the datasheet and search for the corresponding pins (I,,2,,C: SDA and SCL etc.) Interrupts: The interrupt pins are labeled with INT#, there # is the number of the interrupt.
Related Instructables
How to control a Stripboard 16x2 LCD using Arduino by an AVR icecreamterror ATtiny2313 by roznerd
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
Comments
15 comments Add Comment
themroc says:
This is a great Instructable and Ill give you 5 Stars, when youll edit it in a few steps.
Please be careful taking images from other sources (Atmel-Logo etc.) I dont know the law for sure, but I think they are not free too use). You are a really smart boy, but consider the reader is not as smart as you. Some steps need a little bit more Explanation. Try to explain Step by Step in an example (ATtiny2313 or other). themroc
02JanDal says:
1. The USBasp has it's own Arduino core files and has not to much to do with this. 2. Quote: You mean, finding the MCU and changing the programmer-option? Please explain it. ??? Please explain more about what you mean. 3. Quote: It would be fine if youd said, that the image is an ATtiny2313. If you hower over the yellow field you will see that the image is an ATtiny2313. 4. I've asked for permission for all of the images.
5. I've already thought about making a step-by-step for one AVR, but I haven't came to that yet, especially since my only ATtiny2313 has the reset disabled (wrong fuse...) and I've been waiting for more AVR's to come, but I live in Sweden and some times packages get totaly lost for some mounths. JanD
themroc says:
Mar 20, 2011. 6:52 AM REPLY Look at your Step 5. You wrote about finding the MCU in boards.txt. I guess you mean finding the MCU and then changing the programmer-option for the apropriate programmer (for Example AVRISP etc.) ? Please do an example. If you have the permission for the images ok. Sorry in my version of this instructable the yellow fields in Step 6 only show the pins not the MCU. If you need a Attiny2313, Ill send you two (under 20g). Themroc
02JanDal says:
Ok, now I understood.
It would be great if you could send me one or two ATtiny2313, but I think I can't take that offer, if you don't really want me to have them. JanD
themroc says:
Mar 20, 2011. 7:50 AM REPLY If your Instructable really works (and I think it will) see this as a kind of fee for your efforts. Ill contact you per e-mail. I didnt find another source about that issue in the web and the avr-developers site is great, but the explanation is worse (it is not for beginners). On what kind of AVR did you try it?
02JanDal says:
Good, my email is jan[at]dalheimer[dot]de (try to figure that out!) That's one of the main things that made me do this.
I tried the blink sketch on ATmega644, ATtiny25, ATtiny45, ATtiny85 and on my ATtiny2313 (it worked until I accidentally disabled the reset pin...). JanD
themroc says:
Mar 20, 2011. 5:32 AM REPLY It would be fine if youd said, that the image is an ATtiny2313. To have a better access to this example try to have the pinmapping in a table. A great job for a 14 Year old boy! themroc
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/
themroc says:
Great Instructable, but needs some differentiation: You mean, finding the MCU and changing the programmer-option? Please explain it.
What about USBasp? Im using a Metaboard-Arduino-clone (much cheaper then the original one) with USBasp-Firmware. AVRDude in the normal ArduinoIDE supports it, but does the modified core work with it? I tried to change the board.txt file, but there is a NullPointerExeption with the modified core. themroc
heatseeker96 says:
Feb 28, 2011. 11:47 AM REPLY Here's a little question: If I load this program on a ATmega328P (I think it's the regular Arduino), can I then use the Arduino socket on the board (like Arduino Ono) to program it again (with the bootloader)? Thank you for your help (and instructable)! (sorry for my bad English)
02JanDal says:
Feb 28, 2011. 12:11 PM REPLY You would not need this as the bootloader for the ATmega328P is included with all IDE releases. But you can use this on how to burn the bootloader, but after burning the bootloader it can be placed into the socket of any Standard Arduino. JanD
heatseeker96 says:
Thank you!
frank26080115 says:
Excuse me? "The best way to find out that pin number is what pin is to test." ? That is wrong. Just read the files you are using.
02JanDal says:
Changed. I didn't think of that. I will make some pin mappings as soon as I get home from school. Thanks for pointing that out, JanD
02JanDal says:
Fixed this and the links to the datasheets.
02JanDal says:
I also just saw I forgot to add the link to the usable MCUs list. I will do that after school to. Jan
http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/