BY THOMAS KIBALO
IMPLEMENTING A FILE I/O
SYSTEM FOR THE 16-BIT MICRO
In a previous Nuts & Volts article, we showed a Graphics Module add-on for
the 16-bit Micro Experimenter (Experimenter for short). In this article, we will
discuss adding more capability to our Experimenter by integrating a PC
compatible file I/O. The SD card technology and Microchip’s freely available
file I/O library, along with the Parallax SD carrier board makes this all
possible. The software and hardware footprint is fairly minimal making the
file I/O system an easy add-on module for your Experimenter applications.
Gone are the days when you have to labor with custom solutions to move
data between your PC and microcontroller. Also gone are the days when you
are constrained in the amount of data you can transfer. With this new
capability, you essentially have a low cost, small form factor multi-GB
removable “hard drive” that can work seamlessly with either a PC or the
Experimenter. It will allow both devices to independently create, write to, and
read from, delete, and rename data files. This article will discuss the
Microchip library briefly, how it was modified for the Experimenter, and the
specific hardware and software needed for the Experimenter. It will also cover
several demo applications. In this, as well as all other previous articles on the
Experimenter, software is written in ‘C’ so some knowledge of its basic
syntax will be required to understand the file I/O library and its API.
Figure 1 shows the Experimenter connected to a 2 GB SD card through the Experimenter I/O expansion port running
one of the demo applications (DEMOREADWRITE). It uses an SD
carrier board offered by Parallax.com for easy insertion and
removal of the SD card within the Experimenter’s solderless
The SD Card
Let’s review the SD card. It is difficult these days not to
notice Secure Digital (SD) cards (see Figure 2). They appear just
about everywhere. An SD card is a non-volatile Flash memory
card format developed for use in portable devices. It is widely
used in digital cameras, digital camcorders, and portable laptop
computers to name a few. Its size and the format factor make it
ideal for adaptability of use with microcontrollers like the
The format has proven to be very popular.
Standard SD card capacities are up to and exceed
■ FIGURE 1.
with SD card.