This article needs additional citations for verification .(December 2009) |
General information | |
---|---|
Launched | 1988 |
Common manufacturer | |
Performance | |
Max. CPU clock rate | to 15 MHz |
Data width | 8 (RAM), 8 (ROM) |
Address width | 8 (RAM), 15 (ROM) |
Architecture and classification | |
Application | Embedded |
Instruction set | COP8 |
Number of instructions | 69 |
Physical specifications | |
Package | |
History | |
Predecessor | COP400 |
Successor | none |
The National Semiconductor COP8 is an 8-bit CISC core microcontroller. COP8 is an enhancement to the earlier COP400 4-bit microcontroller family. COP8 main features are:
It has a machine cycle of up to 2M cycles per second, but most versions seem to be overclockable to up to 2.8M cycles per second (28 MHz clock).[ citation needed ]
|
The COP8 uses separate instruction and data spaces (Harvard architecture). [1] : 2-1 [2] : 2-4 Instruction address space is 15-bit (32 KiB maximum), while data addresses are 8-bit (256 bytes maximum, extended via bank-switching).
To allow software bugs to be caught, all invalid instruction addresses read as zero, which is a trap instruction. Invalid RAM above the stack reads as all-ones, which is an invalid address.
The CPU has an 8-bit accumulator and 15-bit program counter. 16 additional 8-bit registers (R0–R15) and an 8-bit program status word are memory mapped. There are special instructions to access them, but general RAM access instructions may also be used.
The memory map is divided into half RAM and half control registers as follows:
Addresses | Use |
---|---|
0x00–6F | General purpose RAM, used for stack |
0x70–7F | Unused, reads as all-ones (0xFF) to trap stack underflows |
0x80–8F | Unused, reads undefined |
0x90–BF | Additional peripheral control registers |
0xC0–CF | Peripheral control registers. |
0xD0–DF | General purpose I/O ports L, G, I, C and D |
0xE0–E8 | Reserved |
0xE9 | Microwire shift register |
0xEA–ED | Timer 1 registers |
0xEE | CNTRL register, control bits for Microwire & Timer 1 |
0xEF | PSW, CPU program status word |
0xF0–FB | R0–R11, general purpose registers (additional RAM) |
0xFC | R12, a.k.a. X, secondary indirect pointer register |
0xFD | R13, a.k.a. SP, stack pointer register |
0xFE | R14, a.k.a. B, primary indirect pointer register |
0xFF | R15, a.k.a. S, data segment extension register |
If RAM is not banked, then R15 (S) is just another general-purpose register. If RAM is banked, then the low half of the data address space (addresses 0x00–7F) is directed to a RAM bank selected by S. The special purpose registers in the high half of the data address space are always visible. The data registers at 0xFx can be used to copy data between banks.
RAM banks other than bank 0 have all 128 bytes available. The stack (addressed via the stack pointer) is always on bank 0, no matter how the S register is set.
In addition to 3-byte JMPL
and JSRL
instructions which can address the entire address space, 2-byte versions of these instructions, JMP
and JSR
, can jump within a 4K page. The instruction specifies the low 12 bits, and the high 3 bits of the PC are preserved. (These are intended primarily for models with up to 4K of ROM.) For short-distance branches, there are 63 1-byte instructions, JP
, which perform PC-relative branches from PC−32 to PC+31. This is a 15-bit addition, and no page boundary requirements apply.
There are also jump indirect and load accumulator indirect instructions which use the accumulator contents as the low 8 bits of an address; the high 7 bits of the current PC are preserved.
Conditional branches per se do not exist, nor does the processor provide the traditional ZCVN status flags, although the program status word contains carry and half-carry flags for multi-byte arithmetic. Rather, there are a number of compare-and-skip instructions. For example, IFEQ
compares its two operands, and skips the following instruction if they are unequal. Any instruction may be skipped; it is not limited to branches.
A feature unique to the COP8 architecture is the IFBNE
instruction. This compares the low 4 bits of the B (memory pointer) register with a 4-bit immediate constant, and can be used to loop until B has reaches the end of a small (up to 16 byte) buffer.
An interesting extension of this mechanism is the RETSK
return-and-skip instruction, which lets any subroutine call conditionally skip the following instruction. This provides a very compact way to return a boolean value from a subroutine.
COP8 operands are listed in destination, source order. Most instructions have the accumulator A as one of the operands. The other operand is generally chosen from an 8-bit immediate value, an 8-bit RAM address, or [B]
, the RAM address selected by the B register. Some instructions also support RAM addressing by the X register ([X]
), and post-inc/decrement variants ([B+]
, [B−]
, [X+]
, [X−]
).
Indirect addressing via B is particularly fast, and can be done in the same cycle that the instruction is executed.
On the other hand, absolute RAM addressing is not directly encoded in most cases. Rather, a special "direct addressing" prefix opcode, followed by a 1-byte address, may precede any instruction with a [B]
operand, and changes it to a memory direct operand. This adds two bytes and three cycles to the instruction. (Conditional-skip instructions skip the prefix and following instruction as a pair.)
All "move" instructions are called LD
(load) even if the destination is a memory address. Unusually, there are no LD
instructions with the accumulator as a source; stores are done with the X
instruction which exchanges the accumulator with the memory operand, storing A and loading the previous memory contents. (This takes no additional time; X A,[B]
is a one-cycle instruction.)
There are instructions to fetch from tables in ROM. These combine the high 7 bits of the program counter (PCU) with the accumulator, fetch a byte from that address, and place it in the accumulator (LAID
instruction) or the low 8 bits of the program counter PCL (JID
instruction). Because the next instruction executed must be in the same 256-byte page of ROM as the table itself, a 256-entry table is not possible.
Opcode | Operands | Mnemonic | Cycles | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | b2 | b3 | |||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | — | — | INTR | 7 | Software interrupt (push PC, PC ← 0x00ff) |
0 | 0 | 0 | offset | — | — | JP +disp5 | 3 | PC ← PC + offset; jump 1–31 bytes forward (offset=0 reserved) | ||||
0 | 0 | 1 | 0 | addrhi | addrlo | — | JMP addr12 | 3 | PC[11:0] ← address. Top 3 bits of PC preserved. | |||
0 | 0 | 1 | 1 | addrhi | addrlo | — | JSR addr12 | 5 | Jump to subroutine: push PC, proceed as JMP. | |||
0 | 1 | 0 | 0 | k | — | — | IFBNE #imm4 | 1 | Execute next instruction if (B & 15) ≠ k; skip if (B & 15) = k. | |||
0 | 1 | 0 | 1 | k | — | — | LD B,#imm4 | 1 | B ← 15 − k (zero-extended) | |||
0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | k | — | ANDSZ A,#imm8* | 2 | Skip if A & k = 0 (=IFBIT #bit,A) |
0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | addrlo | — | JSRB addr8† | 5 | Push PC, jump to boot ROM subroutine at address [5] |
0 | 1 | 1 | 0 | 0 | 0 | 1 | – | — | — | (reserved for boot ROM†) [5] | ||
0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | — | — | CLR A | 1 | A ← 0 |
0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | — | — | SWAP A | 1 | A ← A<<4 | A>>4; swap nibbles |
0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | — | — | DCOR A | 1 | Decimal correct after BCD addition |
0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | — | — | PUSH A* | 3 | [SP] ← A, SP ← SP−1 |
0 | 1 | 1 | 0 | 1 | bit | — | — | RBIT #bit,[B] | 1 | Reset (clear to 0) given bit of RAM | ||
0 | 1 | 1 | 1 | 0 | bit | — | — | IFBIT #bit,[B] | 1 | Test given bit of RAM, skip if zero | ||
0 | 1 | 1 | 1 | 1 | bit | — | — | SBIT #bit,[B] | 1 | Set (to 1) given bit of RAM | ||
1 | 0 | 0 | m | 0 | opcode | operand | — | ALU operations, A ← A op operand | ||||
1 | 0 | 0 | 0 | 0 | opcode | — | — | OP A,[B] | 1 | ALU operation with A and [B] (with [address] using DIR prefix) | ||
1 | 0 | 0 | 1 | 0 | opcode | k | — | OP A,#imm8 | 2 | ALU operation with A and immediate k | ||
1 | 0 | 0 | m | 0 | 0 | 0 | 0 | operand | — | ADC A,operand | C,A ← A + operand + C; add with carry | |
1 | 0 | 0 | m | 0 | 0 | 0 | 1 | operand | — | SUBC A,operand | C,A ← A + ~operand + C (A − operand − ~C) | |
1 | 0 | 0 | m | 0 | 0 | 1 | 0 | operand | — | IFEQ A,operand | Skip if A ≠ operand | |
1 | 0 | 0 | m | 0 | 0 | 1 | 1 | operand | — | IFGT A,operand | Skip if A ≤ operand | |
1 | 0 | 0 | m | 0 | 1 | 0 | 0 | operand | — | ADD A,operand | A ← A + operand (carry unchanged!) | |
1 | 0 | 0 | m | 0 | 1 | 0 | 1 | operand | — | AND A,operand | A ← A & operand | |
1 | 0 | 0 | m | 0 | 1 | 1 | 0 | operand | — | XOR A,operand | A ← A ^ operand | |
1 | 0 | 0 | m | 0 | 1 | 1 | 1 | operand | — | OR A,operand | A ← A |operand | |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | — | — | IFC | 1 | Skip if carry clear |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | — | — | IFNC | 1 | Skip if carry set |
1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | — | — | INC A | 1 | A ← A + 1 (carry unchanged) |
1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | — | — | DEC A | 1 | A ← A − 1 (carry unchanged) |
1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | — | — | POP A* | 3 | SP ← SP+1, A ← [SP] |
1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | — | — | RETSK | 5 | Pop PC, skip one instruction |
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | — | — | RET | 5 | Pop PC high, pop PC low |
1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | — | — | RETI | 5 | Return and enable interrupts |
1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | k | — | LD A,#imm8 | 2 | A ← k |
1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | k | — | IFNE A,#imm8* | 2 | Skip if A = k |
1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | k | — | LD [B+],#imm8 | 3 | [B] ← k, B ← B + 1 |
1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | k | — | LD [B−],#imm8 | 3 | [B] ← k, B ← B − 1 |
1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | address | — | X A,addr8 | 3 | A ↔ [address], exchange |
1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | address | — | LD A,addr8 | 3 | A ← [address] |
1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | k | — | LD [B],#imm8 | 2 | [B] ← k |
1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | k | — | LD B,#imm8* | 2 | B ← k (one cycle faster than LD R14,#k) |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | — | — | RC | 1 | C ← 0; reset carry to 0 |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | — | — | SC | 1 | C ← 1; set carry to 1 |
1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | — | — | X A,[B+] | 2 | A ↔ [B], B ← B+1 |
1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | — | — | X A,[B−] | 2 | A ↔ [B], B ← B−1 |
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | — | — | LAID | 3 | A ← ROM[PCU:A]; load from ROM |
1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | — | — | JID | 3 | PCL ← ROM[PCU:A]; jump via ROM table |
1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | — | — | X A,[B] | 1 | A ↔ [B] |
1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | — | — | (reserved) | ||
1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | — | — | RLC A* | 1 | C,A ← A,C; rotate left through carry (=ADC A,A) |
1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | address | k | IFEQ addr8,#imm8* | 3 | Skip if [address] ≠ k |
1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | — | — | LD A,[B+] | 2 | A ← [B], B ← B+1 |
1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | — | — | LD A,[B−] | 2 | A ← [B], B ← B−1 |
1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | addrhi | addrlo | JMPL addr15 | 4 | PC ← address |
1 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | addrhi | addrlo | JSRL addr15 | 5 | Push PC, PC ← address |
1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | — | — | LD A,[B] | 1 | A ← [B] |
1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | — | — | (reserved) | ||
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | — | — | RRC A | 1 | A,C ← C,A; rotate right through carry |
1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | — | — | (reserved) | ||
1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | — | — | X A,[X+] | 3 | A ↔ [X], X ← X+1 |
1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | — | — | X A,[X−] | 3 | A ↔ [X], X ← X−1 |
1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | — | — | VIS* | 5 | PC ← ROM[vector table]; Vector Interrupt Select |
1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | — | — | RPND* | 1 | Reset pending interrupt flag |
1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | — | — | X A,[X] | 3 | A ↔ [X] |
1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | — | — | (reserved) | ||
1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | — | — | NOP | 1 | No operation |
1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | — | — | IFNE A,[B]* | 1 | Skip if A = [B] |
1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | — | — | LD A,[X+] | 3 | A ← [X], X ← X+1 |
1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | — | — | LD A,[X−] | 3 | A ← [X], X ← X−1 |
1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | address | k | LD addr8,#imm8 | 3 | [address] ← k |
1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | address | — | DIR addr8 | 3 | Change next instruction's operand from [B] to [address] |
1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | — | — | LD A,[X] | 3 | A ← [X] |
1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | — | — | (reserved) | ||
1 | 1 | 0 | 0 | register | — | — | DRSZ register | 3 | register ← register − 1, skip if result is zero | |||
1 | 1 | 0 | 1 | register | k | — | LD register,#imm8 | 3 | register ← k (=LD 0xf0+register,#k, one byte shorter) | |||
1 | 1 | 1 | offset | — | — | JP −disp5 | 3 | PC ← PC − 32 + offset; jump 1–32 bytes backward | ||||
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | b2 | b3 | Mnemonic | Cycles | Description |
*: Only on "feature family" (COP888/COP8SA) cores; not present on "basic family" (COP800) cores.
†: Only on "flash family" (COP8TA/COP8C) models with boot ROM for in-system programming
The Data General Nova is a series of 16-bit minicomputers released by the American company Data General. The Nova family was very popular in the 1970s and ultimately sold tens of thousands of units.
The 68HC11 is an 8-bit microcontroller family introduced by Motorola Semiconductor in 1984. It descended from the Motorola 6800 microprocessor by way of the 6801. The 68HC11 devices are more powerful and more expensive than the 68HC08 microcontrollers and are used in automotive applications, barcode readers, hotel card key writers, amateur robotics, and various other embedded systems. The MC68HC11A8 was the first microcontroller to include CMOS EEPROM.
The PDP-8 is a family of 12-bit minicomputers that was produced by Digital Equipment Corporation (DEC). It was the first commercially successful minicomputer, with over 50,000 units being sold over the model's lifetime. Its basic design follows the pioneering LINC but has a smaller instruction set, which is an expanded version of the PDP-5 instruction set. Similar machines from DEC are the PDP-12 which is a modernized version of the PDP-8 and LINC concepts, and the PDP-14 industrial controller system.
The Intel MCS-51 is a single chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton. Intel's original versions were popular in the 1980s and early 1990s, and enhanced binary compatible derivatives remain popular today. It is a complex instruction set computer, but also has some of the features of RISC architectures, such as a large register set and register windows, and has separate memory spaces for program instructions and data.
PIC is a family of microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and is currently expanded as Programmable Intelligent Computer. The first parts of the family were available in 1976; by 2013 the company had shipped more than twelve billion individual parts, used in a wide variety of embedded systems.
Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how the machine language instructions in that architecture identify the operand(s) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.
The TMS9900 was one of the first commercially available, single-chip 16-bit microprocessors. Introduced in June 1976, it implemented Texas Instruments' TI-990 minicomputer architecture in a single-chip format, and was initially used for low-end models of that lineup.
In computer engineering, an orthogonal instruction set is an instruction set architecture where all instruction types can use all addressing modes. It is "orthogonal" in the sense that the instruction type and the addressing mode vary independently. An orthogonal instruction set does not impose a limitation that requires a certain instruction to use a specific register so there is little overlapping of instruction functionality.
National Semiconductor's SC/MP for Simple Cost-effective Micro Processor, is an early 8-bit microprocessor which became available in April 1976. It was designed to allow systems to be implemented with the minimum number of additional support chips. SC/MP included a daisy-chained control pin that allowed up to three SC/MP's share a single main memory to produce a multiprocessor system, or to act as controllers in a system with another main central processing unit (CPU). Three versions were released over its lifetime, SCMP-1 through 3, the latter two also known as INS8060 and INS8070.
The Atmel AVR instruction set is the machine language for the Atmel AVR, a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage.
TLCS is a prefix applied to microcontrollers made by Toshiba. The product line includes multiple families of CISC and RISC architectures. Individual components generally have a part number beginning with "TMP". E.g. the TMP8048AP is a member of the TLCS-48 family.
The Mitsubishi 740, also known as MELPS 740, is a series of 8-bit CMOS microcontrollers and microprocessors with an enhanced MOS Technology 6502 compatible core based on the expanded WDC 65C02. The ICs were manufactured by Mitsubishi Electric during the 1980s and 1990s.
The Intersil 6100 is a single-chip microprocessor implementation of the 12-bit PDP-8 instruction set, along with a range of peripheral support and memory ICs developed by Intersil in the mid-1970s. It was sometimes referred to as the CMOS-PDP8. Since it was also produced by Harris Corporation, it was also known as the Harris HM-6100. The Intersil 6100 was introduced in the second quarter of 1975, and the Harris version in 1976.
The 9S08 is an 8-bit microcontroller (μC) family originally produced by Motorola, later by Freescale Semiconductor, and currently by NXP, descended from the Motorola 6800 microprocessor. It is a CISC microcontroller. A slightly extended variant of the 68HC08, it shares upward compatibility with the aging 68HC05 microcontrollers, and is found in almost any type of embedded systems. The larger members offer up to 128 KiB of flash, and 8 KiB of RAM via a simple memory management unit (MMU) which allows bank-switching 16 KiB of the address space and an address/data register pair which allows data fetches from any address. The paging scheme used allows for a theoretical maximum of 4 MB of flash.
The ST6 and ST7 are 8-bit microcontroller product lines from STMicroelectronics. They are commonly used in small embedded applications like washing machines.
The W65C816S is a 16-bit microprocessor (MPU) developed and sold by the Western Design Center (WDC). Introduced in 1983, the W65C816S is an enhanced version of the WDC 65C02 8-bit MPU, itself a CMOS enhancement of the venerable MOS Technology 6502 NMOS MPU. The 65C816 is the CPU for the Apple IIGS and, in modified form, the Super Nintendo Entertainment System.
The PIC instruction set refers to the set of instructions that Microchip Technology PIC or dsPIC microcontroller supports. The instructions are usually programmed into the Flash memory of the processor, and automatically executed by the microcontroller on startup.
The STM8 is an 8-bit microcontroller family by STMicroelectronics. The STM8 microcontrollers use an extended variant of the ST7 microcontroller architecture. STM8 microcontrollers are particularly low cost for a full-featured 8-bit microcontroller.
The Mostek MK5065 was an 8-bit microprocessor introduced by Mostek in early 1974. The design was originally developed by Motorola for use in an Olivetti electronic calculator, and was licensed to Mostek for use in non-calculator roles. It featured three sets of processor registers, allowing it to switch to an interrupt handler in a single cycle, and a wait-for-data mode that aided direct memory access.
The COP400 or COP II is a 4-bit microcontroller family introduced in 1977 by National Semiconductor as a follow-on product to their original PMOS COP microcontroller. COP400 family members are complete microcomputers containing internal timing, logic, ROM, RAM, and I/O necessary to implement dedicated controllers. Some COP400 devices were second-sourced by Western Digital as the WD4200 family. In the Soviet Union several COP400 microcontrollers were manufactured as the 1820 series.