Freescale 68HC12

Last updated
68HC12
Designer Freescale Semiconductor
Bits 8-bit/16-bit
Design CISC
Encoding Variable
Endianness Big
Registers
8
Dragon12-P microcontroller evaluation board running on 68HC12 Drago12P 68HC12 EVB.jpg
Dragon12-P microcontroller evaluation board running on 68HC12

The 68HC12 (6812 or HC12 for short) is a microcontroller family from Freescale Semiconductor. Originally introduced in the mid-1990s, the architecture is an enhancement of the Freescale 68HC11. Programs written for the HC11 are usually compatible with the HC12, which has a few extra instructions. The first 68HC12 derivatives had a maximum bus speed of 8  MHz and flash memory sizes up to 128  KB.

Microcontroller small computer on a single integrated circuit

A microcontroller is a small computer on a single integrated circuit. In modern terminology, it is similar to, but less sophisticated than, a system on a chip (SoC); an SoC may include a microcontroller as one of its components. A microcontroller contains one or more CPUs along with memory and programmable input/output peripherals. Program memory in the form of ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips.

Freescale Semiconductor American semiconductor company

Freescale Semiconductor, Inc. was an American multinational corporation headquartered in Austin, Texas, with design, research and development, manufacturing and sales operations in more than 75 locations in 19 countries. The company employed 17,000 people worldwide.

Freescale 68HC11

The 68HC11 is an 8-bit microcontroller (µC) family introduced by Motorola in 1985. Now produced by NXP Semiconductors, it descended from the Motorola 6800 microprocessor by way of the 6809. It is a CISC microcontroller. 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 MCU to include CMOS EEPROM.

Contents

Architecture of the 68HC12

Like the 68HC11, the 68HC12 has two 8-bit accumulators A and B (referred to as a single 16-bit accumulator, D, when A & B are cascaded so as to allow for operations involving 16  bits), two 16-bit registers X and Y, a 16-bit program counter, a 16-bit stack pointer and an 8-bit Condition Code Register. Unlike the 68HC11 the processor has 16bit internal data paths

In computer architecture, 8-bit integers, memory addresses, or other data units are those that are 8 bits wide. Also, 8-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size. 8-bit is also a generation of microcomputers in which 8-bit microprocessors were the norm.

The bit is a basic unit of information in information theory, computing, and digital communications. The name is a portmanteau of binary digit.

In computer architecture, 16-bit integers, memory addresses, or other data units are those that are 16 bits wide. Also, 16-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size. 16-bit microcomputers are computers in which 16-bit microprocessors were the norm.

The 68HC12 adds to and replaces a small number of 68HC11 instructions with new forms that are closer to the 6809 processor. More significantly it changes the instruction encodings to be far more dense and adds many 6809 like indexing features, some with even more flexibility. The net result is that code sizes are typically 30% smaller. [1]

HCS12/MC9S12 derivatives

Beginning in 2000 the family was extended with the introduction of the MC9S12 derivatives which have bus speeds of up to 25 MHz and flash sizes up to 512 KB.

The MC9S12NE64 was introduced by Freescale in September 2004, claiming to be the "industry's first single-chip fast-Ethernet Flash microcontroller." It features a 25 MHz HCS12 CPU, 64 KB of FLASH EEPROM, 8 KB of RAM, and an Ethernet 10/100  Mbit/s controller.

Random-access memory form of computer data storage

Random-access memory is a form of computer data storage that stores data and machine code currently being used. A random-access memory device allows data items to be read or written in almost the same amount of time irrespective of the physical location of data inside the memory. In contrast, with other direct-access data storage media such as hard disks, CD-RWs, DVD-RWs and the older magnetic tapes and drum memory, the time required to read and write data items varies significantly depending on their physical locations on the recording medium, due to mechanical limitations such as media rotation speeds and arm movement.

Ethernet computer networking technology

Ethernet is a family of computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3, and has since retained a good deal of backward compatibility and been refined to support higher bit rates and longer link distances. Over time, Ethernet has largely replaced competing wired LAN technologies such as Token Ring, FDDI and ARCNET.

MC9S12X derivatives

The MC9S12XDP512 which was introduced in 2004 has a bus speed of 40 MHz and a peripheral co-processor known as the XGATE which allows for some tasks to be offloaded from the CPU. The CPU of the S12X derivative also features several new instructions to increase performance.

Freescale announced the MC9S12XEP100 in May 2006 to further extend the S12X family to 50 MHz bus speed and add a Memory protection unit (based on segmentation) and a hardware scheme to provide emulated EEPROM.

Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it. This prevents a bug or malware within a process from affecting other processes, or the operating system itself. Protection may encompass all accesses to a specified area of memory, write accesses, or attempts to execute the contents of the area. An attempt to access unowned memory results in a hardware fault, called a segmentation fault or storage violation exception, generally causing abnormal termination of the offending process. Memory protection for computer security includes additional techniques such as address space layout randomization and executable space protection.

EEPROM nonvolatile memory comprising arrays of floating-gate transistors used in computers, microcontrollers &c. to store relatively small amounts of data but allowing individual bytes to be erased/reprogrammed in-circuit through special programming signals

EEPROM (also E2PROM) stands for electrically erasable programmable read-only memory and is a type of non-volatile memory used in computers, integrated in microcontrollers for smart cards and remote keyless systems, and other electronic devices to store relatively small amounts of data but allowing individual bytes to be erased and reprogrammed.

