Archive for June 2010

Events management (Part 2)

Part 1, 2, 3 In the previous attemps to capture a change in the state of an input line, we faced a timing problem. Interrupts will help us in this way. First we “attach” an interrupt to one one the two dedicated lines from Arduino (repectively PIND2 and PIND3 nammed after interrupt line 0 and 1): […]

Events management (Part 1)

Part 1, 2, 3 Managing events in an (hopefully) intelligent manner is the primary objective for designing a microcontroller based application. I am opening this endless topic in order to compare the various solutions apllicable to the management of events. As a starter, we will only use one input line and one output led. Next exemple illustrates the […]

This may help you too!

Get a chance to improve your German, and have a good reading on programming on this blog

Direct Digital Synthesizer (DDS) (Part 3)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9 Here we go for some measurements obtained from the previously described Direct Digital Synthesizer. Measurements have been performed using a Rigol DS1052E Digital Storage Oscilloscope (DSO), originally 2 channels/50 Mhz, which has been uprated to 100 Mhz (See how here). The Channel 1 (yellow plot) probe is attached to the end point of […]


Part 1, 2, 3, 4, 5, 6 One of the most attractive, promising technologies for the (very next) future. Actually smaller than a drone, capable of moving in any direction with an amazing precision, quadcopters are made of a body sustained in the air by means of 4 (and sometimes more) propellers. These are mostly […]

Incremental rotary encoders (Part 3)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 The very first rotary encoder that I used had no integrated push button, which is a pity for designing human interfaces. I ordered a couple of ALPS encoders which integrate this feature. Note that the ALPS encoders (at least the ones that I received) generate 4 state changes during one rotational […]


Here is a link to my fit for purpose documentation. Made of information stolen from Arduino’s official site, complemented with my own notes, tips, tricks and comments.

One led voltmeter (Part 4)

Part 1, 2, 3, 4 A/D converter optimization… …that you could also translate in “Why make things simple, when you can them make complex” ! Here, we get rid of the analogRead() function and we will directly use A/D converter registers . It is strongly advised to read the ATMEGA datasheet in order to get […]

Incremental rotary encoders (Part 2)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Fed up rotating the encoder’s knob? It is time to improve a little bit our counting technique. The encoder reading routine analyses the interval between two counts. If this interval is more than a certain time (in our case 100 ms), the counter is incremented or decremented by unitary steps. If […]

Incremental rotary encoders (Part 1)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Note: This post is the starting point for a whole series of post dedicated to rotary encoders. Please read through thme all in order to benefit from all the improvements brought to the original code.You may also want to read about this  heat control application which features encoders. An absolute encoder has a […]