Monthly Archives: March 2013

Arduino digitalWrite(pin, value)

In case you wonder why the Arduino digital write command is so slow, I present the following exercise in yak shaving: Here is the source code from inside the wiring_digital.c file (I’ve added comments and expanded some of the macros/defines): … Continue reading

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

Improving the Interrupt Service Routine

From the AVR Libc User Manual: Another solution is to still implement the ISR in C language but take over the compiler’s job of generating the prologue and epilogue. This can be done using the ISR_NAKED attribute to the ISR() … Continue reading

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

Time the Execution of a Short Piece of Code

For timing short intervals, you can use this timer #1 quick and dirty technique: Clear the timer, start then stop it. Read the value of the counter, it will be in cycles (times prescaler). This is particularly useful for profiling … Continue reading

Posted in Uncategorized | Leave a comment

Cornell University µC Course Videos

Cornell University microcontroller design course (ECE 4760) video lectures. Lectures dealing with microcontrollers as components in electronic design and embedded control. Course website. No tests!

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

Arduino, 23K256 SRAM and 74LVC245 Bus Transceiver

As discussed in this post, when interfacing 3.3V devices with a 5V Arduino, the logic level needs to be shifted. Most 3.3V devices will be damaged if operated with 5V signals, while others will simply operate unreliably. The shifting can … Continue reading

Posted in Uncategorized | Tagged , , , , | 3 Comments