Tag Archives: inline

ATMEL Studio 7 Does Blink in Assembly Language

See the previous post (here) for detailed information on AS7 installation and simulating of an Arduino program execution. As an exercise to gain familiarity with AS7, lets make an assembly language project using the below Blink code: • Select “File>New>Project”. … Continue reading

Posted in arduino, assembly language | Tagged , , , , , , , | Leave a comment

Using ATMEL Studio 7 for Arduino Development

While installing ATMEL Studio 7 (AS7) is not required in order to learn inline assembly language programming, it has worthwhile advantages. The ability to compile code for the Arduino, run it inside the included Simulator and immediately debug it will … Continue reading

Posted in arduino, avr | Tagged , , , , , , , | Leave a comment

My Cup Overflows

When performing math (even basic addition and subtraction) with signed numbers an overflow problem sometimes arises. The Arduino microcontroller indicates the existence of an overflow error by setting the overflow flag in the SREG. Here’s a demonstration of the overflow … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Port & Pin Compendium

The following is a compendium of inline assembly functions dealing with ports and pins. Use these at your own risk. These functions have been trimmed of most bounds checking, so they can easily be abused. The Arduino Inline Assembly Tutorial … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , , , | 1 Comment

Arduino Inline Assembly Tutorial (Examples)

As the final tutorial in this series, we present four example inline assembly functions for the arduino. Specifically, these cover the conversion of a byte to a hexadecimal string, SPI Mode 0 hardware transfer, SPI Mode 0 Bit-banging, and the … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Interrupts)

Pardon The Interruption The previous tutorial covered the basics of writing inline functions. A close relative of the function is the Interrupt Service Routine (ISR), which is the topic here. Portions of this tutorial may pertain to functions as well. … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | Leave a comment

Arduino Inline Assembly Tutorial (Functions)

At first consideration, the topic of functions seems simple and trite. Just discuss how to “CALL” and “RETURN” to and from a function, right? However, there are many subtopics involved as well. For example, passing and returning parameters, prologue and … Continue reading

Posted in arduino, assembly language, avr, avr inline assenbly | Tagged , , , , , | 1 Comment

Arduino Inline Assembly Tutorial (Tables)

Often, the fastest way to compute something on an arduino is to not compute it all. Huh? For example, trigonometric functions are costly operations and can abruptly slow your application to the pace of a crawl. And many times, the … Continue reading

Posted in Uncategorized | Tagged , , , , , | 6 Comments

Arduino Inline Assembly Tutorial (Strings)

Addressing Modes When loading and storing data, there are several addressing methods available for use. The arduino’s AVR microcontroller supports 13 address modes for accessing the Program memory (Flash) and Data memory (SRAM, Register file, I/O Memory, and Extended I/O … Continue reading

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

Arduino Inline Assembly Tutorial (Branching)

Loop and Branch Branching is a fundamental feature of computers. For example, branching allows a computer to repeat instruction sequences. One of the most  basic forms of repetition is a “loop”, and the loop is probably the most widely used … Continue reading

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