| General information | |
|---|---|
| Launched | 1977 |
| Common manufacturer | |
| Performance | |
| Max. CPU clock rate | to 225 KHz |
| Data width | 4-bit (RAM), 8-bit (ROM) |
| Address width | 6-bit (RAM), 13-bit (ROM) |
| Architecture and classification | |
| Application | microcontroller |
| Instructions | 51 [1] |
| Physical specifications | |
| Package |
|
The S2000 was a family of specialized 4-bit microcontrollers introduced by American Microsystems Inc (AMI) in the 1970s. AMI referred to it as a "display controller", aimed at industrial control applications, HVAC control systems, appliances and simple electronic games. The system had direct support for reading keyboards and outputting to seven-segment displays.
The original model combined the CPU, 1024 bytes of ROM and 64 nibbles of RAM in a 40-pin dual in-line package (DIP). It also included a seven-segment display driver and optionally the high-voltage electronics needed to directly drive an LED or vacuum fluorescent display (in the S2000A model) as well as keyboard input. Later models increased the internal memory and added new instructions.
The S2000 is historically notable as the first complete system available at a price point under $10; in lots of 50,000 or more, the S2000 was $9.98. [2]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The S2000 was typical of a class of highly specialized microcontrollers that were intended to be used for industrial controllers and similar tasks. These were sometimes known as "display controllers" at the time, as they included logic specifically for use with a seven-segment display. Another example of the same class of processor is the Essex SX 200. [3] EDN referred to these as "calculator like" due to their similarity to contemporary electronic calculator chipsets. [4]
The S2000 includes an input port intended to be used with a capacitive sensing keypad with up to 16 keys. Output is primarily though a dedicated seven-segment display port, which could optionally include the additional switching hardware needed to drive a LED or vacuum fluorescent display. [5] One additional feature is a 50/60 Hz timer that could be used to drive external systems or internally. [6]
The customer program was masked onto a on-chip 1,024 byte ROM. The CPU has a 4-bit arithmetic logic unit (ALU) with an accumulator and an index register pointing into the RAM, executes the 8-bit instructions from ROM. The ALU could operate on binary-coded decimal data, which made it much easier to drive simple displays. [5]
There are 51 instructions including 6 memory instructions, 14 test-and-branch, 12 math and logic, 8 input/output and 10 register operations. [7] All instructions are one byte; there are no two-byte instructions. A three-level call stack is implemented on-chip. The system's 64 nibbles of SRAM are mostly used as registers. In contrast to similar devices, the S2000 is packaged in a 40-pin DIP, which allowed it to have 29 input/output pins including a 13-bit address bus and 8-bit data bus, allowing the memory to be expanded externally. [5]
Fabricated using a (then) modern NMOS process, it was both faster and cheaper than competing systems based on the older PMOS process. The S2000 sold for $3.50 in lots of 100, and was cheaper in larger quantities. It runs at the relatively fast speed of 900 KHz clock input with most instructions completing in 4.5 μsec and only the two jump-to-subroutine instructions requiring 8 μsec, making it perform similar to contemporary "full" microprocessors like the MOS 6502. Using NMOS also meant it could run off a single 5 V supply, but the S2000 was designed specifically to be fed from a common 9-volt battery, drawing 28 mA, typical. [5]
The S2000 is designed to have very compact code. All instructions are one byte long. The later S2200/S2400 series added some two-byte instructions but the most frequently used instructions are one byte.
As all instructions are one byte, unconditional jump (JMP) and call (JMS) are limited to 6 bits. JMP can access any of 64 locations in the current page. JMS can access any of 64 locations in the subroutine page (page 15). If either of these instructions must access another page, a PP prefix is added, expanding the subsequent JMP or JMS to 10 bits or the 1024 locations of the current bank. If either of these instructions must access another bank outside the current bank, a second PP prefix is added, expanding the subsequent JMP or JMS to 13 bits or 8192 locations. The stack only stores the lower 10 bits of the program counter so returns (RT/RTS) to a different bank are not possible.
Some features of the S2000 that can be used to make object code more compact are:
The following assembler source code is for three subroutines located at page 15 named copy8, copy6, and copy16. Copy8 copies eight digits from page 2, location 8 (0x28) to page 3, location 8 (0x38). Copy6 copies six digits from page 2, location 10 (0x2A) to page 3, location 10 (0x3A). Copy16 copies 16 digits from page 3, location 0 (0x30) to page 2, location 0 (0x20). These demonstrate some unusual features of the instruction set:
Note that the entire instruction set shows striking similarity to the National Semiconductor COP400.
3C0 78 3C1 7A 3C2 13 3C3 4A 3C4 43 3C5 3E 3C6 32 3C7 C5 3C8 02 | ; Copy a 8, 6, or 16 memory locationscopy8:LAI8;Get lower 4 bits of 0x28 (mem address)copy6:LAI10;or Get lower 4 bits of 0x2AXAE;and place it in ELBE2;Copy E to BL and 2 to BU, skip LBZcopy16:LBZ3;LBZ sets BU:BL to 0x30; Note that loop1: is a universal routine that can copy from; 1 to 16 digits from page 0 to 1, 1 to 0, 2 to 3, and 3 to 2.loop1:LAM1;Load src in A. XOR BU with 1 to get destXCI1;Save A in dest. Inc BL. XOR BU with 1 to get srcJMPloop1;loop until BL goes past last digit locationRT;return |
The S2000 family was improved over time and can be split into two series, each of which also came in an "A model" including the high-voltage circuits needed to directly drive a display. The original S2000 was supplanted by the S2150, which differed only in increasing the internal ROM to 1.5 Kbytes, and the RAM to 80 nibbles. [6]
The second series includes two models, the S2200 with 2 Kbytes ROM and 128 nibbles RAM, and the S2400, which increased the ROM to 4 Kbytes. These two also included direct hardware support for interrupts, nine new instructions, five subroutine levels, and an analog-to-digital converter. [6]