RCA 1802
Encyclopedia
The RCA CDP1802, also known as the COSMAC (Complementary Symmetry Monolithic Array Computer), is an 8-bit
CMOS
microprocessor
(µP) introduced by RCA in early 1976. It is being manufactured by Intersil
Corporation as a high-reliability microprocessor. The 1802 has an architecture different from most other 8-bit microprocessors.
In 1970 and 1971, Joseph Weisbecker developed a new 8-bit architecture computer system,. RCA released Weisbecker's work as the COSMAC 1801R and 1801U in early 1975, using its CMOS process (called COSMOS, an acronym for Complementary Silicon/Metal-oxide Semiconductor). In 1976, a team led by Jerry Herzog integrated the two chips into one, the 1802.
design with no minimum clock frequency, so that it can be run at very low speeds and low power. It has an 8-bit parallel bus with a bidirectional data bus and a multiplexed address bus
(i.e., the high order byte of the 16-bit address and the low order byte of the address take turns in using the 8-bit physical address bus lines, by accessing the bus lines in different clock cycles).
The RCA 1802 has a single bit
, programmable output port, and four input pins which are directly tested by branch instruction
s.
Its I/O
mode is flexible and programmable, and it has a single-phase clock with an on-chip oscillator. Its register set
consists of sixteen 16-bit
registers. The program counter
(PC) can reside in any of these, providing a simple way to implement multiple PCs, pointers, or registers.
semiconductor process technology, which gives it a degree of resistance to radiation and electrostatic discharge
(ESD). Along with its extreme low-power abilities, this makes the chip well-suited in space applications (also, at the time the 1802 was introduced, very few, if any, other radiation-hardened microprocessors were available in the market).
The Galileo spacecraft
used multiple 1802 microprocessors. The 1802 has often been incorrectly claimed to have been used in the earlier Viking
and Voyager
spacecraft, but it was not available at the time those spacecraft were being designed, and primary sources describe the Viking and Voyager computers as having architectures very dissimilar to the 1802, and not being microprocessor-based.
The 1802 has been widely used in Earth-orbiting satellite
s mainly for their primary computer but since the 1990s its use as a low complexity flight control and telecom systems computer has dominated.
A number of early microcomputers were based on the 1802, including the Comx-35
, COSMAC ELF
(1976), COSMAC VIP
, Netronics ELF II
, Quest SuperELF, Finnish Telmac 1800
and Oscom Nano, and Yugoslav
Pecom 32
and 64
, as well as the RCA Studio II
video game console
(one of the first consoles to use bitmap
ped graphics).
The first high-level language available for the 1802 was Forth, provided by Forth, Inc. in 1976.
; using the SEX
instruction, you can select any of the 16-bit registers to be the index register
. Register R0 has the special use of holding the memory address for the built-in DMA
controller.
The processor has 5 special I/O
lines. There's a single Q output that can be set with the SEQ instruction and reset with the REQ instruction. There are four external flag inputs: EF1, EF2, EF3, EF4 and there are 8 dedicated branch instructions to conditionally branch based on the state of those input lines.
The EF and Q lines were typically overused on RCA 1802 based hobbyist computers because of the lines' favorable handling. It was typical for the Q line to drive a status LED
, a cassette interface, an RS-232
interface, and the speaker. This meant that the user could actually hear RS-232 and cassette data being transmitted.
The two addressing modes Indirect register, and Indirect register with auto-increment are then fairly efficient, to perform 8-bit operations on the data in the accumulator. There are no other addressing modes, though. Thus, the direct addressing mode needs to be emulated using the four instructions mentioned earlier to load the address into a spare register; followed by an instruction to select that register as the index register; followed, finally, by the intended operation on the data variable that is pointed to by that address.
controller, having two DMA request lines for DMA input and output operations. R0 is used as the DMA address pointer.
The DMA controller also provides a special "load mode", which allows loading of memory while the CLEAR and WAIT inputs of the processor are active. This allows a program to be loaded without the need for a ROM-based bootstrap loader. This was used by the COSMAC Elf microcomputer and its successors to load a program from toggle switches or a hexadecimal keypad.
takes two to seven clock cycles to execute an instruction, and the Intel 8080
takes 4 to 18 clock cycles.
Video Display Controller
chip, CDP1861 for the NTSC
video format, (CDP1864 variant for PAL
), used the built-in DMA controller to display bitmap
ped graphics.
The 1861 chip could display 64 pixel
s horizontally and 128 pixels vertically, though by reloading the R0 register, the resolution could be reduced to 64×64 or 64×32 to use less memory or to make square pixels. Since the frame buffer was similar in size to the memory size, it was not unusual to display your program/data on the screen allowing you to watch the computer "think" (i.e. process its data).
Programs which ran amok and accidentally overwrote themselves could be spectacular. Although the faster version of 1802 could operate at 5 MHz (at 5 V; it was faster at 10 V), it was usually operated at 3.58 MHz/2 to suit the requirements of the 1861 chip which gave a speed of a little over 100,000 instructions per second.
Minor parts of this article were originally based on material from the Free On-line Dictionary of Computing
, which is licensed under the GFDL
.
8-bit
The first widely adopted 8-bit microprocessor was the Intel 8080, being used in many hobbyist computers of the late 1970s and early 1980s, often running the CP/M operating system. The Zilog Z80 and the Motorola 6800 were also used in similar computers...
CMOS
CMOS
Complementary metal–oxide–semiconductor is a technology for constructing integrated circuits. CMOS technology is used in microprocessors, microcontrollers, static RAM, and other digital logic circuits...
microprocessor
Microprocessor
A microprocessor incorporates the functions of a computer's central processing unit on a single integrated circuit, or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and...
(µP) introduced by RCA in early 1976. It is being manufactured by Intersil
Intersil
Intersil Corporation is an American company that specializes in the design, development and manufacturing of high-performance analog semiconductors for four high-growth markets — Communications, Computing, High End Consumer and Industrial.-Company history:...
Corporation as a high-reliability microprocessor. The 1802 has an architecture different from most other 8-bit microprocessors.
In 1970 and 1971, Joseph Weisbecker developed a new 8-bit architecture computer system,. RCA released Weisbecker's work as the COSMAC 1801R and 1801U in early 1975, using its CMOS process (called COSMOS, an acronym for Complementary Silicon/Metal-oxide Semiconductor). In 1976, a team led by Jerry Herzog integrated the two chips into one, the 1802.
Introduction
The RCA 1802 has a static CMOSCMOS
Complementary metal–oxide–semiconductor is a technology for constructing integrated circuits. CMOS technology is used in microprocessors, microcontrollers, static RAM, and other digital logic circuits...
design with no minimum clock frequency, so that it can be run at very low speeds and low power. It has an 8-bit parallel bus with a bidirectional data bus and a multiplexed address bus
Address bus
An address bus is a computer bus that is used to specify a physical address. When a processor or DMA-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus...
(i.e., the high order byte of the 16-bit address and the low order byte of the address take turns in using the 8-bit physical address bus lines, by accessing the bus lines in different clock cycles).
The RCA 1802 has a single bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...
, programmable output port, and four input pins which are directly tested by branch instruction
Instruction set
An instruction set, or instruction set architecture , is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O...
s.
Its I/O
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...
mode is flexible and programmable, and it has a single-phase clock with an on-chip oscillator. Its register set
Processor register
In computer architecture, a processor register is a small amount of storage available as part of a CPU or other digital processor. Such registers are addressed by mechanisms other than main memory and can be accessed more quickly...
consists of sixteen 16-bit
16-bit
-16-bit architecture:The HP BPC, introduced in 1975, was the world's first 16-bit microprocessor. Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816. The Intel 8088 was program-compatible with the Intel 8086, and was 16-bit in that its registers were 16...
registers. The program counter
Program counter
The program counter , commonly called the instruction pointer in Intel x86 microprocessors, and sometimes called the instruction address register, or just part of the instruction sequencer in some computers, is a processor register that indicates where the computer is in its instruction sequence...
(PC) can reside in any of these, providing a simple way to implement multiple PCs, pointers, or registers.
Applications
In addition to standard CMOS technology, the 1802 was also available fabricated in Silicon on SapphireSilicon on sapphire
Silicon on sapphire is a hetero-epitaxial process for integrated circuit manufacturing that consists of a thin layer of silicon grown on a sapphire wafer. SOS is part of the Silicon on Insulator family of CMOS technologies...
semiconductor process technology, which gives it a degree of resistance to radiation and electrostatic discharge
Electrostatic discharge
Electrostatic discharge is a serious issue in solid state electronics, such as integrated circuits. Integrated circuits are made from semiconductor materials such as silicon and insulating materials such as silicon dioxide...
(ESD). Along with its extreme low-power abilities, this makes the chip well-suited in space applications (also, at the time the 1802 was introduced, very few, if any, other radiation-hardened microprocessors were available in the market).
The Galileo spacecraft
Galileo spacecraft
Galileo was an unmanned spacecraft sent by NASA to study the planet Jupiter and its moons. Named after the astronomer and Renaissance pioneer Galileo Galilei, it was launched on October 18, 1989 by the Space Shuttle Atlantis on the STS-34 mission...
used multiple 1802 microprocessors. The 1802 has often been incorrectly claimed to have been used in the earlier Viking
Viking program
The Viking program consisted of a pair of American space probes sent to Mars, Viking 1 and Viking 2. Each spacecraft was composed of two main parts, an orbiter designed to photograph the surface of Mars from orbit, and a lander designed to study the planet from the surface...
and Voyager
Voyager program
The Voyager program is a U.S program that launched two unmanned space missions, scientific probes Voyager 1 and Voyager 2. They were launched in 1977 to take advantage of a favorable planetary alignment of the late 1970s...
spacecraft, but it was not available at the time those spacecraft were being designed, and primary sources describe the Viking and Voyager computers as having architectures very dissimilar to the 1802, and not being microprocessor-based.
The 1802 has been widely used in Earth-orbiting satellite
Satellite
In the context of spaceflight, a satellite is an object which has been placed into orbit by human endeavour. Such objects are sometimes called artificial satellites to distinguish them from natural satellites such as the Moon....
s mainly for their primary computer but since the 1990s its use as a low complexity flight control and telecom systems computer has dominated.
A number of early microcomputers were based on the 1802, including the Comx-35
Comx-35
The COMX-35 was a home computer that was one of the very few systems to use the RCA 1802 microprocessor, the same microprocessor that is also used in some space probes...
, COSMAC ELF
COSMAC ELF
The COSMAC ELF was an RCA 1802 microprocessor-based computer based on a series of construction articles in Popular Electronics magazine in 1976 and 1977. Through the back pages of electronics magazines, both Netronics and Quest Electronics offered low-priced kits that were based on this design. ...
(1976), COSMAC VIP
COSMAC VIP
The COSMAC VIP was an early microcomputer that was aimed at video games. For a price of US$275, it could be purchased from RCA by mail order. It came in kit form, and had to be assembled. Its dimensions were 22 x 28 cm, and it had a RCA 1802 processor; along with a crystal clock operating at 1.76...
, Netronics ELF II
ELF II
The Netronics ELF II was an early microcomputer trainer kit introduced about 1977 featuring an RCA 1802 microprocessor, 256 bytes of RAM, 0 bytes of ROM, DMA-based bitmap graphics, hex keypad for user interaction and DMA based program loading, a two digit hexadecimal LED display, an LED on the...
, Quest SuperELF, Finnish Telmac 1800
Telmac 1800
The Telmac 1800 was an early microcomputer delivered in kit form. It was introduced in 1977 by Telercas, the Finnish importer of RCA microchips. Most of the 2,000 kits manufactured were bought by electronics enthusiasts in Finland and Sweden....
and Oscom Nano, and Yugoslav
History of computer hardware in the SFRY
The Socialist Federal Republic of Yugoslavia was a socialist country that existed in the second half of the 20th century. Being communist meant that strict technology import rules and regulations shaped the development of computer history in the country, unlike in the Western world. However, since...
Pecom 32
Pecom 32
Pecom 32 was an educational and/or home computer developed by Elektronska Industrija Niš of Serbia in 1985.-Specifications:* CPU: CPD 1802B 5V7 running at 5 MHz* ROM: 16 KB, with optional 16 KB upgrade containing enhanced editor and assembler...
and 64
Pecom 64
Pecom 64 was an educational and/or home computer developed by Elektronska Industrija Niš of Serbia in 1985.- Specifications :* CPU: CDP 1802B 5V7 running at 2.813 MHz* ROM: 16 KB, with optional 16 KB upgrade containing enhanced editor and assembler...
, as well as the RCA Studio II
RCA Studio II
The RCA Studio II is a videogame console made by RCA that debuted in January 1977. The graphics of Studio II games were black and white and resembled those of earlier Pong consoles and their clones. The Studio II also did not have joysticks or similar game controllers but instead used two ten...
video game console
Video game console
A video game console is an interactive entertainment computer or customized computer system that produces a video display signal which can be used with a display device to display a video game...
(one of the first consoles to use bitmap
Bitmap
In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to...
ped graphics).
The first high-level language available for the 1802 was Forth, provided by Forth, Inc. in 1976.
Registers and I/O
An important feature of the 1802 is the register file of sixteen registers of 16 bits each. Using the SEP instruction, you can select any of the 16 registers to be the program counterProgram counter
The program counter , commonly called the instruction pointer in Intel x86 microprocessors, and sometimes called the instruction address register, or just part of the instruction sequencer in some computers, is a processor register that indicates where the computer is in its instruction sequence...
; using the SEX
SEX (computing)
In computing, the SEX assembly language mnemonic has often been used for the "Sign EXtend" machine instruction found in the PDP-11 and many other computer architectures. A computer's or CPU's "sex" can also mean the endianness of the computer architecture used. x86 computers do not have the same...
instruction, you can select any of the 16-bit registers to be the index register
Index register
An index registerCommonly known as a B-line in early British computers. in a computer's CPU is a processor register used for modifying operand addresses during the run of a program, typically for doing vector/array operations...
. Register R0 has the special use of holding the memory address for the built-in DMA
Direct memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....
controller.
The processor has 5 special I/O
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...
lines. There's a single Q output that can be set with the SEQ instruction and reset with the REQ instruction. There are four external flag inputs: EF1, EF2, EF3, EF4 and there are 8 dedicated branch instructions to conditionally branch based on the state of those input lines.
The EF and Q lines were typically overused on RCA 1802 based hobbyist computers because of the lines' favorable handling. It was typical for the Q line to drive a status LED
Light-emitting diode
A light-emitting diode is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting...
, a cassette interface, an RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...
interface, and the speaker. This meant that the user could actually hear RS-232 and cassette data being transmitted.
Subroutine calls
The processor does not have standard subroutine CALL immediate and RET instructions, though they can be emulated. The register file makes possible some interesting subroutine call and return mechanisms, though they are better suited to small programs than general purpose coding. A few commonly used subroutines can be called quickly by keeping their address in one of the 16 registers; the SEP instruction is used to call a subroutine pointed to by one of the 16 bit registers and another SEP to return to the caller (SEP stands for Set Program Counter, and selects which one of the 16 registers is to be used as the program counter from that point onwards). Before a subroutine returns, it jumps to the location immediately preceding its entry point so that after the SEP instruction returns control to the caller, the register will be pointing to the right value for next time. An interesting variation of this scheme is to have two or more subroutines in a ring so that they are called in round robin order. On early hobbyist computers, tricks like this were commonly used in the horizontal refresh interrupt to reprogram the scan line address to repeat each scan line 4 times for the video controller. Computed subroutine calls were no problem because all CALL instructions were indexed (some processors only had CALL immediate).Addressing modes
Because of the 16-bit address bus, and the 8-bit data bus, the sixteen general purpose registers are 16 bits wide, but the accumulator (the so-called data register, or D-register) is only 8 bits wide. The accumulator, therefore, tends to be a bottleneck. Transferring the contents of one register to another involves four instructions (one Get and one Put on the HI byte of the register, and a similar pair for the LO byte: GHI R1; PHI R2; GLO R1; PLO R2). Similarly, loading a new constant into a register (such as a new address for a subroutine jump, or the address of a data variable) also involves four instructions (two load immediate, LDI, instructions, one for each half of the constant, each one followed by a Put instruction to the register, PHI and PLO).The two addressing modes Indirect register, and Indirect register with auto-increment are then fairly efficient, to perform 8-bit operations on the data in the accumulator. There are no other addressing modes, though. Thus, the direct addressing mode needs to be emulated using the four instructions mentioned earlier to load the address into a spare register; followed by an instruction to select that register as the index register; followed, finally, by the intended operation on the data variable that is pointed to by that address.
DMA and Load Mode
The CDP1802 has a built-in DMADirect memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....
controller, having two DMA request lines for DMA input and output operations. R0 is used as the DMA address pointer.
The DMA controller also provides a special "load mode", which allows loading of memory while the CLEAR and WAIT inputs of the processor are active. This allows a program to be loaded without the need for a ROM-based bootstrap loader. This was used by the COSMAC Elf microcomputer and its successors to load a program from toggle switches or a hexadecimal keypad.
Instruction timing
Clock cycle efficiency is poor in comparison to most 8-bit microprocessors. Eight clock cycles makes up one machine cycle. Most instructions take two machine cycles (16 clock cycles) to execute; the remaining instructions take three machine cycles (24 clock cycles). By comparison, the MOS Technology 6502MOS Technology 6502
The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured microprocessor on the market by a considerable margin, costing less than one-sixth the price of...
takes two to seven clock cycles to execute an instruction, and the Intel 8080
Intel 8080
The Intel 8080 was the second 8-bit microprocessor designed and manufactured by Intel and was released in April 1974. It was an extended and enhanced variant of the earlier 8008 design, although without binary compatibility...
takes 4 to 18 clock cycles.
Video
In early microcomputers the companion graphics2D computer graphics
2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them...
Video Display Controller
Video Display Controller
A Video Display Controller or VDC is an integrated circuit which is the main component in a video signal generator, a device responsible for the production of a TV video signal in a computing or game system...
chip, CDP1861 for the NTSC
NTSC
NTSC, named for the National Television System Committee, is the analog television system that is used in most of North America, most of South America , Burma, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories .Most countries using the NTSC standard, as...
video format, (CDP1864 variant for PAL
PAL
PAL, short for Phase Alternating Line, is an analogue television colour encoding system used in broadcast television systems in many countries. Other common analogue television systems are NTSC and SECAM. This page primarily discusses the PAL colour encoding system...
), used the built-in DMA controller to display bitmap
Bitmap
In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to...
ped graphics.
The 1861 chip could display 64 pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....
s horizontally and 128 pixels vertically, though by reloading the R0 register, the resolution could be reduced to 64×64 or 64×32 to use less memory or to make square pixels. Since the frame buffer was similar in size to the memory size, it was not unusual to display your program/data on the screen allowing you to watch the computer "think" (i.e. process its data).
Programs which ran amok and accidentally overwrote themselves could be spectacular. Although the faster version of 1802 could operate at 5 MHz (at 5 V; it was faster at 10 V), it was usually operated at 3.58 MHz/2 to suit the requirements of the 1861 chip which gave a speed of a little over 100,000 instructions per second.
Code samples
This code snippet tests ALU OPS, it is a diagnostic routine.
.. TEST ALU OPS
0000 90 GHI 0 .. SET UP R6
0001 B6 PHI 6
0002 F829 LDI DOIT .. FOR INPUT OF OPCODE
0004 A6 PLO 6
0005 E0 SEX 0 .. (X=0 ALREADY)
0006 6400 OUT 4,00 .. ANNOUNCE US READY
0008 E6 SEX 6 .. NOW X=6
0009 3F09 BN4 * .. WAIT FOR IT
000B 6C INP 4 .. OK, GET IT
000C 64 OUT 4 .. AND ECHO TO DISPLAY
000D 370D B4 * .. WAIT FOR RELEASE
000F F860 LDI #60 .. NOW GET READY FOR
0011 A6 PLO 6 .. FIRST OPERAND
0012 E0 SEX 0 .. SAY SO
0013 6401 OUT 4,01
0015 3F15 BN4 *
0017 E6 SEX 6 .. TAKE IT IN AND ECHO
0018 6C INP 4 .. (TO 0060)
0019 64 OUT 4 .. (ALSO INCREMENT R6)
001A 371A B4 *
001C E0 SEX 0 .. DITTO SECOND OPERAND
001D 6402 OUT 4,02
001F E6 SEX 6
0020 3F20 LOOP: BN4 * .. WAIT FOR IT
0022 6C INP 4 .. GET IT (NOTE: X=6)
0023 64 OUT 4 .. ECHO IT
0024 3724 B4 * .. WAIT FOR RELEASE
0026 26 DEC 6 .. BACK UP R6 TO 0060
0027 26 DEC 6
0028 46 LDA 6 .. GET 1ST OPERAND TO D
0029 C4 DOIT: NOP .. DO OPERATION
002A C4 NOP .. (SPARE)
002B 26 DEC 6 .. BACK TO 0060
002C 56 STR 6 .. OUTPUT RESULT
002D 64 OUT 4 .. (X=6 STILL)
002E 7A REQ .. TURN OFF Q
002F CA0020 LBNZ LOOP .. THEN IF ZERO,
0032 7B SEQ .. TURN IT ON AGAIN
0033 3020 BR LOOP .. REPEAT IN ANY CASE
External links
- Original CDP1802 datasheet (PDFPortable Document FormatPortable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....
) - Current CDP1802A datasheet (PDFPortable Document FormatPortable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....
) - COSMAC ELF website
- A Short Course in Programming (1980 text on RCA 1802 assembler)
- High resolution die shot
Minor parts of this article were originally based on material from the Free On-line Dictionary of Computing
Free On-line Dictionary of Computing
The Free On-line Dictionary of Computing is an online, searchable, encyclopedic dictionary of computing subjects. It was founded in 1985 by Denis Howe and is hosted by Imperial College London...
, which is licensed under the GFDL
GNU Free Documentation License
The GNU Free Documentation License is a copyleft license for free documentation, designed by the Free Software Foundation for the GNU Project. It is similar to the GNU General Public License, giving readers the rights to copy, redistribute, and modify a work and requires all copies and...
.