Microcontrollers: Architecture, Instruction Sets, and Interfacing
Classified in Computers
Written at on English with a size of 3.86 KB.
Microcontrollers, Microcomputers, and Microprocessors
Microcontroller: Processor, memory, and I/O ports integrated on a single chip.
Microcomputer: A small computer.
Microprocessor: Example: Intel x86.
Von Neumann Architecture
Components:
- Processor (Control Unit, ALU, Registers)
- Memory (RAM - Volatile, ROM - Non-Volatile)
- I/O
A single bus interconnects the processor, memory, and I/O.
RISC vs. CISC
Feature | CISC | RISC |
---|---|---|
Instruction Set | Complex Instruction Set Computer | Reduced Instruction Set Computer |
Instructions | Multi-cycle, complex instructions | Mostly single-cycle, reduced instructions |
Instruction Types | Many, varying length | Few, fixed length |
Complexity | Hardware | Software |
Code Size | Small | Large |
Examples | Intel (x86), Freescale 9S12 | MIPS, ARM, SPARC, PowerPC |
RAM vs. ROM vs. CPU Register
Feature | RAM | ROM |
---|---|---|
Elaboration | Random Access Memory | Read-Only Memory |
Volatility | Volatile | Non-volatile |
Working Type | Read, Write | Read Only |
Storage | Temporary Information | Software, Fixed Constant Data |
Speed | Fast | Slow |
Cost | High | Low |
Chip Size | Large | Small |
Types | SRAM, DRAM | PROM, EPROM, EEPROM |
Functional Units
- ALU: Logic circuits for arithmetic and logic operations (addition, subtraction, AND, OR, etc.).
- Control Unit: Timing and control circuits for fetching program instructions and data from memory sequentially.
- Registers: Typically 16 or 32 registers for holding data, addresses, etc.
TM4C123
- Microprocessor – Instruction Set: CISC vs. RISC
- Memory:
- Non-Volatile: ROM, EPROM, EEPROM
- Volatile: RAM (DRAM, SRAM)
- I/O Interfaces: Parallel, Serial, Analog, Time
Cortex-M4 Architecture and Related Concepts
- Cortex-M4 architecture
- Von Neumann vs. Harvard architecture
- Cortex-M instruction set features
- TM4C memory address space
- Big and little endian
Assembly Language Programming
- Cortex-M assembly instructions
- Assembly addressing modes
- Understanding assembly programs
Input/Output (IO) with TM4C
- TM4C I/Os
- I/O register address calculation
- I/O port initialization and coding (direct register access)
- Friendly software (set, clear, toggle)
- LED and switch interfacing
- Positive and negative logic
Advanced I/O and Interrupts
- Bit-specific addressing
- Generating delays using
SysCtlDelay()
GPIOPinRead()
/GPIOPinWrite()
Clocks and Interrupts
- Generating specific clock frequencies using
SysCtlClockSet()
- Interrupt concepts
- Interrupt conditions
- Interrupt vector table
- Edge-triggered interrupt configuration
Interrupt Handling
- Interrupt context switch
- Shared interrupt vector
Timers and Periodic Interrupts
- Periodic interrupt configuration
- General purpose timer configuration for periodic interrupts