EmbeddedRelated.com
The 2024 Embedded Online Conference

Understanding Microchip 8-bit PIC Configuration

Luther Stanton March 26, 20242 comments

The second post of a five part series picks up getting started developing with Microchip 8-bit PIC Microcontroller by examining the how and why of processor configuration. Topics discussed include selecting the oscillator to use during processor startup and refining the configuration once the application starts. A walk through of the code generated by the Microchip IDE provides a concrete example of the specific Configuration Word and SFR values needed to configure the project specific clock configuration.


C to C++: Templates and Generics – Supercharging Type Flexibility

Jacob Beningo March 24, 20242 comments

"C to C++: Templates and Generics – Supercharging Type Flexibility" illuminates the rigidity of C when managing multiple types and the confusion of code replication or macro complexity. In contrast, C++ offers templates, acting as type-agnostic blueprints for classes and functions, which allows for the creation of versatile and reusable code without redundancy. By using templates, developers can define operations like add once and apply them to any data type, simplifying codebases significantly. Generics further this concept, enabling a single code structure to handle diverse data types efficiently—a boon for embedded systems where operations must be performed on varying data, yet code efficiency is critical due to resource limitations. The blog walks through practical applications, showcasing how templates streamline processes and ensure type safety with static_assert, all while weighing the pros and cons of their use in embedded software, advocating for careful practice to harness their full potential.


Using (Apache) NuttX Buttons Subsystem

Alan C Assis March 22, 2024

Previously in this EmbeddedRelated article, we saw how to use LEDs Subsystem on NuttX testing on RaspberryPi Pico. In the same way we avoided using GPIO Subsystem to control LEDs we can avoid using GPIO Subsystem to read Buttons inputs. That is right, NuttX has an Input Device Subsystem like Linux and today we will learn how to use it.

Buttons are one of the simplest user input interface and after the famous "hello world LED" example they are probably the second thing that...


Simple C++ State Machine Engine

Massimiliano Pagani March 14, 2024

When implementing state machines in your project it is an advantage to rely on a tried and tested state machine engine. This component is reused for every kind of application and helps the developer focus on the domain part of the software. In this article, the design process that turns a custom C++ code into a finite-state machine engine is fully described with motivations and tradeoffs for each iteration.


Getting Started With CUDA C on an Nvidia Jetson: Hello CUDA World!

Mohammed Billoo March 13, 2024

In this blog post, I introduce CUDA, which is a framework designed to allow developers to take advantage of Nvidia's GPU hardware acceleration to efficiently implement certain type of applications. I demonstrate an implementation to perform vector addition using CUDA C and compare it against the traditional implementation in "regular" C.


Modeling Gate Drive Diodes

Jason Sachs March 11, 20241 comment

This is a short article about how to analyze the diode in some gate drive circuits when figuring out turn-off characteristics --- specifically, determining the relationship between gate drive current and gate voltage during turn-off of a power transistor.


Getting Started with the Microchip PIC® Microcontroller

Luther Stanton March 11, 2024

This first post of a five part series looks at the available hardware options for getting started with Microchip 8-bit PIC® Microcontroller, explores the MPLAB® X Integrated Development Environment and walks through setting up a project to expose the configured clock to an external pin and implement a single output GPIO to light an LED.


Make Your Own MCU Boards (2023 Teardown Conference)

Nathan Jones March 7, 2024

Ditch the development boards! Products like the Nucleo development boards serve a wonderful purpose, but they’re ill-suited for projects that need to be small and cheap, such as hobby projects or products just beginning a production run. In this talk (a recording from the 2023 Teardown Conference), you’ll learn how to put a microcontroller or other custom circuit on a PCB a little larger than a stick of gum for less than $3 a board.


BusyBox; The Swiss Army Knife of Embedded Linux

George Emad March 2, 2024

In this article we cover the BusyBox, how it's designed to be optimized for embedded targets, and how to configure and build it in different ways, we also covered the license and limitation, which led to the development of ToyBox, I hope you enjoyed the article, please leave a comment for any correction or suggestions.


Creating a GPIO HAL and Driver in C

Jacob Beningo February 28, 20241 comment

Creating a GPIO Hardware Abstraction Layer (HAL) in C allows for flexible microcontroller interfacing, overcoming the challenge of variability across silicon vendors. This method involves reviewing datasheets, identifying features, designing interfaces, and iterative development, as detailed in the "Reusable Firmware" process. A simplified approach prioritizes essential functions like initialization and read/write operations, showcased through a minimal interface example. The post also highlights the use of AI to expedite HAL generation. A detailed GPIO HAL version is provided, featuring extended capabilities and facilitating driver connection through direct assignments or wrappers. The significance of a configuration table for adaptable peripheral setup is emphasized. Ultimately, the blog illustrates the ease and scalability of developing a GPIO HAL and driver in C, promoting hardware-independent and extensible code for various interfaces, such as SPI, I2C, PWM, and timers, underscoring the abstraction benefits.


