Diode Bridge Solution (EE Tip #140)

Once I connected a battery up to a DSP in the wrong “direction,” thereby destroying the DSP. That incident drove home the necessity of “suspenders and belt” design.Diode

After the accident, my colleague and I added a diode to the circuit to make it impossible to repeat that mistake. Nowadays, when I teach elementary electronics courses, I generally mention the diode bridge as a way to make it possible to connect up a battery in either “direction” without endangering the electronics to which the battery is to be connected.

My mistake has served as a cautionary tale for many years now.—Shlomo Engelberg, CC25, 2013

New DSP “Lab-in-a-Box” for ARM-Based Audio Systems

Cambridge, UK-based, ARM and its partners will start shipping a DSP “Lab-in-a-Box” (LiB) to universities worldwide to help boost practical skills development and the creation of new ARM-based audio systems. This will include products such as high-definition home media and voice-controlled home automation systems. The LiB kits contain ARM Cortex-M4-based microcontroller boards by STMicroelectronics and audio cards from Wolfson Microelectronics and Farnell element14.ARMDSPLiBWeb

As the centerpiece of the ARM University Program, LiB packages offer ARM-based technology and high-quality teaching and training materials that support electronics and computer engineering courses. DSP courses have traditionally used software simulation packages, or hands-on labs using relatively expensive development kits costing around $300 per student. By comparison, this new DSP LiB will cost around $50 and will allow students to practice theory with advanced hardware sourced from widely-available products.

“Our Lab-in-a-Box offerings are proving hugely popular in universities because of the low-cost access to state-of-the-art technology,” said Khaled Benkrid, manager of the Worldwide University Program, ARM. “The DSP kits, powered by ARM Cortex-M4-based processors, enable high performance yet energy-efficient digital signal processing at a very affordable price. We expect to see them being used by students to create commercially-viable audio applications and it’s another great example of our partnership supporting engineers in training and beyond.”

The DSP LiB will begin shipping to universities in July 2014. It is the latest in a series of initiatives led by ARM which span multiple academic topics including embedded systems design, programming and SoC design. The DSP kits will also be offered to developers outside academia at a later date.

[via audioXpress.com]

DSP vs. RISC Processors (EE Tip #110)

There are a few fundamental differences between DSP and RISC processors. One difference has to do with arithmetic. In the analog domain, saturation, or clipping, isn’t recommended. But it generally comes with a design when, for example, an op-amp is driven high with an input signal. In the digital domain, saturation should be prevented because it causes distortion of the signal being analyzed. But some saturation is better than overflow or wrap-around. Generally speaking, a RISC processor will not saturate, but a DSP will. This is an important feature if you want to do signal processing.

Let’s take a look at an example. Consider a 16-bit processor working with unsigned numbers. The minimum value that can be represented is 0 (0×0000), and the maximum is 65535 (0xFFFF). Compute:

out = 2 × x

where x is an input value (or an intermediate value in a series of calculations). With a generic processor, you’re in trouble when x is greater than 32767.

If x = 33000 (0x80E8), the result is out = 66000 (0x101D0). Because this value can’t be represented with 16 bits, the out = 2 × x processor will truncate the value:

out = 2 × 333000 = 464(0x01D0)

From that point on, all the calculations will be off. On the other end, a DSP (or an arithmetic unit with saturation) will saturate the value to its maximum (or minimum) capability:

out = 2 × 333000 = 65535(0xFFFF)

In the first case, looking at out, it would be wrong to assume that x is a small value. With saturation, the out is still incorrect, although it accurately shows that the input is a large number. Trends in the signal can be tracked with saturation. If the saturation isn’t severe (affecting only a few samples), the signal might be demodulated correctly.

Generic RISC processors like the NXP (Philips) LPC2138 don’t have a saturation function, so it’s important to ensure that the input values or the size of the variable are scaled correctly to prevent overflow. This problem can be avoided with a thorough simulation process.—Circuit Cellar 190, Bernard Debbasch, “ARM-Based Modern Answering Machine,” 2006.

This piece originally appeared in Circuit Cellar 190, 2006. 

Processing, Wiring, and Arduino (EE Tip 101)

Processing is a language and an open-source programming environment for programming images, animations, and interactions. The project, an initiative from Ben Fry and Casey Reas, is based on ideas developed by the Aesthetics and Computation Group of the MIT Media Lab. Processing was created in order to teach the fundamentals of programming in a visual context and to serve as a sketchbook or professional software production tool. Processing runs under GNU/Linux, Mac OS X, and Windows. Several books have already been written on Processing.

Source: Clemens Valens, “Microcontrollers for Dummes,” 080931-I, Elektor, 2/2009.

Source: Clemens Valens, “Microcontrollers for Dummes,” 080931-I, Elektor, 2/2009.

Just like Arduino, Wiring is a programming environment with microcontroller board for exploring electronic arts, teaching programming, and quick prototyping. Wiring, programmed in Processing, is an initiative by Hernando Barragán and was designed at the Interaction Design Institute Ivrea (IDII) in Italy.

Arduino is a fast, open-source electronic prototyping platform. Arduino is aimed at DIYers, electronics enthusiasts, and anyone interested in creating objects or interactive environments. Created by Massimo Banzi, Gianluca Martino, David Cuartielles, and David Mellis, Arduino uses a programming language based on Processing. Arduino may be regarded as a simplification of Wiring.

For more information, refer to Clemens Valens’s article, “Microcontrollers for Dummies,” 080931-I, Elektor, 2/2009.

NXP LPC800 Microcontroller Challenge

Attention microcontroller users around the world! Ready to enter NXP Semiconductor’s LPC800 Challenge? Getting started is straightforward.

Elektor and Circuit Cellar have partnered with NXP Semiconductors to promote the Challenge. Once you have your LPC800 mini-board and code, you simply register and start working. The rules and complete details are listed on the LPC800 Challenge webpage.

The entry deadline is August 30, 2013. Once all the entries are received, NXP will select the most unique, interesting and funny submissions to receive a LPC800 LPCXpresso development kit.

The LPC800 is an ARM Cortex-M0+-based, 32-bit microcontroller operating at CPU frequencies of up to 30 MHz. The LPC800 supports up to 16 KB of flash memory and 4 KB of SRAM. The peripheral complement of the LPC800 includes a CRC engine, one I2C-bus interface, three USARTs, two SPI interfaces, one multi-purpose, state-configurable timer, one comparator, function-configurable I/O ports through a switch matrix, and up to 18 general purpose I/O pins.

Need design ideas? Check out these microcontroller projects with NXP parts.