Tag Archives: timer

STM32F411 RC Calibration Using a DS3231 TCXO 1HZ Signal

STM32 RC oscillator frequency varies from one chip to another due to manufacturing process variations. ST claim each device is factory calibrated for 1% accuracy at 25°C. Thus, after reset this factory calibration value is loaded in the HSICAL[7:0] bits … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

NXP LPC812 Clocks and Timers

Oscillators and Clocks The System Oscillator, not to be confused with the System Clock, can be fed by an external source (XTAL pins or CLKIN pin) or from the 12MHz Internal Oscillator. The external sources are limited to a maximum … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Reading an AVR Bootloader From the Application Section

What follows is a brilliant hack, created by Julians Kidmore (aka Snial), the talented mind behind the Fignition project. His ingenious hack, called BootJacker, is documented on his blog, OneWeekWonder. I can’t begin to explain his algorithm as well as … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Cascading Timers to Create a Long Delay

Here is a demonstration program that runs on an Arduino which creates a 1 minute long delay by cascading timers. The procedure is outlined in Atmel Application Note AVR133. I’ve set timer #1 up to toggle the OCR1A pin (D9) … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 4 Comments

The Lost Art of Cycle Counting

Let’s assume we want a 1/2 second delay inserted into our program (at least as close as we can get given crystal accuracy). We could simply rely on the built-in delay functions, or we could roll our own. So let’s … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

Un-Bricking an ATtiny13

I was playing with my ATtiny13 timer #0 fast PWM settings to test the range of frequencies I could achieve. I started with the fastest setting using the internal oscillator. 9.6MHz, no prescaler, no timer divider and using a TCNT0 … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

ATtiny13 Blink Using an Interrupt

Note to self: Ensure you set the fuse bits for internal oscillator correctly. Code:

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment