Tag Archives: Programming

Arduino Inline Assembly Tutorial

Arduino_ASM

ucexperiment.wordpress.com has published a series of tutorials on how to use assembly language on Arduino. This can be pretty helpful if you want to do some advantaged coding on Arduino.

An inline assembly statement is a string which specifies assembler code. The string can contain any instructions recognized by the assembler, including directives (we will not discuss assembler directives here). GCC does not parse the assembler instructions and does not know what they mean or even whether they are valid. Multiple assembler instructions can be placed together in a single asm string.

Arduino Inline Assembly Tutorial – [Link]

Getting Started With the ATMega328P

F4YN9I5ILWLBJ0D.MEDIUM

Here is a detailed guide on how to get started with ATMega328P microcontroller. The guide goes in details on how to setup it on a breadboard and how to upload your first code on it. and blink a led.

The real benefit of using this microcontroller is that it’s only $4 US, whereas many other micro-controllers are 10X that price. It can also be easily programmed in the universal programming language, C++. The ATMega is also equipped with a decent amount of memory for any project.

Getting Started With the ATMega328P – [Link]

Open-Source SWD Programming Adapter

protoprog-stlink-600x400

Ethan Zonca has designed a programming adapter for use with STM32 programmer.

After making the switch from AVR to STM32 microcontrollers, I redesigned my old 6-pin ICSP pogo-programming adapter for SWD. The new design allows programming with pogo pins or a small pin header soldered to the pogo pads for debugging, all with the same cable. The footprint uses surface mount pads only, so it can be placed on even the most compact board layouts.

Open-Source SWD Programming Adapter – [Link]

Icestudio – Open Source Graphical FPGA Programming

cropped_shot_2016-02-23-091230_featured

Jesús Arroyo has published Icestudio, a new graphical tool that lets you generate Verilog code using block diagrams and run it on the Lattice Semi iCEstick development board. Using the drag and drop interface you can connect IOs, logic gates, dividers, and other elements. Once the block diagram is ready, a single button press downloads the code to the iCEstick.

Icestudio – Open Source Graphical FPGA Programming – [Link]

PlatformIO – open source ecosystem for IoT

platformio-ide-for-atom.c6645c5e

PlatformIO is an open source integrated development environment for the IoT world. It comes with an IDE which allows you rapid embedded system development and with library manager which organizes hundreds of the most popular libraries. It’s cross platform without external dependences and supports 200+ embedded boards, 15+ development platforms, 10+ frameworks. Check it out on the link below.

PlatformIO – open source ecosystem for IoT – [Link]

Serial Port Communication in C#

50e1ce8bce395fb62b000000

Maurizio tipped us with his latest article on how to use Serial Port in C#. The article does cover the basic code needed to achieve serial communication.

The serial port of the PC is a very important resource both in industrial environment and in home-made electronics, due to the wide popularity of the UART interface which is to be found on many microcontrollers or on many test and design instrumentation (programmable power supplies, multi-meters, oscilloscopes etc).

Serial Port Communication in C# – [Link]

Arduino 101 Fundamentals

FAQLWPGIK2V19Y4.MEDIUM

eliesalame @ instructables.com has written an introduction course to programming Arduino. It is focused on those who just starting now in the Arduino world.

It is meant to be a beginners guide that includes detailed explanation about the basic statements and functions. Most of the sketches I use are taken from the Arduino IDE for their simplicity. I wrote this guide when I first started working with Arduino as a way to help me code easier.

Arduino 101 Fundamentals – [Link]

Visuino – visual programming environment for Arduino

screenshot-01

Visuino is the latest software developed by Mitov Software which allows you to program your Arduino boards using a graphical interface. So far only the official boards are supported but more will come. Using Visuino you can easily create complex programs using drag and drop interface without the need to become expert in programming. Check it out on the link below.

Visuino – visual programming environment for Arduino – [Link]

Processing for Raspberry Pi

processing-screen-shot-500x344

Matt Richardson announced that Processing programming language is now supported by Rasbberry Pi. He writes:

I’m a long-time fan of Processing, a free open source programming language and development environment focused on teaching coding in the context of visual arts. It’s why I’m so excited that the latest version, Processing 3.0.1, now officially supports Raspberry Pi. Just as Sonic Pi lets you make your first sound in just one line of code, Processing lets you draw on screen with just one line of code. It’s that easy to get started. But don’t let that fool you, it’s a very powerful and flexible language and development environment.

Processing for Raspberry Pi – [Link]

The Art of Representing Floating-Point Numbers as Integers

fixedpointformat

Mário Ribeiro writes:

Have you been using float or double variables to perform mathematical operations on embedded systems without a Floating-Point Unit (FPU)? You are doing it wrong! That’s incredibly inefficient.

An FPU is an hardware block specially designed to carry on arithmetic operations on floating point numbers. Even though the C/C++ code may work without an FPU, it’s always much faster to use hardware designed for a specific purpose, like this one, instead of relying on a software implementation, something that the compiler will do for you, knowing the hardware restrictions you have but not in an efficient manner. Essentially, it will generate a lot of assembly code, greatly increasing the size of your program and the amount of time required to complete the operation. Thus, if you don’t have an FPU available and you still want to perform those arithmetic operations efficiently you’ll have to convert those numbers to fixed-point representation. Integers! But how? By scaling them. Let’s see how that scaling value may be determined.

The Art of Representing Floating-Point Numbers as Integers – [Link]