๐Ÿ“ฃ๐Ÿ“ช ๐Ÿšš Adafruit will not be shipping USPS orders Monday October 14, 2019 ๐Ÿ—“. Expedited USPS orders placed after 11am ET ๐Ÿ•š Friday October 11 will go out Tuesday October 15 ๐Ÿ“ฃ๐Ÿ“ช๐Ÿšš
0

Strange Mac-AVR issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Strange Mac-AVR issue

by wireframewolf on Mon Jun 02, 2008 3:30 pm

I suppose this post is for anyone that uses XCode and the Mac-AVR toolchain to put stuff onto your Atmel microcontrollers. Otherwise you might not know what I'm talking about.

When I recently first tried my hand at programming atmegas with my USBtinyISP programmer, I got the Mac-AVR toolkit, opened the demo project, and adjusted the make file accordingly to put a test blinking program on an atmega168. It blinks every .3 seconds and works great.

The trouble began with the atmega16. I tried to load the same program onto it, with proper fuses of course. And yet no matter how I set the fuses, the atmega16 refused to clock correctly. It would always blink very slowly, even with an external 16mhz crystal.

The problem, as it turned out, was that I was using the make fuse command, followed by the make flash command, which separately burns the fuses, and then compiles your code and flashes it to the chip. It didn't work correctly until I used the make install command, which it seems basically just runs the former two commands. Now the atmega16 and atmega168 run at the same rate.

So if you've ever had the problem where your fuses don't seem to set correctly, give that a run. I still don't know why it behaves this way.
wireframewolf
 
Posts: 21
Joined: Wed Mar 05, 2008 10:04 pm

Please be positive and constructive with your questions and comments.