Microcontrollers –and- Motorola/Freescale HC11 ISACMPE12 – Winter 2011 – J. Ferguson 12 - 2 • A computer on a chip used to control electronic devices • A microprocessor • Usually not cutting edge (4-bit to 32-bit) • Dependable (all major bugs well known) • Predictable (critical for real-time processing) • On-chip peripherals and memory • Parallel and serial digital I/O • Analog I/O • Counters and timers • Internal ROM, RAM and/or EPROM What is a microcontroller?CMPE12 – Winter 2011 – J. Ferguson 12 - 3 What are microcontrollers used in? • Watches • Microwaves • Stereo Receivers Some products that you might know: • NASA’s Sojourner Rover – 8-bit Intel 80C85 • Palm Vx handheld – 32-bit Motorola Dragonball EZ • Sonicare toothbrush – 8-bit Zilog Z8 • The Vendo V-MAX 720 Soda Machine – Motorola HC11 • Miele dishwasher – 8-bit Motorola 68HC05 • Hunter 44550 Programmable Thermostat – (4-bit cpu) • ATMs • PDA’s, MP3 players • AutomobilesCMPE12 – Winter 2011 – J. Ferguson 12 - 4 Microcontrollers (1/4) • AMCC – Until May 2004, these µCs were developed and marketed by IBM, whose – 4xx family was sold to Applied Micro Circuits Corporation. – 403 PowerPC CPU • PPC 403GCX – 405 PowerPC CPU • PPC 405EP • PPC 405GP/CR • PPC 405GPr • PPC NPe405H/L – 440 PowerPC Book-E CPU • PPC 440GP • PPC 440GX • PPC 440EP/EPx/GRx • PPC 440SP/SPe • Altera – Nios II 32-bit configurable soft processor – Nios 16-bit configurable soft processor • Atmel – AT89 series (Intel 8051 architecture) – AT90, ATtiny, ATMega series (AVR architecture) (Atmel Norway design) – AT91SAM (ARM architecture) – AVR32 (32-bit AVR architecture) • Charmed Labs • Cypress MicroSystems • Dallas SemiconductorCMPE12 – Winter 2011 – J. Ferguson 12 - 5 Microcontrollers (2/4) • Freescale Semiconductor – Until 2004, these µCs were developed and marketed by Motorola, whose – semiconductor division was spun-off to establish Freescale. – 8-bit • 68HC05 (CPU05) • 68HC08 (CPU08) • 68HC11 (CPU11) – 16-bit • 68HC12 (CPU12) • 68HC16 (CPU16) • Freescale DSP56800 (DSPcontroller) – 32-bit • Freescale 683XX • MPC500 • MPC 860 (PowerQUICC) • MPC 8240/8250 (PowerQUICC II) • MPC 8540/8555/8560 (PowerQUICC III) • Fujitsu • Holtek • Infineon – 8-bit • XC800 family • C500/C800 family – 16-bit • XC166 family – 32-bit family • TRICORE familyCMPE12 – Winter 2011 – J. Ferguson 12 - 6 Microcontrollers (3/4) • Intel – 8-bit • MCS-48 (8048 family – also incl. 8035, 8038, 8039, 8040, 8X42, 8X49, 8050; X=0 or 7) • MCS-51 (8051 family – also incl. 8X31, 8X32, 8X52; X=0, 3, or 7) • 8xC251 – 16-bit • MCS-96 (8096 family – also incl. 8061) • Intel MCS 296 • Lattice Semiconductor – Mico8 softcore 8 bit microcontroller • Microchip Technology – 8 and 16-bit microcontrollers with 12 to 24-bit instructions – ability to include DSP function – 12-bit instruction PIC – 14-bit instruction PIC • PIC16F84 – 16-bit instruction PIC • National Semiconductor – COP8 – CR16 • NEC • Philips Semiconductors • Rabbit SemiconductorCMPE12 – Winter 2011 – J. Ferguson 12 - 7 Microcontrollers (4/4) • Renesas Technology • (Renesas is a joint venture of Hitachi and Mitsubishi Electric.) • Silabs • Silicon Motion • STMicroelectronics • Texas Instruments • Toshiba • Western Design Center • Ubicom • Xemics • Xilinx • ZiLOGCMPE12 – Winter 2011 – J. Ferguson 12 - 8 Microcontroller for iPhone ARM1176JZFCMPE12 – Winter 2011 – J. Ferguson 12 - 9 Languages for microcontrollers Language ‘98-’99 ‘99-’00 Assembly ~ 21% ~ 10% C ~ 69% ~ 80% C++ ~ 5% ~ 6% Java ~ 1 % ~ 2% Other ~ 3 % ~ 2% Source: TRON Association Survey 1998/99 & 1999/2000CMPE12 – Winter 2011 – J. Ferguson 12 - 10 • M6801 CPU core • Memory: • 8KB ROM • 512B EEPROM • 256B RAM • Counter/Timer system • 8-channel, 8-bit A/D conv. (external D/A in our kit) • Parallel I/O port • Two serial I/O ports: • Asynchronous, SCI • Synchronous, SPI • Expansion bus for external memory Motorola/Freescale M68HC11CMPE12 – Winter 2011 – J. Ferguson 12 - 11 High-level HC11 architecture TIMER and COUNTER M8601 CPU core Serial I/O A/D converter MEMORY Interrupt logic PORT A PORT B PORT C PORT D PORT ECMPE12 – Winter 2011 – J. Ferguson Coming Up Next! • ISA overview • M6801 register set • M6801 addressing modes • M6801 assembly code 12 - 12CMPE12 – Winter 2011 – J. Ferguson 12 - 13 M8601 CPU core • Mixed 8-bit/16-bit architecture • CISC, with more than 100 opcodes • Accumulator architecture • Two 8-bit accumulators, A or B • One 16-bit accumulator [A:B], called D • Two 16-bit index registers, X and Y, used for addressing memory or for counting • 16-bit dedicated stack pointer, SP • 16-bit program counter, PC • 8-bit condition codes register, CCRCMPE12 – Winter 2011 – J. Ferguson 12 - 14 Accumulator architecture ADDA variableCMPE12 – Winter 2011 – J. Ferguson 12 - 15 M8601 registersCMPE12 – Winter 2011 – J. Ferguson 12 - 16 Accumulators: A, B, and D • General-purpose 8-bit accumulators • Source/destination of most operations • Almost always interchangeable – ex: ABA, add B to A: A <- A + B, B is unchanged (note that there’s no AAB instruction) SBA, subtract B from A: A <- A - B (note that there is no SAB instruction • Some instructions use [A:B] as a single 16-bit register D 7 A 0 7 B 0 15 D 0CMPE12 – Winter 2011 – J. Ferguson 12 - 17 Index registers X and Y • 16-bit index registers X and Y: – Used for indexed addressing mode – Swap with register D to perform complex address operations 15 X 0 15 Y 0CMPE12 – Winter 2011 – J. Ferguson 12 - 18 HC11 User Stack • The HC11 has
View Full Document