EmbeddedRelated.com

Pay it Forward

Nathan Jones December 1, 2024

A popular car bumper sticker reads, "If you can read this, thank a teacher!" I might say, "If you can read THIS (article on Embedded Related), then you've been blessed with great experiences and/or great educators or volunteers that got you excited about tech and helped you believe that you had a future in this field!" Why not pay it forward by helping other children have those same great experiences? As we enter another season of giving, I hope you consider doing what you can to support the hundreds or thousands of non-profit organizations, educators, and volunteers around the world who are getting kids excited about tech the same way YOU got excited about tech. In this article, I'll share with you a handful of organizations that I know of or donate to that have this mission. How do you like to give back?


Simulating Your Embedded Project on Your Computer (Part 2)

Nathan Jones November 4, 2024

Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).


Simulating Your Embedded Project on Your Computer (Part 1)

Nathan Jones October 2, 20242 comments

Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.


What I Learned From Crashing and Burning in Grad School

Nathan Jones September 4, 20241 comment

Have you ever felt so consumed by something that it started to crowd other parts of your life? So obsessed with success in a particular area that you could hardly think about anything else? I found myself in exactly that spot in 2018 when I first started graduate school; I wanted to succeed so badly that I worked myself to the bone and I let even my marriage and my health suffer in service to it. This state of being is, believe it or not, NOT conducive to success, in neither the long-term nor the short-term. But it took two authors and one pivotal book for me to understand that, to see the pit I had dug for myself, and to begin the path back out. In this blog, I want to share with you my journey in the hopes that you can avoid the mistakes I made.


Write Better Code with Block Diagrams and Flowcharts

Nathan Jones August 1, 20241 comment

Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.


You Don't Need an RTOS (Part 4)

Nathan Jones July 2, 2024

In this fourth (and final!) article I'll share with you the last of the inter-process communication (IPC) methods I mentioned in Part 3: mailboxes/queues, counting semaphores, the Observer pattern, and something I'm calling a "marquee". When we're done, we'll have created the scaffolding for tasks to interact in all sorts of different the ways. Additionally, I'll share with you another alternative design for a non-preemptive scheduler called a dispatch queue that is simple to conceptualize and, like the time-triggered scheduler, can help you schedule some of your most difficult task sets.


You Don't Need an RTOS (Part 3)

Nathan Jones June 3, 20241 comment

In this third article I'll share with you a few cooperative schedulers (with a mix of both free and commercial licenses) that implement a few of the OS primitives that the "Superduperloop" is currently missing, possibly giving you a ready-to-go solution for your system. On the other hand, I don't think it's all that hard to add thread flags, binary and counting semaphores, event flags, mailboxes/queues, a simple Observer pattern, and something I call a "marquee" to the "Superduperloop"; I'll show you how to do that in the second half of this article and the next. Although it will take a little more work than just using one of the projects above, it will give you the maximum amount of control over your system and it will let you write tasks in ways you could only dream of using an RTOS or other off-the-shelf system.


You Don't Need an RTOS (Part 2)

Nathan Jones May 7, 20246 comments

In this second article, we'll tweak the simple superloop in three critical ways that will improve it's worst-case response time (WCRT) to be nearly as good as a preemptive RTOS ("real-time operating system"). We'll do this by adding task priorities, interrupts, and finite state machines. Additionally, we'll discuss how to incorporate a sleep mode when there's no work to be done and I'll also share with you a different variation on the superloop that can help schedule even the toughest of task sets.


You Don't Need an RTOS (Part 1)

Nathan Jones April 11, 202412 comments

In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.


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.


Embedded Systems Roadmaps

Nathan Jones November 9, 2023

What skills should every embedded systems engineer have? What should you study next to improve yourself as an embedded systems engineer? In this article I'll share with you a few lists from well-respected sources that seek to answer these questions, with the hope of helping provide you a path to mastery. Whether you've only just finished your first Arduino project or you've been building embedded systems for decades, I believe there's something in here for everyone to help improve themselves as embedded systems engineers.


You Don't Need an RTOS (Part 1)

Nathan Jones April 11, 202412 comments

In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.


Write Better Code with Block Diagrams and Flowcharts

Nathan Jones August 1, 20241 comment

Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.


You Don't Need an RTOS (Part 2)

Nathan Jones May 7, 20246 comments

In this second article, we'll tweak the simple superloop in three critical ways that will improve it's worst-case response time (WCRT) to be nearly as good as a preemptive RTOS ("real-time operating system"). We'll do this by adding task priorities, interrupts, and finite state machines. Additionally, we'll discuss how to incorporate a sleep mode when there's no work to be done and I'll also share with you a different variation on the superloop that can help schedule even the toughest of task sets.


Simulating Your Embedded Project on Your Computer (Part 1)

Nathan Jones October 2, 20242 comments

Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.


You Don't Need an RTOS (Part 3)

Nathan Jones June 3, 20241 comment

In this third article I'll share with you a few cooperative schedulers (with a mix of both free and commercial licenses) that implement a few of the OS primitives that the "Superduperloop" is currently missing, possibly giving you a ready-to-go solution for your system. On the other hand, I don't think it's all that hard to add thread flags, binary and counting semaphores, event flags, mailboxes/queues, a simple Observer pattern, and something I call a "marquee" to the "Superduperloop"; I'll show you how to do that in the second half of this article and the next. Although it will take a little more work than just using one of the projects above, it will give you the maximum amount of control over your system and it will let you write tasks in ways you could only dream of using an RTOS or other off-the-shelf system.


What does it mean to be 'Turing complete'?

Nathan Jones October 16, 20235 comments

The term "Turing complete" describes all computers and even some things we don't expect to be as powerful as a typical computer. In this article, I describe what it means and discuss the implications of Turing completeness on projects that need just a little more power, on alternative processor designs, and even security.


Simulating Your Embedded Project on Your Computer (Part 2)

Nathan Jones November 4, 2024

Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).


You Don't Need an RTOS (Part 4)

Nathan Jones July 2, 2024

In this fourth (and final!) article I'll share with you the last of the inter-process communication (IPC) methods I mentioned in Part 3: mailboxes/queues, counting semaphores, the Observer pattern, and something I'm calling a "marquee". When we're done, we'll have created the scaffolding for tasks to interact in all sorts of different the ways. Additionally, I'll share with you another alternative design for a non-preemptive scheduler called a dispatch queue that is simple to conceptualize and, like the time-triggered scheduler, can help you schedule some of your most difficult task sets.


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.