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





 

August 2004, Issue 169

PSoC 101


DESIGN WITH PSoC

Take my advice, if you want to learn to use PSoC devices quickly, buy a PSoC developer kit. The CY3205-DK PSoC developer kit I used comes complete with a PSoC ICE-4000 and CY8C27XXX pod, a PSoC programmer board, an ImageCraft PSoC C compiler, a PSoC Pup demonstration board, and everything else necessary to jumpstart a PSoC application, including a couple of CY8C27443 samples. My PSoC development rig, including the USB dongle for the PSoC ICE-4000, is shown in Photo 3.

(Click here to enlarge)

Photo 3—The large board with the ZIF socket is called the YProgrammer board. My YProgrammer is set up for 28-pin DIP packages. There are lands for all of the PSoC package variants. Directly to the right of the YProgrammer is the PSoC Pup. The PSoC Pup attaches to the ICE Pod, which is directly to the right of the PSoC Pup, with the bed-of-nails connector.

There are a couple ways to get familiar with PSoC design techniques. You can read through all of the ’Net-based PSoC information in addition to the PSoC documentation that comes with the PSoC development kit. Or, you can get your hands dirty by working through the PSoC example applications using the PSoC ICE and the PSoC Pup. I’ve done some of both, but I prefer the hands-on method, so let’s execute plan B.

The PSoC Pup is the module with the rectangular 10-LED module you see in Photo 3. There’s nothing fancy about the PSoC Pup circuitry. Its purpose in life is to attach to the PSoC emulator pod and provide the visual results of your PSoC programming efforts. The first eight segments of the LED array are connected directly to the CY8C27443’s Port_2 I/O pins. The remaining segments are on a couple of pins of the CY8C27443’s Port_0. The “PSoC Pup Example Projects” application note (AN2011) describes the PSoC Pup hardware and includes a schematic of the PSoC Pup. The PSoC Pup also supports a 32-kHz crystal for externally clocking the PSoC emulator pod and three pins for simple I/O operations that are called out in the PSoC programming examples. 

I worked the heck out of my PSoC Pup. I translated the PSoC example assembler code to PSoC C and successfully executed all of the newly converted code against the PSoC Pup. After I got the hang of how to do things with the PSoC, I moved on and worked through the PSoC Tele-Training courses on Cypress’s web site.

The Tele-Training modules are prescheduled hands-on teleconference events that cover PSoC Designer 4.1 and the CY8C27xxx family of devices. All of the Tele-Training modules are available for download, so I opted to fast-track my way into the world of PSoC design. Basically, I walked myself through the PSoC Tele-Training modules in the Florida room. My goal was to learn enough about the PSoC architecture to convert all the Tele-Training module PSoC assembler code into PSoC C code and then choose, configure, place, and interconnect the PSoC user modules without peeking ahead in the Tele-Training modules. After I got my fill of PSoC Pup-py chow, I was placing user modules, interconnecting PSoC I/O pins to user modules, flashing LEDs, and creating DACs and PWMs like nobody’s business. 

There is a wealth of PSoC user module information contained within the PSoC Designer IDE. All of the user module datasheets, which are just a click away, include everything you need to know to deploy the module and a sample code snippet that you can cut and paste into your PSoC project. I could go on and on about the features of the PSoC Designer IDE and how it seamlessly integrates with the PSoC ICE-4000, but the way to really learn about the PSoC Designer IDE and PSoC devices themselves is to click on everything and assess your options.

I took the time to read the well-written PSoC Designer IDE user guide that comes with the PSoC development kit. However, I learned just as much about how to make the PSoC sing by clicking on the muxes, buses, I/O pins, function blocks, and interconnects in the PSoC Designer IDE.

Experimentation on the firmware side was just as revealing. After you place your user modules, all of the C prototype code is generated and offered up in the IDE as well. I found that the user module datasheets and C prototype code played hand in hand. I never had to consult the PSoC C documentation. I decided that it was time to pack the PSoC Pup away and create my own PSoC Dawg demonstration board.