Markdown to PDF – quick howto for linux users (Ubuntu)

This is a quick howto guide showing how to create beautiful PDF files from Markdown format text files using a single command line in your linux (Ubuntu) terminal. If you need to convert files from one markup format into another, then it can be your swiss-army knife. Many thanks to pandoc creators! 1. Install tools sudo apt-get install … Read more

Generating true random numbers using floating ADC input – myth or facts?

This article shows the feasibility of using ADC input of AVR chip as a source of True Random Number Generator (TRNG). I have prepared the testbed and recorded via UART (115200; 8N1) about 50’000’000 of 32bit random numbers. The tests took about 11 hours (including a time I spent to pray to UART for a … Read more

ESP32 – dockerized toolchain

Docker image built on top of espressif/idf with xtensa toolchain, ESP_IDF, and few additional tools: xtensa toolchain (2019; crosstool-NG esp-2019r2; 8.2.0) esptool.py (v2.9-dev) make (v4.1) cmake (v3.10.2) DockerHub: https://hub.docker.com/r/lpodkalicki/esp32-toolchain Installing Bellow you can find recommended simple one-line installer that pulls the newest docker-image and installs esp32-toolchainscript into “/usr/bin/” directory. curl https://raw.githubusercontent.com/lpodkalicki/esp32-toolchain-docker/master/install.sh | bash -s — Getting started Install toolchain … Read more

How to make ATtiny13 running at 128 kHz clock source

The ATtiny13’s default clock source setting is the Internal RC Oscillator running at 9.6MHz with clock divider /8 (fuses L=0x6A and H=0xFF; see fuse calculator). This short article explains how to downclock the ATtiny13 by swtiching to Internal RC Oscillator running at 128kHz without clock divider (fuses L=0x7B and H=0xFF) and still have a control to program AVR … Read more

How to update AVR USBasp firmware to latest version

The common reason why you would like to update this firmware is unlock slow-sck function for cheap (e-bay or Aliexpress) USBasp programmers, like this one on the picture. The slow-sck function allows to program AVR chips running at very low frequency clock source (i.e. 128kHz). When your USBasp programmer prints that warning it means that firmware update is … Read more

ESP8266 – WiFi beacon spammer

In this article I will show you how to make a WiFi  beacon spammer on ESP8266. Beacon spamming involves broadcasting a valid IEEE 802.11 beacon frames using fake SSIDs and MAC addresses. This educational project is hackable and easy to get running. The code is on GitHub, here. What is WiFi Beacon? WiFI beacon frames are used by … Read more

Twiddle-factor-based DFT for microcontrollers

This version of DFT algorithm has been tested with success on a various microcontrollers (AVR – including ATtiny13, STM32 and ESP8266). The code is relatively simple and short what makes it easy to port to other programming languages / microcontrollers. In this tutorial I will open the black-box and show you some practical information about how this algorithm works and how to use … Read more

Arduino – how to start?

Arduino is an open-source electronics platform based on easy-to-use hardware (Arduino boards), software (Arduino IDE), which allows to write programs and upload them to board (usually via USB connection) and an amazing community. In my opinion it’s a great tool to learn about microcontroller programming and for fast device prototyping. Arduino is not only for beginners. … Read more

Bit-level operations – check integer is even or odd

In this short article I will exaplain how to use bit-level operations to verify that integer is even or odd. It’s very useful and fast verification. Examples below have been compiled and tested using gnu-gcc. $/> gcc example.c -o example CHECK EVEN To verify that integer is even we need to check first bit is not set. #include <stdint.h> #include <assert.h> … Read more

Bit-level operations – bit flags and bit masks

This article introduces to bit flags, bit masks and basic bit-level operations on them. In the world of microcontrollers, when you need to save a boolean values (true/false) then it can be useful to “pack” individual boolean values into a single integer value for storage efficiency purposes. This is done by using the bitwise and shift operators to set, clear, … Read more