Tuesday, February 21, 2012

AT90USBKEY: LED blink program

Here is a small program to get started with AT90USBKEY. This AVRGCC code will make the 4 LED's on board blink. You can download the entire AVR Studio 5 project folder from here.

Sometimes you may get stuck with the line


This line is included to clear the system clock prescaler. AT90USBKEY boards are shipped with their CKDIV8 fuse programmed. This will divide the system clock by a factor of eight during start up and it will remain so unless we clear it manually.  AT90USBKEY on board crystal is 8MHz but controller will be running only at 1 MHz. So to clear up this issue we used the above function. 


Felipe Duque said...

Hi there. I couldn't see any code! :)

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes