The MicroStamp11 is a micro-controller module that is built around the Motorola 68HC11 micro-controller. A micro-controller is a special type of micro-computer (a computer on a single integrated circuit or IC) that has been specially designed to interact with the outside world.
To see how a micro-controller differs from a regular micro-computer, let's first look at the architecture of a regular computer. All computer systems are characterized by similar subsystems. The lefthand drawing in figure 1 is a block diagram for a generic computer system. The block diagram shows that the computer consists of a central processing unit (CPU), clock, memory, and peripheral or input/output (I/O) devices. All of these subsystems communicate over a communication subsystem called the CPU bus. The bus is, essentially, a pair of wires that interconnect all of the subsystems. In general, only one pair of devices can talk to each other at a time, so that communication over the bus must be coordinated to prevent message collisions.
The central processing unit (CPU) executes instructions contained in memory in synchrony with a hardware clock. The instructions contained in memory originate in a computer program that has been loaded into the computer's memory. Occasionally, the computer requires inputs from the outside world or must communicate its results to a user. This is done by reading or writing to a peripheral or I/O device. Common input devices are keyboards, sensor such as digital thermometers or potentiometers. Output devices include video displays, liquid crystal displays (LCD), light emitting diodes (LED), and servo motors.
Computational memory is arranged into single indivisible units called bits. A bit is a single digit that has a value of either zero or one. Bits are grouped together. A group of eight bits is called a byte. A group of 16 or 32 bits is called a word (depending upon the actual micro-computer being used).
There are two different types of memory. These two types are called read-only memory (ROM) or random access memory (RAM). In general, ROM is used to store permanent programs and data. RAM is used as a scratchpad to store variables generated by an executing program. The MicroStamp11 has 256 bytes of RAM and 32 kilo-bytes of ROM. In contrast, a personal computer (PC) may have several mega-bytes of RAM and several Giga-bytes of ROM held in the PC's hard drive.
The ROM used in the MicroStamp11 is a special type of memory called electrically erasable programmable read-only memory or EEPROM. This memory can be electrically erased and rewritten through a special procedure. EEPROM is non-volatile, which means that the stored data remains in memory even if power is removed the device. Since we use ROM to store the MicroStamp11's program, this means that the next time you power up the MicroStamp11, the previously stored program will be sitting there waiting to execute. In contrast, the RAM in the MicroStamp11 is volatile which means that the stored data is lost when power is removed from it.
A micro-controller such as the MicroStamp11 is a micro-computer that has been specially designed to speed up its access to its I/O devices. Most micro-computers access their I/O devices over the CPU bus. Since the CPU bus is also used by other computer subsystems, a micro-computer is somewhat limited in its ability to respond quickly to I/O events. In order to speed up the response to external physical events, a micro-controller modifies the CPU bus so that peripheral devices are directly mapped into the computer's RAM. In other words, a micro-controller's peripheral ports bypass the CPU bus by mapping the I/O port registers into the system's RAM address space. As a result of the memory-mapped I/O, information from the outside world reaches the computer's memory as soon as those events are sensed by the peripheral device. The righthand drawing in figure 1 shows the architecture of the micro-controller. Note that this system has a much richer set of I/O devices than the standard micro-computer (shown in the lefthand drawing). Also note that the direct memory access (DMA) subsystem essentially provides a secondary bus that can work concurrently with the CPU bus.