Elastic Sheep

Because elasticdog was already taken

Elastic Sheep header image 4

Entries Tagged as 'avr'

Installing the LUFA TeensyHID bootloader

January 5th, 2010 · 48 Comments · Uncategorized

The LUFA project contains the TeensyHID bootloader that can be used as a replacement of the original HalfKay bootloader preloaded on the Teensy boards. It can be useful if like me you have completely erased the original flash with an external programmer. Because the HalfKay bootloader is proprietary code and is protected by lock bits, [...]

[


Software reset of an ATMEGA168

December 30th, 2009 · No Comments · Uncategorized

Could be useful sometime in the future: http://wiblocks.luciani.org/docs/app-notes/software-reset.html #include <avr/wdt.h>   void reboot() { wdt_disable(); wdt_enable(WDTO_15MS); while (1) {} } The watchdog is enabled with the minimum time-out of 15ms. Then a system reset is triggered when the time-out is reached. Note: the reset source can be determined at boot time by reading the MCUSR [...]

[


Driving a buzzer

October 12th, 2009 · No Comments · Project Wiggum

In this post I will add a buzzer to my prototype and show two ways to test it, first by bit-banging a pin then by using a hardware counter. Connecting the buzzer I am using a CEM-1203 magnetic buzzer (datasheet). This buzzer has peak frequency responses at 400Hz, 800Hz, 2kHz and 4kHz. To connect it [...]

[


Adding switches

October 5th, 2009 · 1 Comment · Project Wiggum

In this post I will add two switches to control the selection of one led among six. One of the button will increase the selection, the other one will decrease it. Connecting the switches I connect the switches on the PC0 and PC1 inputs and on the ground. I don’t need any external pull-up resistor [...]

[


Blinking the leds

September 29th, 2009 · No Comments · Project Wiggum

My prototyping of the Wiggum project will begin with the usual blinking leds demo. This will help to establish a simple basis for hardware and software by slowly adding features layer after layer. Building a basic circuit My target is an ATMEGA168. Here is the datasheet. I will use an USB port as the 5V [...]

[