circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

August 2004, Issue 169

PSoC 101


Analog design doesn’t have to be complicated, especially if you use a PSoC. In this column, Fred describes his PSoC development system, which is geared toward the CY8C27443.


by Fred Eady

It seems like everything that used to be built as a pure analog function is becoming digitized. But there are still some things that just don’t work as well in the digital domain as they do in the analog domain.

The music industry is a good example of a place where analog things have gone digital for better or worse. All sorts of digital gadgets are used in recording studios. I have a guitar gadget that actually slows down the guitar licks on a CD-ROM track so you can pick them apart and learn them note-by-note. Yeah, right. You see my picture. Do I look like the next Eddie Van Halen? There are even a couple of high-end digital guitars out there. I recently read a story about Aerosmith’s mixed feelings about putting down recording sessions on a hard drive instead of magnetic tape. The upside of the musical hard drive is that the band can now mix and record whenever and wherever they want. Lead singer Steve Tyler has talked about how great it is to be able to pack up the golden hard drive and take it over to another band member’s home studio for some off-the-wall recording and mixing sessions.

When asked about the use of digital techniques in the music recording industry, George Harrison said that he actually liked to hear a bit of natural tape hiss in his recordings. George is an analog kind of guy. Some musicians (including Paul McCartney) say that George invented controlled feedback on record with the release of the Beatles’s song, “I Feel Fine.” I won’t argue that point here.

I’ve gotten rid of all of my transistorized guitar amps and digital effects stomp boxes in favor of all-tube amplifiers and analog floor pedals. I like the digital technology, but the all-tube pure analog amplifiers just sound better. Consider this: Aerosmith may digitally record the songs you buy on CD-ROM, but they use an abundance of analog equipment to deliver that music to you live from stage.

Now that you’ve pulled out those old Beatles recordings and listened to see if you can hear the tape hiss, let’s talk about how you handle analog signals with a microcontroller. It’s pretty much a given that you cannot do a good job of capturing a series of analog events using a microcontroller’s digital input pins. So, you use either the microcontroller’s internal A/D converter or hang an external A/D converter on the microcontroller’s I/O pins. That’s usually good enough for simple applications processing rudimentary analog voltages.

What if you need to amplify the incoming analog signal? No problem. Add an op-amp to the circuit. Need to filter that incoming signal? No problem. Just add another op-amp.

OK. You’ve got the analog signal digitized and into the bowels of your microcontroller. Most of the time that’s good enough, and you can act on the incoming analog signal without having to push it back out of the microcontroller. But what if you had to do some stuff with the digitized analog signal and send the processed analog signal back out to the real world? No problem. You simply add an D/A converter to your circuit. Yeah, right.

If you’ve ever put anything electronic together from scratch, you know that I lied big time in the previous paragraph. There’s no such thing as “no problem” when you start adding analog things to a design. In addition to adding op-amps, capacitors, resistors, and who knows what else to condition the incoming and outgoing analog signals, you now have the added burden of tweaking and debugging all of that analog stuff you added to the circuit as well as the code in the microcontroller.

To get the best sound possible, you can use digital modeling music amplifiers that process the incoming analog signals digitally and reproduce those digitally altered tones to your ears with old-fashioned tube-based analog technology. Fortunately, you can manipulate analog and digital signals in a similar manner using a Cypress programmable System-on-Chip (PSoC), which is mixed-signal microcontroller-based device. “No problem” takes on its real meaning when you employ a programmable PSoC in your mixed-signal design. You can build and debug analog and digital subsystems that are contained within a single PSoC device.