Lecture 1 Flashcards
Microcontroller
Integrated circuit device to control electronic system via microprocessor unit, memory, peripherals
Function of CPU
- Logic computation
- To execute instructions from the program
Function of memory
To store data (What the program works on) and instructions (tells the program What to do)
Function of I/O interface
Communication between internal storage and external I/O devices
Function of system bus
Transit data between all the major components of a computer system, such as I/O interface, memory, and CPU
General structure/components in Microcontroller
CPU, I/O interfaces, memory, interrupt control, timers/counters + clock, USART, other peripherals
2 types of I/O interfaces
Serial and parallel interface
2 types of memory
RAM (random access memory) and ROM (read only memory)
In the system bus, there are 3 types of buses
Control bus (used by the CPU to communication w devices by directing data from/to Its components), address bus (allows the CPU to transmit the location of the data to the RAM)(unidirectional)(width determines the amount of memory a system csn address), data bus (allows for data transfer to the CPU)(bi directional)(send and receive data)(width determines the data transferring rate)
Serial interface
Communication interface between 2 digital system by transmiting a series of voltage pulses
UART
Chip that transmit and receive serial data
RAM
Temporary data storage
ROM
Used to store microcontroller’s program
Interrupt
Based on external/internal hardware event, causes the CPU to response by executing a group of specific instructions
Timer/counter
To count in sync with the Microcontroller’s clock
Difference (Microcontroller)
- less performance
- does not drain power
- need to respond to real time
- cheap
Difference (microprocessor)
- high performance
- drain power
- no need real time
- expensive
- general computing
Criteria to consider When finding a Microcontroller
- enough space
- speed
- I/O requirements (interfaces, ports)
- cost
- development support
+ of Microcontroller
- less space
- less power
- cheap
Assembly
Low level programming with 35 instructions
Clock frequency of PIC and Arduino
PIC - 4MHz
Arduino- 20MHz
Compiler
changes to a format where the computer can understand