EmbeddedRelated.com
The 2026 Embedded Online Conference

On hardware state machines: How to write a simple MAC controller using the RP2040 PIOs

Sergio R CaprileSergio R Caprile December 8, 2024

Hardware state machines are nice, and the RP2040 has two blocks with up to four machines each. Their instruction set is limited, but powerful, and they can execute an instruction per cycle, pushing and popping from their FIFOs and shifting bytes in and out. The Raspberry Pi Pico does not have an Ethernet connection, but there are many PHY boards available… take a LAN8720 board and connect it to the Pico; you’re done. The firmware ? Introducing Mongoose…


Picowoose: The Raspberry Pi Pico-W meets Mongoose

Sergio R CaprileSergio R Caprile October 6, 2024

This example application describes the way to adapt the George Robotics CYW43 driver, present in the Pico-SDK, to work with Cesanta's Mongoose. We are then able to use Mongoose internal TCP/IP stack (with TLS 1.3), instead of lwIP (and MbedTLS).


When a Mongoose met a MicroPython, part II

Sergio R CaprileSergio R Caprile June 22, 2024

In the first part of this blog, we introduced this little framework to integrate MicroPython and Cesanta's Mongoose; where Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. Now we add MQTT to the equation, so we can subscribe to topics and publish messages right from MicroPython.


When a Mongoose met a MicroPython, part I

Sergio R CaprileSergio R Caprile March 31, 2024

This is more a framework than an actual application, with it you can integrate MicroPython and Cesanta's Mongoose.
Mongoose runs when called by MicroPython and is able to run Python functions as callbacks for the events you decide in your event handler. The code is completely written in C, except for the example Python callback functions, of course. To try it, you can just build this example on a Linux machine, and, with just a small tweak, you can also run it on any ESP32 board.


Getting Started With Zephyr: Bluetooth Low Energy

Mohammed BillooMohammed Billoo January 29, 2024

In this blog post, I show how to enable BLE support in a Zephyr application. First, I show the necessary configuration options in Kconfig. Then, I show how to use the Zephyr functions and macros to create a custom service and characteristic for a contrived application.


The Asimov Protocol

Ido GendelIdo Gendel January 4, 2024

While the Internet is choke-full of explanations of basic data communication protocols, very little is said about the higher levels of packing, formatting, and exchanging information in a useful and practical way. This less-charted land is still fraught with strange problems, whose solutions may be found in strange places – in this example, a very short, 60 years old Science Fiction story.


Elliptic Curve Cryptography - Multiple Signatures

Mike Mike November 19, 2023

Point pairings let you compress many independent elliptic-curve signatures into a single verification, reducing n checks to one. This post explains how each signer derives a coefficient from the ordered list of public keys, aggregates signatures on the base group and public keys on the extension group, and verifies everything with one pairing computation. It also flags practical cautions like key validation and agreed ordering.


Elliptic Curve Cryptography - Extension Fields

Mike Mike October 29, 2023

An introduction to the pairing of points on elliptic curves. Point pairing normally requires curves over an extension field because the structure of an elliptic curve has two independent sets of points if it is large enough. The rules of pairings are described in a general way to show they can be useful for verification purposes.


Elliptic Curve Cryptography - Key Exchange and Signatures

Mike Mike October 21, 2023

Elliptic curve mathematics over finite fields helps solve the problem of exchanging secret keys for encrypted messages as well as proving a specific person signed a particular document. This article goes over simple algorithms for key exchange and digital signature using elliptic curve mathematics. These methods are the essence of elliptic curve cryptography (ECC) used in applications such as SSH, TLS and HTTPS.


Elliptic Curve Cryptography - Security Considerations

Mike Mike October 16, 2023

The security of elliptic curve cryptography is determined by the elliptic curve discrete log problem. This article explains what that means. A comparison with real number logarithm and modular arithmetic gives context for why it is called a log problem.


MSP430 LaunchPad Tutorial - Part 4 - UART Transmission

Enrico GaranteEnrico Garante July 3, 201320 comments

Want to stream sensor or debug data from an MSP430 LaunchPad to a PC or Bluetooth module? Enrico swaps in an MSP430G2553 and shows how to configure SMCLK, P1 pin multiplexing, and UCA0 baud/dividers (with modulation) to approximate 115200 baud. The post also walks through interrupt-driven RX/TX handling and a low-power wait loop that sends a "Hello World" reply on demand.


