NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » I replaced the Micro with a ATMEGA168P-20PU--->ISSUES?!?!
January 27, 2010 by Redlight |
Hello, I've bought a ATMEGA168P-20PU to replace the ATMEGA168-20PU because it stopped working for a some reason (probably incorrect wiring). Now everytime, i run 'make', it produces this error: avrdude -c avr109 -p m168 -b 115200 -P COM4 -U flash:w:initialload.hex:a Connecting to programmer: . Found programmer: Id = "" ""; type = Software Version = . ; Hardware Version = . avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device? make: *** [initialload-upload] Error 1 Is there anyone who can assist me with the 'makefile'? I thought i'd try it out but i know its got to be the avrdude switches.... I dont understand the makefile as per i'm going through c programming skill set atm.... |
---|---|
January 27, 2010 by Rick_S |
Where did you purchase your replacement micro-controller? If you purchased it here, you shouldn't need to do anything special. Otherwise, if you want it to behave as a Nerdkit micro-controller, you will need to do some additional steps requiring a different type of programmer to get the NerdKit bootloader installed. The error you got can be caused by several things and in it's simplest sense, means that avrdude can't talk to the micro-controller. This can be wiring issues, or a wrong or missing bootloader on the chip. If you did buy the chip from the NK guys, post a pic of your setup and maybe we will be able to spot the problem. No matter what the problem, there's a good chance we can talk you thru it. Rick |
January 27, 2010 by treymd |
Yeah I got something similar a few hours ago, my problem (not saying it's your's because you probably need a bootloader) is that my uart ground wasn't grounded :) |
January 28, 2010 by Redlight |
I'm very confident on the wiring but i believe i can not just buy a micro off the self. There must be something that is done, and its that step that i'm not sure to begin. From Rick_S explanation, i could be missing a bootloader?!?! Again, i can point that the ATMEGA168P will not work as a substitute for a ATMEGA168, straight out of the box, per say. I am researching as i go, but if any one can point me to the right direction, that would be faster.. |
January 28, 2010 by Rick_S |
Ok, Based on what you have stated, I'll assume you didn't purchase your replacement from the NK guys. If you want the micro-controller to behave exactly as the original you received in your kit you will have to flash the bootloader onto the chip. By default a new micro-controller of this type:
Now, back to my original question. Where did you purchase your new micro-controller. The reason I ask this is that some places - especially some ebay vendors - will sell a chip pre-programmed with an arduino bootloader installed where electronics distributors such as Mouser and Digikey sell virgin blank chips. If you purchased a blank chip and want it to behave like a NerdKit Chip you will need to do the following:
If your chip has a bootloader such as arduino already installed, you will need to do a chip erase prior to running make. Hope that helps, Rick |
January 28, 2010 by Redlight |
Hi Rick_S Thanks for replying and helping me. Are all ISP the same? For example, are the USBasp and the atmel Mature ISP Programmer identical? Now, if i were to by acquire one. All i would do is wire up MOSI (PB3), MISO (PB4),SCK (PB5), RESET (PC6) on the micro to the ISP? Assuming that i have configured the bootloader makefile appropriately? |
January 28, 2010 by Rick_S |
I'm not familiar with the Atmel Mature ISP programmer. You would most likely want to get an ISP programmer that is supported by AVRDuDe. You can go to their support page to find that - it is a fairly large list. Then get what works best for you. To answer your second question, Yes you would connect those, a ground connection and depending on the programmer possibly power connection. On the microcontroller, you would only connect the 2 power and 2 ground connections as well as install the crystal and bypass cap. (because once the fuses are set, you will need the crystal for the chip to work) At that point, adjust the makefile for your programmer and you should be good to run make. |
January 29, 2010 by Redlight |
Rick_S, Thanks again for pointing me to the right direction. I have a STK500, and i did it thru AVR STUDIO. I matched the fuse bits, lock bits and used the Bootloader.hex as per another thread. You gave me an idea, and i was able to search the forum for solutions. I certainly appreciate the support. IMO, its very hard to get started in microcontrollers, theres simply too much permutations and combinations. I guess thats why the NK are popular because it skips alot of that and gets the user to build circuits straight away. The tutorials and sample code are just Gold. |
January 29, 2010 by Rick_S |
No Problem. Glad to hear you got it done. One of these days I may have to buy an STK500. It'd be nice to have not only the ISP but high voltage parallel programming available if I were to mess something up. :D Rick |
Please log in to post a reply.
Did you know that NerdKits make a great parent/child activity? Learn more...
|