Serial Monitor Communication

MPIDE comes with a nice serial monitor where you are able to print out values that your system board has measured onto your computer screen. But if you are able to print things onto your computer screen, wouldn’t it make sense if the chipKIT board also accepted and processed values that we typed into the serial monitor? It would make a lot of sense, which is probably why we can do just that. Let’s find out how.

Recursion

Welcome back to the Digilent Blog! Today we’re going to go over recursion! Recursion is when a function calls itself directly, or through another function. Sometimes we can’t solve a problem using loops (iteration), so we have to use recursion. Recursion is slower than iteration, difficult to debug, and it uses up more of the stack. But recursion can also have simpler code, so in some cases, the benefits outweigh the problems.

How to Choose a Resistor for Your Design

Take a look at a circuit board and chances are you’re going to find a resistor or two. Most boards today use surface-mount device (SMD) technology, so the components are almost too small to see sometimes, but they are on there, I promise. How do engineers decide which resistors to use in the design? Sometimes it depends on how you want that portion of the circuit to perform, as in the case of an op-amp. Other times it’s to prevent too much current from passing through a given point in a circuit, which is why they are often called current-limiting resistors. Maybe you want a simple way to divide the voltage or current. The reality is that there are numerous ways to use resistors, and oftentimes, the defining the resistor value is up to you.

Why Do Electronic Components Have Such Odd Values?

If you’ve been around electronics for a while, you’ve probably noticed that components like resistors, capacitors, zener diodes and inductors come in some odd values. Looking at the chart above, there seems to be no clear rationale behind the values, but there is a pattern. 47kΩ resistors and 22μF capacitors are everywhere, but not 40kΩ or 50kΩ resistors, or 20μF or 30μF capacitors. So what’s the deal? It all has to do with preferred numbers.