What Is Recursion and How Does It Work?

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.

Fun With the Project Box

We all know how much of a hassle it can be to safely transport your electronics, and let’s face it, the protective cases that many of our boards previously came in were flimsy, unaccommodating, and caused a great deal of stress for our customers. Well, we’ve responded to all of your feedback and I’m here to talk about our new Project Boxes!

History of the FPGA

As you probably know, one of Digilent’s major focuses is producing FPGA (field programmable gate array) boards and educating the public on FPGA design. One of the classes I was in last semester focused on FGPA design. This class is EE324 at WSU, which is taught by Digilent’s own Clint Cole. He gave a background lecture on the History of FPGA chips. Not only was it an extremely interesting lecture, but it also helped me understand the huge leaps in logic design that have been made since the 1960s. This is the history that led to the development of FPGA chips. The chips are the parts that Xilinx makes that we use on our FPGA boards.

Number Systems

Today, we are going to learn about number systems. A “number system” is defined here as “any notation for the representation of numerals or numbers.” We naturally use the decimal (base 10) system, meaning we use the numbers 0-9 to represent all the other numbers. The three types of number systems that we are going to talk about today are decimal, binary, and hexadecimal, but there are many more!

iLAB Analog – Practical Introduction to Analog Circuits

During the Christmas break, I ended up reading iLAB Analog, a new textbook written by Dr. Chen Yun Chao from National Taipei University of Technology Department of Electronic Engineering. I was excited to read a book that deals with both conceptual knowledge and has practical labs. For anyone who wants to learn about analog circuits but has very basic knowledge of physics, it is a good starting point. This book is currently being used in the Intro to Analog Circuits class held at National Taipei University of Technology.

New Product– the Nexys 4 DDR

Our new product, the Nexys4 DDR, is now available for sale! We have been anxiously awaiting this board’s release ever since we received an end-of-life notice from Micron (our memory provider) about cellular RAM that we had been using on all of our Nexys-class products. Rather than strip features off the current Nexys4, we decided to evolve the product line to accept DDR Memory. Check it out now!

How Do I Use Digilent Products at School? (Digital Edition)

As you learned from my previous post (the Analog Edition version of this post), we used the Analog Parts Kit and Analog Discovery in EE352 at Washington State University (WSU) to make an AM radio transmitter and receiver. Not only do we use Digilent products in EE352, but we also used Digilent parts in EE324 (Fundamentals of Digital Systems) — the digital lab class I was taking.

A Listening Calculator

When working with microcontrollers, it’s pretty straightforward to have your system board “listen” for an input that you would give it and have it do some sort of action to show that it noticed your input, such as pressing a button to light up an LED. Listening to a set of inputs and then comparing them to a predetermined set, like in the Simon Says game, is a little more involved but definitely doable. But what if we did not compare to any internal values and the system board has no idea how many inputs we might provide?

Digilent Pmods: Connector Pmods

It’s time for another Pmod feature! Today, we’re going to check out the Connector Pmods. Rather than just being strictly limited to a pure input Pmod or pure output Pmod, all of these Pmods are able to easily communicate with the system board in both directions. Although many of these Pmods might be chalked up to simple “pass-through” modules, I certainly wouldn’t label them that way. These Pmods offer some invaluable features that are otherwise not so easily obtained.

Shields vs Pmods: Good vs Better?

Today we’re going to compare two different ways of increasing the functionality of a system board: Pmods and shields. Those of you have that have been following the Digilent Blog know that Pmods are Digilent’s series of peripheral modules with 6-12 pins that can easily be connected to appropriate pins on a system board to provide extra functionality and include audio amplifiers, GPS receivers, USB to UART interface, seven-segment displays, accelerometers, H-bridges with input feedback, analog-to-digital converters, and much more. For the rest of you who have been in this sector of the electronics industry, you know that shields are a type of board that you can plug directly on top of your microcontroller in a nice pin-to-pin fashion for expanded functionality. Although you might suspect which of these two items I prefer, we’ll check out the advantages of both of them.

What is a Pointer?

This blog post will cover the basics of pointers, a programming tool that is used in languages like C and C++. In this post, we will be using C as our primary language. Pointers are variables that contain a memory address (a concept used to access the computer’s primary storage memory). Variables normally contain a value such as 1 or ‘a’, but pointers contain an address of the value. When we reference a variable through pointers, this is called indirection. Each link goes to a text file of C code. This code can be run as is and will help show us the power of pointers!

Running 5+ Servos on a uC32…Can I Do It?

In the not too distant past, we made a couple of posts on Pmods that can help drive motors as well as a post on stepper motors. Today, we’re going to check out running multiple servo motors on a chipKIT board. Why would we want to do this? Well, aside from the nice feeling that comes from successfully doing some extreme multitasking, we’d also be able to run some super cool mechatronics projects, such as a robot arm!

What Are Muxes and Demuxes?

A huge part of FPGA design is using logic blocks in design. With logic blocks, you can compartmentalize your design, rather than trying implement everything in one shot. Designing without smaller blocks would be like trying to design a car without subsystems like the braking system or engine. About half of the way through the course there is a project that covers a variety of basic logic blocks, including multiplexers (muxes) and demultiplexers (demuxes). So what are muxes and demuxes?