How to Estimate Encoder Velocity Without Making Stupid Mistakes: Part I

Jason Sachs December 27, 201230 comments

Here's a common problem: you have a quadrature encoder to measure the angular position of a motor, and you want to know both the position and the velocity. How do you do it? Some people do it poorly -- this article is how not to be one of them.

Well, first we need to get position. Quadrature encoders are incremental encoders, meaning they can only measure relative changes in position. They produce a pair of pulse trains, commonly called A and B, that look like...


Chebyshev Approximation and How It Can Help You Save Money, Win Friends, and Influence People

Jason Sachs September 30, 201220 comments

Well... maybe that's a stretch. I don't think I can recommend anything to help you win friends. Not my forte.

But I am going to try to convince you why you should know about Chebyshev approximation, which is a technique for figuring out how you can come as close as possible to computing the result of a mathematical function, with a minimal amount of design effort and CPU power. Let's explore two use cases:

  • Amy has a low-power 8-bit microcontroller and needs to compute \( \sqrt{x} \)...

My Love-Hate Relationship with Stack Overflow: Arthur S., Arthur T., and the Soup Nazi

Jason Sachs February 15, 201551 comments

Warning: In the interest of maintaining a coherent stream of consciousness, I’m lowering the setting on my profanity filter for this post. Just wanted to let you know ahead of time.

I’ve been a user of Stack Overflow since December of 2008. And I say “user” both in the software sense, and in the drug-addict sense. I’m Jason S, user #44330, and I’m a programming addict. (Hi, Jason S.) The Gravatar, in case you were wondering, is a screen...


Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter

Jason Sachs April 27, 201516 comments

Other articles in this series:

I’m writing this article in a room with a bunch of other people talking, and while sometimes I wish they would just SHUT UP, it would be...


Thermistor signal conditioning: Dos and Don'ts, Tips and Tricks

Jason Sachs June 15, 201118 comments

In an earlier blog entry,  I mentioned this circuit for thermistor signal conditioning:

It is worth a little more explanation on thermistor signal conditioning; it's something that's often done poorly, whereas it's among the easiest applications for signal conditioning.

The basic premise here is that there are two resistors in a voltage divider: Rth is the thermistor, and Rref is a reference resistor. Here Rref is either R3 alone, or R3 || R4, depending on the gain...


VHDL tutorial - part 2 - Testbench

Gene Breniman October 30, 20073 comments

