Microcontrollers and basic bit-level operations

Why it’s so important to know how it works? Well, if you’re making a software for microcontrollers you have to use it in many places in the code to for example manipulate table of processor registers. It also helps to make the program smaller, much faster and allows to perform neat tricks (this isn’t always … Read more

How to install AVR assembler AVRA on Linux (Ubuntu)

In this article I’d like to show how to install AVRA – an opensource version of assembler for ATMEL (currently MICROCHIP) chips on Linux (Ubuntu). Please note that AVRA is not a part of AVR-GCC and uses different directives. 1. Install AVRA sudo apt-get install avrdude avra 2. Compile and flash example program (ATtiny13) Clone repository from GitHub cd $HOME git … Read more

ESP8266 – building the toolchain for Linux (Ubuntu)

This is a quick tutorial that shows how to build a complete development environment (including FreeRTOS support) for the ESP8266 processors on Linux. These instructions have been tested successfully on Ubuntu 17.04. UPDATES [28.10.2019] Take a look at docker version of ESP8266 Toolchain [05.03.2019] If you want to use FreeRTOS in your project I recommend to install a … Read more

How to compile and burn the code to STM32 chip on Linux (Ubuntu)

This is tutorial for beginners that shows how to install tools, compile the code with gcc-arm-none-eabi and send it to the STM32 using st-flash. It also introduce basics of automation of this task by putting all instructions into Makefile. A few, complete code examples can be found on GitHub: stm32f401 stm32f072 stm32f042 Updates [28.10.2019] Take … Read more

ESP32 – flashing the chip

Once the ESP32 Toolchain is built, we’re ready to compile and flash the example program. This short tutorial shows how to compile and burn the code into ESP32. Compilation Before compilation part we’re able to change menu options, i.e. we can configure the serial port to be used for uploading, etc. For the test, let’s … Read more

ESP32 – building the toolchain for Linux (Ubuntu)

This quick tutorial shows how to build a complete development environment for the ESP32 processors on Linux (Ubuntu).  These instructions have been tested successfully on Ubuntu 16.04  (32 and 64 bit). Update: 18-05-2017. Building Toolchain with Bash One-Liner I recommend to use this handy bash one-liner command to build ESP32 Tolchain. To override ESP32 Toolchain … Read more

Microcontrollers and pull-up / pull-down resistors

A pull-up resistor is a resistor connected between a signal conductor (GPIO) and a positive power supply voltage while a pull-down resistor is a resistor connected between a signal conductor and a ground. They are used on inputs to prevent floating lines, rapidly switching between high and low and a middle “undefined” region. Outputs normally do … Read more

What is Serial Peripheral Interface (SPI) ?

Serial peripheral interface (SPI) is a hardware/software communication protocol originally developed by Motorola and widely used by others in the industry. SPI is quite straightforward – it defines how to communicate in easy way between 2 digital devices – i.e. between AVR and devices, like other AVRs, external EEPROMs, DACs, ADCs, etc. SPI is a single-master … Read more

How to compile and burn the code to AVR chip on Linux/MacOSX/Windows ?

This is a quick tutorial for beginners that aims to show how to install tools, compile the code with avr-gcc and send it to the MCU with avrdude. It also introduce basics of automation of this task by putting the all instructions into Makefile. The example files (main.c, main.bin, main.hex, Makefile) has been packaged as … Read more