Category Archives: Uncategorized

Arduino Inline Assembly Tutorial #3 (Clobbers)

Clobbered Guess what? Our previous tutorial example (Tutorial #2) has a problem. Here is the inline portion of that code: Notice in our example, we use register #26, or r26. Even though we only used this register temporarily, we have … Continue reading

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

Arduino Inline Assembly Tutorial #2 (Extending asm)

The Extended asm Statement The first tutorial in this series can be found here and covers a great amount of necessary background material. The general form of an extended inline assembler statement is: asm(“code” : output operand list : input … Continue reading

Posted in Uncategorized | Tagged , , , , , | 2 Comments

Arduino Inline Assembly Tutorial #1 (Basic asm)

Motivation Learning inline assembly language on the Arduino AVR 8-bit platform is a daunting task for many (at least it was for me). Besides the cryptic syntax and the high level of understanding the semi-official documentation assumes, there exists very … Continue reading

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

Lean and Mean Float to String Conversion (ftoa)

Here is an often requested, basic float to ascii conversion function (ftoa). The typical method for arduino to perform this conversion is to use either of the dtostrf() or sprintf() functions. Both of these library functions incorporate the same underlying … Continue reading

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

Floating Point Precision and Binary 32 or, Arduino Don’t Know Math

Did you know? 0.1 + 0.2 = 0.30000001 Try this simple arduino program to prove it: First, don’t be alarmed, and second, don’t throw your arduino into the trash thinking it’s defective. Its working just fine. For comparison, performing this … Continue reading

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

EC-135T2+ Emergency Procedure Guide

Use at your own risk. No effort has been made to ensure these documents are current or error free. Annotated guides are located here: Word format and PDF format.

Posted in Uncategorized | Leave a comment

(Sort of) Running an Arduino Program Stored in Memory

Ever wonder if you could call a program stored as machine code inside of an array? It’s possible, however, there are some hurdles to overcome. First, the arduino (an ATMEL AVR based μC) is based upon the modified Harvard architecture. … Continue reading

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

Consequences of Global vs. Local Variable in Arduino Code

This is an overly simplistic comparison of the consequences of using a global vs. local variable on the Arduino. Beyond the obvious variable scope, take note of the program size trade off (code and data segments), startup code differences, stack … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Arduino Due Assembly Language Listing of Compiled Sketch (Windows)

1) Compile your sketch with verbose output turned on during compilation. 2) Find the ELF file – One of the last commands in the output window will be an “avr-objcopy” targetting the compiled (.elf) file of your sketch. Find and … Continue reading

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

Arduino Due Inline Assembly Blink

Very basic inline assembler example of the blinky program. A good place to start learning ARM assembly language is through this online book. You will find a concise summary of ARM GCC inline assembly here. Interesting to note, the Arduino … Continue reading

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