Single Chip Microcomputers
Total Page:16
File Type:pdf, Size:1020Kb
Single chip microcomputers Single chip microcomputers 1 Components of a microprocessor/controller • CPU: Central Processing Unit • I/O: Input /Output • Bus: Address bus & Data bus • Memory: RAM & ROM • Timer • Interrupt • Serial Port • Parallel Port 2 1 Single chip microcomputers General-purpose microprocessor o CPU for Computers o Commonly no RAM, ROM, I/O on CPU chip itself Many chips on motherboard Data Bus CPU General- Serial Purpose I/O RAM ROM Timer COM Micro- Port processor Port Address Bus 3 Microcontroller • A single-chip computer • On-chip RAM, ROM, I/O ports... • Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X CPU RAM ROM A single chip Serial I/O Timer COM Port Port Microcontroller 4 2 Single chip microcomputers Microprocessor Microcontroller • CPU is stand-alone, RAM, • CPU, RAM, ROM, I/O and timer ROM, I/O, timer are separate are all on a single chip • designer can decide on the • fixed amount of on-chip ROM, amount of ROM, RAM and RAM, I/O ports I/O ports. • for applications in which cost, • expensive power and space are critical • versatility • single-purpose (control- • general-purpose oriented) • High processing power • Low processing power • High power consumption • Low power consumption • Instruction sets focus on • Bit-level operations processing-intensive • Instruction sets focus on control operations and bit-level operations • Typically 32/64 – bit • Typically 8/16 bit • Typically deep pipeline (5-20 • Typically single-cycle/two-stage stages) pipeline 5 Some Popular Microcontrollers… • 8051 series • Microchip Technology PIC • Atmel AVR • Texas Instruments MSP430 (16-bit) 6 3 Single chip microcomputers 8051 Microcontroller • 8051 microcontroller is an 8-bit family of microcontroller is developed by the Intel in the year 1981. This is one of the popular families of microcontroller are being used all across the world. This microcontroller was moreover referred as “system on a chip” since it has 128 bytes of RAM, 4Kbytes of a ROM, 2 Timers, 1 Serial port, and 4 ports on a single chip. The CPU can also work for 8bits of data at a time since 8051 is an 8-bit processor. In case the data is bigger than 8 bits, then it has to be broken into parts so that the CPU can process easily. Most manufacturers contain put 4Kbytes of ROM even though the number of ROM can be extended up to 64 K bytes. 7 8051 Microcontroller • The 8051 is easy to integrate into a project or make a device approximately. The following are the major areas of focus: • Energy Management: Efficient metering systems facilitate in controlling energy usage in homes and manufacturing applications. These metering systems are prepared capable by incorporating microcontrollers. • Touch screens: A high number of microcontroller providers incorporate touch-sensing capabilities in their designs. Portable electronics such as cell phones, media players and gaming devices are examples of microcontroller-based touch screens. • Automobiles: The 8051 finds wide taking in providing automobile solutions. They are broadly used in hybrid vehicles to handle engine variants. Furthermore, functions such as cruise control and anti-brake system have been prepared more capable with the use of microcontrollers. • Medical Devices: Moveable medical devices such as blood pressure and glucose monitors use microcontrollers will to show data, thus provided 8 that higher reliability in providing medical results. 4 Single chip microcomputers PIC Microcontroller • Peripheral Interface Controller (PIC) is microcontroller developed by a Microchip, PIC microcontroller is fast and simple to implement program when we contrast other microcontrollers like 8051. The ease of programming and simple to interfacing with other peripherals PIC become successful microcontroller. • The PIC is a microcontroller which consists of RAM, ROM, CPU, timer, counter, ADC, DAC. PIC Microcontroller also support the protocols like CAN, SPI, UART for an interfacing with additional peripherals. PIC mostly used to modify Harvard architecture and also supports RISC by the above requirement RISC and Harvard we can simply that PIC is faster than the 8051 based controllers which is prepared up of Von-Newman architecture. 9 AVR Microcontroller • AVR microcontroller was developed in the year of 1996 by Atmel Corporation. The structural design of AVR was developed by the Alf-Egil Bogen and Vegard Wollan. AVR derives its name from its developers and stands for Alf-Egil Bogen Vegard Wollan RISC microcontroller (a.k.a. Advanced Virtual RISC. The AT90S8515 was the initial microcontroller which was based on the AVR architecture, though the first microcontroller to hit the commercial market was AT90S1200 in the year 1997. • There are three categories of AVR Microcontrollers: • TinyAVR – less memory, small size, appropriate just for simpler applications • MegaAVR – most popular, good quantity of memory (up to 256 KB), higher number of inbuilt peripherals and appropriate for modest to complex applications. • XmegaAVR – for commercial, complex applications, which need large program memory and high speed. 10 5 Single chip microcomputers ARM Processor • An ARM processor is also one of a family of CPUs based on the RISC (reduced instruction set computer) architecture developed by Advanced RISC Machines (ARM). • An ARM makes at 32-bit and 64-bit RISC multi-core processors. RISC processors are designed to perform a smaller number of types of computer instructions so that they can operate at a higher speed, performing extra millions of instructions per second (MIPS). • ARM processors are widely used in customer electronic devices such as smart phones, tablets, multimedia players and other mobile devices, such as wearables. Because of their reduced to instruction set, they need fewer transistors, which enable a smaller die size of the integrated circuitry. The ARM processors, smaller size reduced difficulty and lower power expenditure makes them suitable for 11 increasingly miniaturized devices. Comparison of Features 8051 PIC AVR ARM 8-bit for 32-bit mostly also Bus width 8/16/32-bit 8/32-bit standard core available in 64-bit UART, USART, UART, USART, LIN, PIC, UART, SPI, I2C, Communica- I2C, SPI, CAN, USB, UART, USART, USART, LIN, special tion Ethernet, I2S, DSP, SPI, I2C CAN, Ethernet, purpose AVR SAI (serial audio Protocols SPI, I2S support CAN, interface), IrDA USB, Ethernet Speed 12 CPI 4 CPI 1 CPI 1 CPI ROM, SRAM, SRAM, Flash, SRAM, Flash, SDRAM, Memory FLASH FLASH EEPROM EEPROM Power 12 Consumptio Average Low Low Low n 6 Single chip microcomputers Comparison of Features 8051 PIC AVR ARM Some feature ISA CLSC RISC RISC of RISC Von Memory Harvard Modified Harvard Neumann Modified Architecture architecture architecture architecture Tiny, Atmega, PIC16,PIC17, Xmega, ARMv4,5,6,7 and Families 8051 variants PIC18, special series PIC24, PIC32 purpose AVR Community Vast Very Good Very Good Vast High speed Other Known for its Cheap, Cheap operation 13 Features Standard effective Vast Comparison of Features 8051 PIC AVR ARM NXP, Atmel, Apple, Nvidia, Silicon Labs, Manufacture Microchip Qualcomm, Dallas, Atmel r Average Samsung Cyprus, Electronics, TI etc. Infineon, etc. Cost / Very Low Average Average Low features PIC18fXX8, Atmega8, 16, LPC2148, ARM Popular AT89C51, PIC16f88X, 32, Arduino Cortex-M0 to ARM series P89v51, etc. PIC32MXX Community Cortex-M7, etc. 14 7 Single chip microcomputers Three criteria in Choosing a Microcontroller 1. meeting the computing needs of the task efficiently and cost effectively • speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption • easy to upgrade • cost per unit 2. availability of software development tools • assemblers, debuggers, C compilers, emulator, simulator, technical support 3. wide availability and reliable sources of the microcontrollers. 15 The 8051 microcontroller • a Harvard architecture (separate instruction/data memories) • single chip microcontroller (µC) • developed by Intel in 1980 for use in embedded systems. • today largely superseded by a vast range of faster and/or functionally enhanced 8051-compatible devices manufactured by more than 20 independent manufacturers 16 8 Single chip microcomputers Block Diagram External interrupts On-chip Timer/Counter Interrupt ROM for program On-chip Timer 1 Counter Control RAM Inputs code Timer 0 CPU Serial Bus 4 I/O Ports OSC Control Port P0 P1 P2 P3 TxD RxD Address/Data 17 Comparison of the 8051 Family Members Feature 8051 8052 8031 ROM (program space in bytes) 4K 8K 0K RAM (bytes) 128 256 128 Timers 2 3 2 I/O pins 32 32 32 Serial port 1 1 1 Interrupt sources 6 8 6 18 9 Single chip microcomputers 19 Pin Description of the 8051 P1.0 1 40 Vcc P1.1 2 39 P0.0(AD0 P1.2 3 38 )P0.1(AD1) P1.3 4 37 P0.2(AD2 8051 P1.4 5 36 )P0.3(AD3) P1.5 6 (8031) 35 P0.4(AD4) P1.6 7 34 P0.5(AD5) P1.7 8 33 P0.6(AD6) RST 9 32 P0.7(AD7) (RXD)P3.0 10 31 EA/VPP (TXD)P3.1 11 30 ALE/PROG (INT0)P3.2 12 29 PSEN (INT1)P3.3 13 28 P2.7(A15) (T0)P3.4 14 27 P2.6(A14) (T1)P3.5 15 26 P2.5(A13) (WR)P3.6 16 25 P2.4(A12) (RD)P3.7 17 24 P2.3(A11) XTAL2 18 23 P2.2(A10) XTAL1 19 22 P2.1(A9) GND 20 21 P2.0(A8) 20 10 Single chip microcomputers Pins of 8051(1/4) • Vcc(pin 40): • Vcc provides supply voltage to the chip. • The voltage source is +5V. • GND(pin 20):ground • XTAL1 and XTAL2(pins 19,18): • These 2 pins provide external clock. • Way 1:using a quartz crystal oscillator • Way 2:using a TTL oscillator • Example 4-1 shows the relationship between XTAL and the machine cycle. 21 Pins of 8051(2/4) • RST(pin 9):reset • It is an input pin and is active high(normally low).