In an earlier article I walked through the VHDL coding of a simple design. In this article I will continue the process and create a test bench module to test the earlier design. The Xilinx ISE environment makes it pretty easy to start the testing process. To start the process, select "New Source" from the menu items under "Project". This launches the "New Source Wizard". From within the Wizard select "VHDL Test Bench" and enter the name of the new module (click 'Next' to...


Zebras Hate You For No Reason: Why Amdahl's Law is Misleading in a World of Cats (And Maybe in Ours Too)

Jason Sachs February 27, 20171 comment

I’ve been wasting far too much of my free time lately on this stupid addicting game called the Kittens Game. It starts so innocently. You are a kitten in a catnip forest. Gather catnip.

And you click on Gather catnip and off you go. Soon you’re hunting unicorns and building Huts and studying Mathematics and Theology and so on. AND IT’S JUST A TEXT GAME! HTML and Javascript, that’s it, no pictures. It’s an example of an


Using the Beaglebone PRU to achieve realtime at low cost

Fabien Le Mentec April 25, 20148 comments
Introduction

I work as an engineer in a synchrotron facility. A few weeks ago, I helped the people in charge of the power supply developments to integrate a realtime control algorithm on a prototype platform: a BeagleBone Black (BBB) running Linux. I had already worked with this board in the past, and I found it very interesting given its excellent resources versus price ratio (around 40 euros). This time, I was impressed by its realtime capabilities. I thought it would be a good idea to...


Coroutines in one page of C

Yossi Kreinin August 20, 201315 comments

A coroutine is a function that you can jump back into after returning from it - and it remembers where it was in the code, and all the variables. This is very useful at times.

One use is generating a sequence of values. Here's how you can generate all the x,y pairs in a 2D range in Python:

def iterate(max_x, max_y): for x in range(max_x): for y in range(max_y): yield x,y for x,y in iterate(2,2): print x,y

This prints:

0 0 0 1 1 0 1 1

The yield keyword is like...


StrangeCPU #1. A new CPU

Victor Yurkovsky February 24, 20136 comments

Summary: In this multi-part series I will share with you a design, implementation notes and code for a slightly different kind of a CPU featuring a novel token machine that resolves an 8-bit token to pretty much any address in a 32-bit or even 64-bit address space, using not much more than an adder.

Table of Contents:
  • Part 1: A new CPU - technology review, re-examination of the premises;  StrangeCPU concepts; x86 notes.

2022 Embedded Online Conference - Final Push!

Stephane Boucher April 8, 2022

With the Embedded Online Conference only a couple of weeks away, we are now doing a final push to ensure that as many engineers as possible who could benefit from the conference are aware of it. 

If you'd like to help us spread the word, not only will you make our day, but you'll also earn a chance to win one of TWO Saleae Logic Pro 8.     

Prize: TWO Saleae Logic Pro 8Raffle...

The 2021 DSP/ML Online Conference

Stephane Boucher September 29, 2021

The 2021 DSP/ML Online Conference is just around the corner and this year again, the program is packed with opportunities to learn. 

By registering for the conference, not only will you have full access to all talks, workshops, and Q&A sessions at this year's event, but you'll also gain instant access to all talks from last year's edition.  

We've asked the speakers to tell me a few words about their sessions, here are some of the answers we've...


Embedded Online Conference 2021 - Watch the Speakers Share their Thoughts on the Value for Attendees

Stephane Boucher May 4, 20212 comments

Over the last few weeks, we've had a chance to chat with some of the speakers at the upcoming Embedded Online Conference.  We asked them to share their thoughts on conferences and the Embedded Online Conference in particular.  Here are their answers edited together in one video:

  

If you are not registered yet for the conference but are considering it, please make sure to use the promo code ER149 to save more than 40% on your registration...


8 Weeks - 8 Giveaways!

Stephane Boucher March 10, 2021

If for some reason, you've been putting off registering for the upcoming 2021 Embedded Online Conference, here are 8 good reasons to register today.

The idea is simple; if you are registered for the conference by the 'raffle date' for any of the following giveaways, you'll automatically be entered into the draw.

So for instance, if you are already registered for the conference or register before March the 22nd, you'll be automatically entered into the 8 draws...


Announcing the 2021 Embedded Online Conference!

Stephane Boucher January 27, 20211 comment

Once again this year, Jacob Beningo and I are putting together the Embedded Online ConferenceLast year's edition was a very rewarding experience, with over 6,000 registrants, fantastic & insightful talks, and lots of positive feedback.  For this year's edition, we are delighted to announce that none other than Jack Ganssle will be giving a Keynote presentation about the 50th anniversary of the Microprocessor.

The 2021 Embedded Online Conference will...


The DSP Online Conference - Right Around the Corner!

Stephane Boucher September 20, 2020

It is Sunday night as I write this blog post with a few days to go before the virtual doors of the very first DSP Online Conference open..

It all started with a post in the DSPRelated forum about three months ago.  We had just had a blast running the 2020 Embedded Online Conference and we thought it could be fun to organize a smaller event dedicated to the DSP community.  So my goal with the post in the forum was to see if...


Already 3000+ Attendees Registered for the Upcoming Embedded Online Conference

Stephane Boucher February 14, 2020

Chances are you already know, through the newsletter or banners on the Related sites, about the upcoming Embedded Online Conference.

Chances are you also already know that you have until the end of the month of February to register for free. 

And chances are that you are one of the more than 3000 pro-active engineers who have already registered.

But If you are like me and have a tendency to do tomorrow what can be done today, maybe you haven't registered yet.  You may...


Free Goodies from Embedded World - Full Inventory and Upcoming Draw Live-Streaming Date

Stephane Boucher March 22, 20191 comment

Chances are that you already know that I went to Embedded World a few weeks ago and came back with a bag full of "goodies".  Initially, my vision was to do a single draw for one person to win it all, but I didn't expect to come back with so much stuff and so many development kits.   Based on your feedback, it seems like you guys agree that It wouldn't make sense for one person to win everything as no-one could make good use of all the boards and there would be lots of...


Free Goodies from Embedded World - What to Do Next?

Stephane Boucher March 6, 20193 comments

I told you I would go on a hunt for free stuff at Embedded World in order to build a bundle for someone to win.


Back from Embedded World 2019 - Funny Stories and Live-Streaming Woes

Stephane Boucher March 1, 20191 comment

When the idea of live-streaming parts of Embedded World came to me,  I got so excited that I knew I had to make it happen.  I perceived the opportunity as a win-win-win-win.  

  • win #1 - Engineers who could not make it to Embedded World would be able to sample the huge event, 
  • win #2 - The organisation behind EW would benefit from the extra exposure
  • win #3 - Lecturers and vendors who would be live-streamed would reach a (much) larger audience
  • win #4 - I would get...

The 2024 Embedded Online Conference