Chapter 1 Types, Selection and Applications of Microcontrollers
1.1.1 Numbering and Coding Systems
1.1.2 Central Processing Unit (CPU)
1.2.1 The 8, 16 and 32-Bit Microcontrollers
1.2.2 Embedded and External Memory Microcontrollers
1.2.3 CISC and RISC Architecture Microcontrollers
1.2.4 Harvard and Princeton Memory Architecture Microcontrollers
1.3 Examples of the Popular Microcontrollers
1.3.1 8051, Extended 8051XA and 8051MXFamilies
1.3.2 MC68HC11/68HC12 Families
1.3.3 8051 Based MCU of Atmel C51 Family
1.3.5 High-density Flash 8051 Based Turbo fiPSD 3300 Family
1.4 Selection of a Microcontroller
1.4.1 Checklist of the Needed Features and Factors Taken into Consideration
1.4.2 Selection of Processor and Processor Family
1.4.3 Selection of On-Chip Resources-Base
1.4.4 Selection of Software Building Blocks
1.4.5 Selection of Development Tool-Base
1.5.1 Automatic Process Control
1.5.2 Instrumentation Applications
Chapter 2 Overview of Architecture and Microcontroller Resources
2.1 Architecture of a Microcontroller
2.1.1 Functional Overview of8048 and 8049 Microcontroller Architecture
2.1.2 Basic Processing Unit in the 8048 Microcomputer
2.2 Family Members of 8051 and 68HC11/12 Families
2.3 Microcontroller On-Chip Resources
2.3.1 Basic Processing Unit, Internal Buses and Interrupt Handling
2.3.5 Special Function Registers
2.3.7 Synchronous Serial Communication
2.3.10 On-chip A/D Converters (ADC)
2.3.12 Bit-wise Manipulation Capability
2.4 Resources in Advanced and Next-Generation Microcontrollers
Chapter 3 Intel 8051/8031 Family Architecture
3.1 8051 Microcontroller Architecture
3.1.2 Special Function Registers
3.1.3 PSW Register Bits And Flags
3.4 Internal and External Memory
3.5.1 Programmable Timers in the Intel 8051 Family
3.5.2 8052 Additional Timer T2
3.6 Serial Communication in 8051
3.6.1 Mode 0 in Serial Communication
3.6.2 UART Modes 1,2 and 3 for Serial Asynchronous Communication
3.6.3 Multiprocessor UART Mode Communication
Fill in the Blanks Type Questions
Chapter 4 8051 Family Microcontrollers Instruction Set
4.1.2 Program as a Set of Instructions and Routines
4.2 Introduction to Machine Instrucions and Assembly
4.2.8 Assembly and Machine, Assembly and C Instruction Formats
4.4 Execution Time of an Instruction
4.6 Classification of the Instructions at the Instruction Set
4.7 Data Transfer Instructions
4.7.4 PUSH and POP Instructions for Using the Stack Area Employing the SP
4.8 Data and Bit-Manipulation Instructions
4.8.1 Data Byte Manipulate (Clear, Complement, Rotate and Swap) Instructions
4.8.2 Boolean Variable (Bit) Manipulate and Boolean Processing Instructions
4.10 Instructions for Logical Operations on Bytes at the Registers, Internal RAM and SFRs
4.11 Program-Flow Control Instructions
4.11.1 Delay-cycle (NOP) Instructions
4.11.2 Long, Absolute and Short Jumps
4.11.3 Conditional Short Relative Jumps
4.11.4 Decrement and Conditional Jump on Zero
4.11.6 Call to a Routine and Return from Routine
4.12 Interrupt Control Flow (RETI Instruction)
4.13 ASCII-Related Application Program
4.14 BCD-Related Application Program
4.15 Serial Port-Related Application Programs
Fill in the Blanks Type Questions
Chapter 5 Real Time Control: Interrupts
5.1 Interrupt Application Examples
5.2 Routine, Interrupt and Interrupt Service Routine
5.3 Interrupt-Handling Structure of an MCU
5.3.1 Identification of an Interrupt Source
5.3.2 Resetting of Interrupt Identification Flags
5.3.3 Address of Interrupt Service Routine
5.4 Interrupt Latency and Interrupt Deadline
5.5 Multiple Sources of the Interrupts
5.6 Hardware Interrupts Related To Internal Devices:
5.7 Enabling (Unmasking) or Disabling of the Sources
5.8 Polling to Determine the Interrupt Sources and Assignment of the Priorities Among Them
5.8.3 Default MCU-assigned Priorities
5.8.4 User-assigned Priorities
5.9 Interrupt Structure in Intel 8051
5.9.1 The 8051 Family MCU Sources of Interrupt
5.9.3 Unmasking and Masking of an Interrupt Source
5.9.4 Default Priority Assignments for Service
5.9.5 User Priority Assignments for Service
5.9.6 Vector Address for the Interrupt Service Routine
5.9.7 Servicing of Interrupts in 8051
5.10 Programming Approach for Interrupt-Related Programs
5.11 Programming Examples in Assembly and C
Fill in the Blanks Type Questions
Chapter 6 Real-Time Control: Timers 2
6.1 Programmable Timers in the MCUs
6.1.1 Programming Features in 8051/8052
6.1.2 Programming for Finding the Time Interval Between Two Events
6.1.4 Precession Effects in the Timers
6.1.5 Effects on Interrupt Latencies
6.1.6 Timer Features in 68HC11/12 and Other MCUs for Greater Precession in Timings
6.2 Free-Running Counter and Real-Time Control
6.2.1 Overflows of Free-Running Counter
6.2.2 Using an Output-Compare Register Along with a Timer Running as a Free-Running Counter
6.2.4 Programming for a Delay Using Out-Compare after an External Input-Capture
6.3 Real-Time Clock Interrupts
6.5 Interrupt Interval and Density Constraints
6.5.1 Interrupt Service Latency
6.5.2 Examples of Interrupt Service Latency Calculation
6.5.3 Interrupt Service Intervals
6.5.4 Fraction of Time Spent by the CPU in the RTC Interrupt-Service
6.5.7 Advantage of Combined Instructions for Reducing Interrupt Density
Fill in the Blanks Type Questions
Chapter 7 System Design: Peripherals and Interfacing
7.1 Serial UART and USART Communication Interfaces
7.1.1 Serial Interface in 8051
7.1.5 Interfacing to Processor and DCE
7.2 Parallel IO Ports Interface 8255
7.2.2 Interfacing 8255 to Processor
7.3.1 Methods for IO Transactions
7.3.3 Interfacing to 8086, 8051, 8096 and 68HC11/12
7.4 Programmable Interrupt Controller 8259
7.4.1 Interfacing 8259 to Processors
7.7 Inter-Integrated Circuits Interfacing (I2C Bus Standard)
Fill in the Blanks Type Questions
Chapter 8 Systems Design: Digital and Analog Interfacing Methods
8.1 Interfacing of the Key (Switch), Keypad and Keyboard
8.1.1 A Single Key (switch) and Its Interface
8.1.2 Bounces in a Key (switch)
8.1.3 Removing Bounce Effects on Input State from Key Using Hardware
8.1.4 Array (Row) of Keys and Its Interface
8.1.5 Keypad (Matrix of Keys) and Its Interfacing
8.1.6 Keyboard and Its Interfacing
8.2 Debouncing Program Examples for Key/Switches
8.3.2 Array of LEDs or Annunciators
8.3.3 Array of LEDs in a 7-Segment Hex-Digit
8.4 Alphanumeric Devices—Display Systems and Their Interfaces
8.4.1 Alphanumeric Display by Sixteen-segment Display Systems
8.4.2 Dot-matrix Display Systems for Multilingual, Multi-fonts and Graphic Displays
8.5.4 Interfacing with LCD Controller
8.6 Touch Screen and Touch -Screen Controller
8.6.3 Touch-screen Software Driver
8.6.4 Software Functions Library to Enable Developing of the Applications
8.6.5 Multi-touch and Multi-touch Controller
8.7 Keyboard-Cum-Display Controller (8279)
8.7.1 Keyboard-cum-Display Controller 8279
8.7.3 Programming Aspects of8279
8.8.1 Parallel Centronics Interface — A Printer Interface
8.8.2 Serial RS232C Interface for a Print Controller in a Printer
8.9 Programmable Interface for Instruments using IEEE488 (GPIB) Bus
8.10 Interfacing of 8051 MCU with External Memory
8.11 Interfacing with Flash Memory
8.11.1 Programming the Flash Memory Chip
8.12 Interfacing with MCU IO Port using Optoisolator
8.13 Interfacing with Inductive Circuit
8.14 Interface for a Loudspeaker
8.15 Interfacing the Keypad and Speaker in a Music Playing system
8.16 Interface for Stepper Motor(s) in a Robot or Printer or Industrial Drive
8.17 Analog Inputs Interface with the MCU
8.17.1 Interfacing Thermocouple
8.17.2 Interfacing Load Cell— Electronic Weighing Machine
8.17.3 Interfacing - Precision Weighing Machine
8.18 Analog Output Generating Interface with MCU
8.19 Using PWM for DC Motor Control
8.21 Interfacing to High Power Devices
8.21.1 Interfacing for the Input and Output Modules
8.21.2 Interfacing with AC and DC High Power Motors
8.21.3 Interfacing with the Heater (Furnace)
8.21.4 Interfacings Power Devices Using Advanced Microcontrollers
8.22 Optical Motor Shaft Encoder
8.22.1 Incremental Rotation Encoder
8.22.2 Rotatory Absolute Angle Encoder
8.22.3 MCU-based Scale for Measuring Linear Position
8.23 Industrial Control Interface
8.23.1 Automatic Control Applications
8.24 Industrial Process Control System
8.25 Measurement Applications and Prototype MCU-based Measuring Instruments
8.26 Robotics and Embedded Control
8.27 Digital Signal Processing and Digital Filters
8.27.1 Digital Signal Processing (DSP)
Fill in the Blanks Type Questions
Chapter 9 Programming in Assembly
9.1 Programming Basics for Assembly Language Programming
9.1.1 Benefits of Assembly Language Program (ALP)
9.1.5 Assembly Language Program
9.1.6 Program Steps for Basic Instructions
9.1.7 Default Settings for the Ports, Timer and Interrupts on Reset in 8051
9.1.8 Programming Approach for the Foreground (Main) Program
9.1.9 Program Approach for Programming ISR Instructions
9.1.10 Default Settings for the A, B, PSW, DPTR and SP on Reset in 8051
9.2 Programming Examples for Ports
9.2.1 Programming All 8-bits of a Port Simultaneously
9.2.2 Programming Individual Port Bits
9.3 Programming Examples for Timers
9.3.1 Programming the Mode 0, 1, 2 and 3 of the Timer
9.3.2 Programming a Delay by Using Loop Instructions
9.4 Program for Blinking of LEDs
9.5 Program for Real-Time Clock Interrupts
9.6 Program for Pulse Width Modulated (PWM) Outputs
9.7 Program for LED Brightness Control Using Pulse Width Modulated (PWM) Output
9.8 Program for a DC Motor Speed and Direction Control Using PWM
9.9 Programming Examples for Serial Port
9.9.1 Serial Synchronous (USRT) Communication Mode 0
9.9.2 Serial Asynchronous (UART) Communication Mode 1
9.9.3 Serial Asynchronous (UART) Communication Mode 2
9.9.4 Serial Asynchronous (UART) Communication Mode 3
9.10 Programming Examples for INT0 and INT1 Interrupts
9.11 Programming Examples for Read and Write at External Data Memory
Fill in the Blanks Type Questions
10.1.1 Use of High-level Language Like ‘C’
10.2 Memory Constitution, Constants, Variables and Data Types In 8051
10.2.1 Memory Constitution in 8051
10.2.5 Static, Extern, Register and Auto Storage Classes
10.3 Arrays, Structures and Unions
10.5 Loops and Decisions—Control Structure Constructs
10.6 Functions and Library Functions
10.9 Program Build Process and Development Tools
10.10 C Compilers—GNU, SDCC and Keil
10.11 Comments, Signs and Names in C Programs
10.12 Programming Examples for Ports
10.12.1 Using All 8-bits of Port Simultaneously
10.12.2 Using Individuall Port Bit
10.13 Programming Examples for Timers
10.14 Programming Examples for Serial Port
10.15 Programming Examples for Interrupts
10.16 Programming Examples for External Data
10.17 Programming Examples for Real-Time Clock
Fill in the Blanks Type Questions
Chapter 11 Real-time Operating System for System Design
11.1 Real-Time Operating System
11.1.2 Tasks in a Multi-tasking System and Real-time Operating System (RTOS)
11.1.3 Inter-Process Communication (Inter-Task Message) Functions
11.1.4 Real-time Operating System
11.1.5 Task Characteristics in a Multi-tasking System
11.1.6 Semaphores and Mailboxes
11.2.2 Using RTOS Functions for Preemptive Scheduling in RTX51
11.2.4 C Functions in RTX51 Tiny
11.2.5 C Functions in RTX51 Full
11.3 Use of RTOS in System Design
11.3.1 Simple Program Examples for Use of RTX51 in Design
11.3.2 Case Study of Traffic Light and Use of RTOS in Design
11.3.3 RTOS Functions for Design of Baby Weighing Machine
11.3.4 Case Study of Toffee Vending Machine and Use of RTOS in Design
Fill in the Blanks Type Questions
Chapter 12 Development Tools for Microcontroller Applications
12.1 Development Phases of a Microcontroller Based System
12.2 Software Development Cycle and Applications
12.3 Software Development Tools
12.3.1 Integrated Development Environment (IDE)
12.3.2 Open Source IDE and Tools
12.3.5 Macro Assembler and Dissembler
12.3.6 Library and Library Manager
12.3.7 Linker/Locator and Hex File Generation
12.4 Example of an IDE—μVision and Tools from KEIL
12.4.6 OC51 and OH51 Banked Object File Converter and Object to Hex Converter
12.5 Emulator and in-Circuit Emulator (ICE)
12.5.1 In-circuit Emulator (ICE)
12.5.2 Joint Test Action Group (JTAG)
Fill in the Blanks Type Questions
Chapter 13 PIC Family Microcontrollers
13.2.1 Overview of the Internal Hardware in PIC MCU
13.2.2 Architecture of PIC Microcontroller
13.2.3 Features of the CPU of PIC 16F877
13.3 Memory and Memory Map in Microchip PIC Family MCU System
13.3.1 On-Chip SFRs/GPRs/Internal RAM, Program Memory and Data EEPROM
13.3.2 On-Chip Data Memory RAM
13.3.4 SFR Addresses in Data Memory
13.4.1 Serial Ports— MSSP and USART
13.5.2 Compare Outputs and Interrupts Using CCP1 and CCP2
13.5.3 Software Timer Interrupts Using CCP1 and CCP2
13.5.4 Input Captures Using CCP1 and CCP2
13.5.5 Pulse Width Modulated Output
13.7.1 Maskable Sources of Interrupts
13.7.2 Servicing of Interrupts
13.8 Instructions and Instruction Set
13.8.3 PIC 16F877Instruction Set
Fill in the Blanks Type Questions
Chapter 14 16-BIT Microcontrollers: 8096/80196 Family
14.1.1 Overview of the 80196 CPU and Internal Address and Data Buses
14.2 Memory Map in Intel 80196 Family MCU System
14.2.3 External Program/Data Memory (PROM/RAM) Space
14.5.3 Start ofADC Using T1 or T2
14.6 High-Speed Inputs and Input Captures
14.7 Pulse Width Modulated Output
14.8.1 Non-maskable and Maskable Sources of Interrupts
14.8.2 Servicing of Interrupts
14.9 Instructions and Instruction Set
Fill in the Blanks Type Questions
Chapter 15 32-Bit ARM7, ARM9 AND ARM MCUs: Architecture, Programming and Development Tools
15.1 Introduction To 16/32 BIT Processors
15.7.1 32/16-bit ARM Instruction Set
15.7.2 Data Transfer, Bit Clearing and Masking Instructions
15.7.3 Arithmetic Operation Instructions
15.7.4 Logic Operation Instructions
15.7.6 Program Flow Control Instructions
15.7.7 SWI Interrupt Control Instruction
15.7.8 Formats of 32-bit Instruction
15.8 Thumb® Instruction-Set Extension
15.8.2 Thumb Instruction Format
15.8.3 ARM/Thumb Inter-working
15.9 Exception Handling in ARM
15.11 Porting Developed Codes in ARM Based System
15.13 Assembly and C Programming (GNU Tools)
Fill in the Blanks Type Questions
Chapter 16 Motorola MC68HC11/12 Family
16.1.1 CPU Registers and Internal Buses
16.1.5 On-Chip Registers (RAM) at 256-byte Address Space 256 Bytes
16.1.6 On-Chip Program and EEPROM
16.1.7 64 Byte Space for Internal-device Function Registers
16.1.8 Addressable Register Space of 192 B Internal RAM
16.2 Addressing Modes and Instructions
16.2.1 Addressing Modes in the Instruction Set
16.3.1 General-purpose Parallel Port IO Interface
16.3.2 Memory Interfacing, IO Additional Ports andIO Interfacing
16.4.1 Non-maskable, Maskable Sources of Interrupts and Reset
16.4.2 Servicing of Interrupts
16.5.1 Timing Signal Generation—TCNT Overflow and Real Time Clock Interrupts
16.5.3 Timing Measurements of External Event
16.5.7 Pulse Accumulator Counter
16.6 Applications of Analog Interfacing
Fill in the Blanks Type Questions
Solutions to Multiple Choice Questions