HCS12 products contain a single processor, the HCS12X feature the additional XGATE peripheral processor.

The S12X family offer two main methods to address more than 64KBytes.

XGATE

The XGATE co-processor is a 16-bit RISC processor operating at twice the main bus clock. It offloads work from the S12X core by handling interrupts only and does not run a background loop. The first versions of the XGATE do not allow for higher priority interrupts to pre-empt a currently handled interrupt, but the "XGATEV3" as featured in the 9S12XEP100 (and others) does allow this. The S12X can trigger software interrupts on the XGATE core and vice versa. A semaphore system is implemented to allow the S12X and XGATE cores to synchronize access to peripherals.

Typically the XGATE code is copied to RAM at device startup and then executed from RAM for a speed benefit. The XGATE has a partial 64KByte address space with no paging. The registers share addresses, but the flash and RAM appear at different addresses between the cores. (See the datasheet for more details.)

Related Research Articles

Intel 8080 8-bit microprocessor

The Intel 8080 ("eighty-eighty") was the second 8-bit microprocessor designed and manufactured by Intel and was released in April 1974. It is an extended and enhanced variant of the earlier 8008 design, although without binary compatibility. The initial specified clock frequency limit was 2 MHz, and with common instructions using 4, 5, 7, 10, or 11 cycles this meant that it operated at a typical speed of a few hundred thousand instructions per second. A faster variant 8080A-1 became available later with clock frequency limit up to 3.125 MHz.

Intel 8086 16-bit central processing unit

The 8086 is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus, and is notable as the processor used in the original IBM PC design, including the widespread version called IBM PC XT.

Motorola 68000 microprocessor

The Motorola 68000 is a 16/32-bit CISC microprocessor, which implements a 32-bit instruction set, with 32-bit registers and 32-bit internal data bus, but with a 16-bit data ALU and two 16-bit arithmetic ALUs and a 16-bit external data bus, designed and marketed by Motorola Semiconductor Products Sector. Introduced in 1979 with HMOS technology as the first member of the successful 32-bit Motorola 68000 series, it is generally software forward-compatible with the rest of the line despite being limited to a 16-bit wide external bus. After 39 years in production, the 68000 architecture is still in use.

Motorola 6809 microprocessor

The Motorola 6809 ("sixty-eight-oh-nine") is an 8-bit microprocessor CPU with some 16-bit features from Motorola. It was designed by Terry Ritter and Joel Boney and introduced in 1978. It was a major advance over both its predecessor, the Motorola 6800, and the related MOS Technology 6502. Among the systems to use the 6809 are the Dragon home computers, TRS-80 Color Computer, the Vectrex home console, and early 1980s arcade machines including Defender, Robotron: 2084, Joust, and Gyruss.

AVR microcontrollers family of microcontrollers

AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

Intel 4040

The Intel 4040 microprocessor was the successor to the Intel 4004. It was introduced in 1974. The 4040 employed a 10 μm silicon gate enhancement load PMOS technology, was made up of 3,000 transistors and could execute approximately 62,000 instructions per second. General performance, bus layout and instruction set was identical to the 4004, with the main improvements being in the addition of extra lines and instructions to recognise and service interrupts and hardware Halt/Stop commands, an extended internal stack and general-purpose "Index" register space to handle nesting of several subroutines and/or interrupts, plus a doubling of program ROM address range.

Freescale 683XX

The Freescale 683xx is a family of compatible microcontrollers that use a Motorola 68000-based CPU core. The family was designed using a hardware description language, making the parts synthesizable, and amenable to improved fabrication processes, such as die shrinks.

TI MSP430 mixed-signal microcontroller family

The MSP430 is a mixed-signal microcontroller family from Texas Instruments. Built around a 16-bit CPU, the MSP430 is designed for low cost and, specifically, low power consumption embedded applications.

The RS08 core is a reduced-resource version of the Freescale MC68HCS08 central processing unit (CPU), a member of the 6800 microprocessor family. It has been implemented in several microcontroller devices for embedded systems.

Parallax Propeller microprocessor

The Parallax P8X32A Propeller is a multi-core processor parallel computer architecture microcontroller chip with eight 32-bit reduced instruction set computer (RISC) central processing unit (CPU) cores. Introduced in 2006, it is designed and sold by Parallax, Inc.

The 68HC08 is a broad family of 8-bit microcontrollers from Freescale Semiconductor.

The 9S08 is a 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 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 4MB of flash.

STM32 ARM Cortex-M based Microcontrollers by STMicroelectronics

STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics. The STM32 chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M7F, Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM, flash memory, debugging interface, and various peripherals.

NXP LPC ARM Cortex-M based Microcontrollers by NXP

LPC is a family of 32-bit microcontroller integrated circuits by NXP Semiconductors. The LPC chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals. The earliest LPC series were based on the Intel 8-bit 80C51 core. As of February 2011, NXP had shipped over one billion ARM processor-based chips.

UDOO is a single-board computer with an integrated Arduino Due compatible microcontroller, designed for computer science education, the world of Makers and the Internet of Things.

References

  1. Sibigtroth, James M. (1996) "Transporting M68HC11 Code to M68HC12 Devices", Motorola Semiconductor Application Note AN1284/D, Motorola.