View Full Version : COSMAC Elf

February 8th, 2010, 10:35 AM
The COSMAC Elf is a microcomputer project designed by Joseph Weisbecker published in Popular Electronics magazine in August and September of 1976. These articles described the base system and its construction in detail. Later articles in March and July of 1977 provided hardware upgrades and additional software.
thumb|right|alt=COSMAC Elf with 256 Bytes of RAM and 1861 Pixie Video
The project was designed to be constructed using point to point wiring on perforated circuit board. At the time of its publication, the base system could be constructed for less than US$100.
Base system specifications:
1802 CPU at 1 to 2MHz
256 Bytes RAM (2 x 2101)
Dual Digit Hexadecimal Display
'Q' Output LED
8 Bit Toggle Switch Data/Program Input
1 Input Switch and 3 System Control Switches (RUN/LOAD/Memory Protect)

The 1977 articles added the following to the base system:
1.76MHz Clock
ETOPS and EHOPS Operating Systems
Hexadecimal Keyboard
1KB Memory Expansion up to 64KB
Composite Video (Pixie Graphics) up to 64x32 pixels with memory expansion.

Several commercial computers and computer kits were based on the original COSMAC Elf, including the Netronics Elf II, Quest Super Elf, and STG COSMAC Elf 2000.
Unique Features
The COSMAC Elf design takes advantage of a special feature of the RCA 1802 microprocessor to operate without ROMs or any other nonvolatile memory. The 1802's 'Load Mode' allows the user to enter programs directly into system memory without the use of a monitor or any other program.
The Q output of the 1802 is a single bit output capable of directly driving many output devices, similar to the later 8085's SOD output. In practice, this line was used for many general purposes, including a software-driven serial output, providing audio output, output to cassette tape for data storage, and pulse-width modulation.
The 1861 Pixie Graphic IC uses the DMA mode of the 1802 to access system memory for its bitmap information. The 1802's R0 register provides addresses to memory for the 1861, auto-incrementing with each call for video data.
Power Supply
The Elf requires an external 5V DC power supply of modest current capacity (100mA or more.) It can be operated off of 4 alkaline batteries with a series diode to reduce the voltage to within 10% of 5.0V. The only components that require a 5V supply are the HP (now Avago) hex displays with integrated display decoders and latches. The logic in these is TTL. The CMOS logic used in the rest of the system tolerates voltages from about 3V to 10V. A common variant of the Elf replaces the HP hex displays with an equivalent circuit more tolerant of a wider range of supply voltages.
Load Mode
The basic Elf has no monitor or operating system. This feature makes it a good first computer assembly project for a relative beginner with no device programmer. In essence, the monitor's functions are implemented in hardware.
When placed in "load mode" (RUN switch off, then LOAD switch on) the CPU's R0 register is used as a pointer to memory for DMA from the front panel to memory. When LOAD is switched on, R0 is cleared, and so points at the first location in memory.
When entering new data in memory, the MP (Memory Protect) switch is off. The desired value is placed on the toggle switches, then the INPUT key is pressed. This causes the Elf to place the toggled value on the data bus then write it to the RAM location addressed by R0 and the hex displays, then increment R0 to point to the next memory location.
Memory is examined by switching the MP switch on, then using the INPUT key to advance through memory byte by byte. The contents of each byte of RAM will be transferred to the hex displays. Memory editing can be accomplished by advancing through memory using memory examination, then turning off the MP switch to begin editing.
Switching the LOAD switch off leaves load mode and returns the Elf to an idle state.
Running Programs
From an idle state (LOAD, RUN off), a program in memory can be run by switching the RUN switch on. The program can be halted by switching RUN off at any time. The MP switch may be in either position, but should be off for programs that require writing to RAM.
For further information, see 'A Short Course in Programming' by Tom Pittman, linked below.
Popular Additions
The first addition to many Elfs is a hex keyboard to speed up program entry. There are several designs, but an adaptation of the Netronics Elf II's keyboard interface is most popular as it requires no software. Circuit diagrams are available through the external links below.
The next most popular addition is a cassette tape interface via the Q line (output) and one of the EF lines (input.) Presently, DMA interfaces that allow a modern computer to directly read and write to the Elf memory are superseding the use of cassette tapes for storage.
Many Elf users do not expand their Elf beyond 256 bytes of memory, as using more memory changes the addressing used in programs (making programs written for a 256B memory model non-functional), and much can be performed in only 256B. However, complete operating systems with interfaces to modern I/O devices require more memory, so many new Elfs are built with 8KB or more RAM, and provisions for ROM memory as well. 32KB of SRAM and 32KB of EPROM is a common configuration.
1861 PIXIE Rarity
As this IC is presently very rare, many builders of the Elf either omit the original video graphics circuitry or build a circuit that uses a GAL to emulate the PIXIE. See the Spare Time Gizmos site, below, for information on the 'STG 1861' design.
An assembled Elf computer has little monetary value aside from the value of the 1861 and marginal value of the 1802 CPU and HP hexadecimal displays. The fewer modifications, or the less invasive those modifications, the greater the value of the system when sold at large. Systems exchanged between enthusiasts usually involve only costs of shipping and some minimal payment or other consideration.
Unassembled kits for the Netronics Elf II can sell for four figures or more (in US$.) These kits have a high recognition value among many collectors, and complete, untouched kits in the box are considered very rare.
A self-built Elf is an item of high personal value for many collectors who maintain hands-on collections. The experience of assembling a system from chips and proto board, with out even an etched PCB is compelling. Further, there are few computers that provide a user experience so "close to the machine" as an Elf.
All components of the base Elf are readily available. The 1861 PIXIE video chip is no longer in production, and is quite rare (see above.)
The original hexadecimal displays are still produced by Avago, spun off from HP and Agilent. However, the retail price of these displays is higher than the cost of all other components combined. Most new Elf builders now use the TIL311 display instead. The TIL311s form factor and pinout are different from the HP display, otherwise the change is trivial.
The original 256x4 SRAMs are readily available, but many builders choose to use larger memories. 8Kx8 or 32Kx8 memories are common choices, with provision for non-volatile memories, as well.
A number of PCB designs are currently available to simplify construction for those who choose not to use the original point to point wiring method. These include the STG Elf 2000, the Micro-Elf, and Lee Hart's Membership Card. Availability varies, as these are often produced in small lots on demand.
The base Elf from Popular Electronics can be assembled by anyone with any electronic assembly experience in 3-8 hours' work time, assuming all tools and components are at hand. The articles detail all steps of assembly, including a complete wiring list, testing, and trouble-shooting procedures.
A PCB-based Elf can be assembled in 1-3 hours. Some boards designs have closely spaced components, surface mount components, or other features that may make them challenging for novice assemblers.
There is an active community of enthusiasts who enjoy assisting those constructing new Elfs. They can help with obtaining components, choosing a design, troubleshooting and repair, etc. See the Yahoo! group below as well as the links at cosmacelf.com (http://www.cosmacelf.com).
External links
A Short Course in Programming by Tom Pittman (http://www.cosmacelf.com/shortcourse.htm)
Spare Time Gizmos, COSMAC Elf 2000 (http://www.sparetimegizmos.com/Hardware/Elf2K.htm)
COSMAC Elf, A Piece of Microcomputing History (http://homepage.mac.com/ruske/cosmacelf/)
COSMAC Elf and the TinyElf Emulator (http://cosmacelf.com/)
COSMAC Elf and 1802 Microcomputing at Yahoo! Groups (http://groups.yahoo.com/cosmacelf/)

Construction Articles
Weisbecker, Joseph (August, 1976) Build the COSMAC ELF (Part 1) Popular Electronics vol. 10 issue 2, pages 33?38
Weisbecker, Joseph (September, 1976) Build the COSMAC ELF (Part 2) Popular Electronics vol. 10 issue 3, pages 37?40
Weisbecker, Joseph (March, 1977) Build the COSMAC ELF (Part 3) Popular Electronics vol. 11 issue 3, pages 63?67
Weisbecker, Joseph (July, 1977) Build the COSMAC ELF (Part 4 PIXIE Graphics Display) Popular Electronics vol. 12 issue 1, pages 41?46

Related Articles
Deveaux, Edward C. (July, 1977) PIXIE Animation Program, Popular Electronics vol. 12 issue 1, pages 47-48
Bronstein, Martin (March, 1980) A Hex Keyboard with Applications for the 1802 Elf, Dr. Dobb's Journal, Volume 5, No. 43, pages 40-42