Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Google
Search WWW Search seattlerobotics.org

Adding LOTS of memory to a 68hc11

Karl Lunt

karllunt@seanet.com

If you need a LOT of memory for your 68hc11 (or other microcontroller) project, check out the Waferscale PSD813Fx chips. I just finished adding the 813F1 device to my BOTBoard+, and now my BB+ has:

And this modification uses NO glue logic devices; just the 68hc11 and the 813F1. What's more, you can program the finished board using a JTAG connector. Just six wires hooked to an adapter that plugs into your PC's parallel port, and you're set; no pcbug11, no UV eraser, just load and go.

As if all this weren't enough, the Waferscale chips all have a large array of programmable logic available for holding custom designs. For example, you could program this logic so certain I/O pins on the 813F1 device serve as keypad lines. When the user presses a key on the keypad, the 813Fx chip generates an interrupt to the 68hc11, then makes the keypad matrix available in an I/O register.

Getting started

The key to this whole project is the Waferscale FlashLink development kit, the DK800. WSI sells this little gem for $99, and it includes the FlashLink programming pod, the PSDSoft programming software, lots of docs, and two free sample devices. You can get details on the kit by hitting the WSI website at http://www.wsipsd.com . Be sure to check out the different chips in the 813Fx family, as each contains a different mix of peripherals and memory.

Once you have your kit, follow the installation instructions to install the PSDSoft software. This completes the baseline install, and you should end up with a copy of version 5.0 on your machine. You then need to install the upgrade that ships with your kit; mine included an upgrade to version 5.16.

Then take an existing 68hc11 single-chip project, such as a BB+, and wire in a 52-pin PLCC socket to hold your 813Fx chip; see the accompanying schematic. Notice that you're only adding about 20 wires between the two devices, plus a few wires to a programming connector. Working carefully, you should be able to make this mod in a couple of evenings.

The JTAG connector shown here uses four signal lines plus power and ground. This four-wire interface isn't quite as fast as the upgraded, six-wire interface, but it still only takes a minute or so to download a small program into the flash and to reconfigure the 813Fx device. I used a six-pin KK-style male header on my BB+ prototyping area. I had to cut the ends off of the relevant six wires on the JTAG cable coming out of the FlashLink pod, then add on my own six-pin female connector. There apparently isn't any standard JTAG connector, so I just winged it.

Next, go to the WSI website and snoop around in their applications area. Besides anything else interesting, be sure to get a copy of applications note #061. This app note takes you step-by-step through the design of a typical 68hc11 project, from initial wiring through the programming phase to the JTAG download. Believe me, this is required reading for first-timers, and will help you make sense of all the features in PSDSoft.
Speaking of which, the PSDSoft utility is massively cool. WSI has reduced all of the complexities in programmable logic design to a simple set of tools, all available from a single flowchart-type window. Click on a major function, such as device configuration, and up pops a window with all of the options you might need in your configuration. Check a couple of boxes, fill in a blank or two, and PSDSoft prepares the underlying source files for you. The most difficult part of the whole process is pulling out all the extras that WSI built into their "typical" 68hc11 program template so you are left with only what you need for your design.

Once your design is complete and it compiles without errors, you are ready to create an object file that contains both your 813Fx logic and any 68hc11 firmware you want to program into the 813Fx device. This merging occurs in the code mapping phase. Here you can assign one or more 68hc11 object files, regardless of how they were created, to the different areas of memory in the 813Fx device. For example, you might have a video processing program written in C and a motor controller program written in SBasic. You use the code mapper to assign these files to the appropriate areas of flash or EEPROM. When done, the resulting.obj file is ready for downloading with JTAG.

You can use JTAG to do in-system programming (ISP) of your 813Fx device, even if that device is totally blank. Just hook up your JTAG connector, apply power, and start the JTAG download in PSDSoft. This operation can take a while, and PSDSoft thrashes the disc quite a bit, but after the verification step is done, you're ready to go. Remove the JTAG connector, strap the board for expanded mode, and press reset.

Conclusion

This is the best $99 I've spent on this hobby to date. I've probably added more memory to the 68hc11 than I will ever need, and the low-end chips (flash, I/O, and logic only) run about $3 to $4 each, so this is a dirt-cheap mod. Note that the 813Fx chips work equally well with just about any microcontroller that has an external address and data bus. You can find app notes for hooking up 8051 designs, and the configuration utility covers the newer, burst-mode 8051 derivatives. What's more, the interface logic in the 813Fx chips is general enough that even if your MCU isn't on the list, you can figure out how to wire it in so it works.

And if you've ever had an interest in experimenting with programmable logic arrays, this setup lets you play with PLAs already grafted onto your favorite MCU. Test programs for your new design are only a short program compile and download away.

Grab the DK800 kit from WSI and give it a try; I think you'll like it. Now, where did I put that HUGE video program design...