The Motorola 68HC11 (6811 or HC11 for short) is a microcontroller (µC) family from Motorola, descended from the Motorola 6800 microprocessor, and a subfamily of the 68h family. The 68HC11 devices are more powerful and more expensive than the 68HC05 microcontrollers, and are used in barcode readers, hotel card key writers, and various other embedded systems.
Internally, the HC11 instruction set is compatible with the 6801 and 6809, with the addition of a Y register (instructions are the same as for the X register, with a prefixed 0x18 or some other byte). The microcontroller uses variable length instructions and is considered to have a CISC architecture. It has two eight-bit accumulators, A and B, two sixteen-bit index registers, X and Y, a processor flag register, a stack pointer, and a program counter. In addition it features a 16-bit D register, which is internally mapped onto the 16 bits used by the A and B registers.
The HC11 has five external ports, A, B, C, D, and E. Each port is eight-bits wide except for D, which is six bits (in some variations of the chip, D also has eight bits). It can be operated with an internal program and RAM (1 to 768 bytes) or an external memory of up to 16 kilobytes. With external memory, B and C are used as address and data bus. In this mode, port C is multiplexed to carry both the lower byte of the address and data. A MC68HC24 port replacement unit is avaliable for the HC11, which allows these ports to be used for their general I/O instead of extended addressing. Port A has input capture, output compare, pulse accumulator, and other timer functions; port D has serial I/O, and port E has an analog to digital converter (ADC).