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 [...]
Entries Tagged as 'avr'
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 [...]
Tags:atmega168·avr·avrispmkii
Testing the LUFA USB Serial with GPS data
May 15th, 2009 · No Comments · Uncategorized
In this post I will present my experimentations with the LUFA USB-Serial demo. My target is a Teensy board. I will first check that the serial link is correctly working with a loopback test. Then I will plug my EM-406A GPS module to get NMEA data from the serial input to the host. The USBtoSerial [...]