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 , , , , , , | 4 Comments

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 , , , , , , | 6 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 , , , , , , , | 1 Comment

Great Series of AVR Tutorials

If you are looking to move beyond playing simple LED games with your Arduino, I recommend starting with these tutorials on the ATMEL AVR chips. You will need to read/reference the datasheets for the chips also. Many of these tutorials … Continue reading

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

Predicitive Arduino GPS Lap Timer (Test)

My Arduino-based (Mega) predictive GPS lap timer under test using an Arduino (168 Duemilanove) as the scripted GPS Simulator. Main loop of code:

Posted in Uncategorized | Tagged , , , , | 1 Comment

Examination of the Arduino micros() Function

Background To fully understand the micros() function, you first need to understand the Timer #0 overflow interrupt handler which was covered in this post. Recall the typical Ardiuno runs on a 16MHz oscillator. Both the millis() and micros() functions base … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 5 Comments