Help, My Serial Data Has Been Framed: How To Handle Packets When All You Have Are Streams

Jason SachsJason Sachs December 11, 201110 comments

Framing byte streams is easier to get wrong than you think, and a bad scheme can leave your embedded device acting on the wrong packet. Jason Sachs walks through common plaintext and binary framing approaches, explains why CRCs alone can still permit false resynchronization, and demonstrates COBS as a simple, low-overhead byte-stuffing method that prevents delimiter collisions and guarantees resynchronization.


Endianness and Serial Communication

Stephen FriederichsStephen Friederichs May 20, 20131 comment

A single wrong byte order can cost you a day of debugging, and Stephen Friederichs walks through how to avoid that when sending multi-byte data over a byte-oriented serial link. He demonstrates an ATmega328P sending 16-bit ADC readings, capturing raw bytes with RealTerm, and plotting with Octave, showing how swapped endianness can produce plausible but incorrect results. The post gives practical steps to capture, test, and verify byte order.


Linear Feedback Shift Registers for the Uninitiated, Part XVI: Reed-Solomon Error Correction

Jason SachsJason Sachs June 19, 2018

Jason Sachs demystifies Reed-Solomon codes with hands-on examples and pragmatic tips for embedded engineers. The article shows why RS encoding is just polynomial division in GF(2^m), why decoding is mathematically heavier, and how to implement encoders in Python and in C-friendly form using LFSRs and table-driven methods. Read this for working code, generator-polynomial examples, and an embedded-minded view of RS practicalities.


The CRC Wild Goose Chase: PPP Does What?!?!?!

Jason SachsJason Sachs October 23, 20142 comments

Jason Sachs walks through a CRC rabbit hole and explains why ambiguous CRC names and incomplete specs lead to subtle protocol bugs. He demonstrates how XMODEM and KERMIT variants with a zero initial value can miss dropped leading-zero bytes, praises the X.25 standard for providing test vectors and a clear CRC16 definition, and warns that RFCs that ship only sample code are a poor substitute for a proper specification.


Elliptic Curve Cryptography - Basic Math

Mike Mike October 10, 2023

An introduction to the math of elliptic curves for cryptography. Covers the basic equations of points on an elliptic curve and the concept of point addition as well as multiplication.


Using a RTLSDR dongle to validate NRF905 configuration

Fabien Le MentecFabien Le Mentec January 27, 20146 comments
I am currently working on a system to monitor the garage door status from my flat. Both places are 7 floors apart, and I need to send the data wirelessly. I chose to operate on the 433MHz carrier, and I ordered 2 PTR8000 modules: http://www.electrodragon.com/w/NRF905_Transceiver_433MHz-Wireless_ModuleThe PTR8000 is based on the dual band sub 1GHz NRF905 chipset from NORDICSEMI: http://www.nordicsemi.com/eng/Products/Sub-1-GHz-RF/nRF905I...

Elliptic Curve Cryptography

Mike Mike November 16, 20156 comments

Secure online communications require encryption. One standard is AES (Advanced Encryption Standard) from NIST. But for this to work, both sides need the same key for encryption and decryption. This is called Private Key encryption.


How to Give Persistent Names To USB-Serial Devices on Ubuntu 14.04

Tayyar GUZELTayyar GUZEL May 22, 2017

When your dock reshuffles ttyUSB assignments, Tayyar shows how to bind USB-serial devices to persistent names on Ubuntu 14.04. The post walks through using dmesg and udevadm to locate unique attributes like KERNELS and ATTRS{serial}, creating /etc/udev/rules.d entries with NAME and SYMLINK, and applying rules with udevadm trigger. It includes common pitfalls and quick fixes to get minicom talking to the right port.


Linear Feedback Shift Registers for the Uninitiated, Part XIV: Gold Codes

Jason SachsJason Sachs April 18, 2018

Last time we looked at some techniques using LFSR output for system identification, making use of the peculiar autocorrelation properties of pseudorandom bit sequences (PRBS) derived from an LFSR.

This time we’re going to jump back to the field of communications, to look at an invention called Gold codes and why a single maximum-length PRBS isn’t enough to save the world using spread-spectrum technology. We have to cover two little side discussions before we can get into Gold...


The 2026 Embedded Online Conference