Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee ١ Agenda What is microprocessor system? What is Microcontroller/embedded system? Definition of Embedded Systems Examples Computer Essentials Microprocessors and Microcontrollers PIC Microcontrollers PIC 12 series PIC 16 series 16f84 ٢
What is microprocessor system? Microprocessor (MP) is an electronic micro chip or integrated circuit, contains millions of transistor. MP is capable of carrying out tens of arithmetic and logic operations, in a very high speed (scale of Nano seconds). MP runs instructions coded using, Machine Language; such as, assembly (assembly is an easy low level language that human can understand and write). ٣ Pieces of assembly code, are combined together to build something called routine or macro that enable microprocessor to execute complex tasks, such as solving differentials equations, drawing graphs, moving mouse cursor, etc ٤
MP is just a brain. It can t work alone. It needs a lot of peripherals to support its operations, such as, RAM, ROM, Interfaces, Busses, and so on.. Address bus CPU ROM RAM I/O interface I/O devices Data bus Control bus ٥ MP can be considered as the main block of modern computers, mobile phones, tablets, or even a complex system (advanced and enormous) such as, medical instruments, and industrial machines ٦
A computer is a programmable machine that receives input, stores and manipulates data//information, and provides output in a useful format. ٧ What is Microcontroller/embedded system? Microcontroller is a simple version of microprocessor. MC can work alone, and you don t need to build an enormous board to bring MC into action. Just connect clock source then power up. MC Address bus CPU ROM RAM I/O interface I/O devices Data bus Control bus ٨
As we see, microprocessor need many other peripherals and components to work. So it s not reasonable to build such enormous board to execute minor and simple operation like displaying clock on LCD or control some appliance. ٩ So MC as a limited or light version of microprocessor, it has its own small ROM, RAM, interface bus, counters,. Etc It s expected that MC is slower than MP. ١٠
That means with using single IC and clock source, and suitable power supply, you can build a programmable device to control a few appliances or even build a simple controller to be embedded in the appliance itself. ١١ Definition of Embedded Systems An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. Embedded systems control many devices in common use today. ١٢
Examples: Refrigerator ١٣ Examples: Car Door ١٤
Examples: Game : Electronic Pingpong ١٥ Examples: Derbot Autonomous Guided Vehicle ١٦
١٧ Example : DG starter card ١٨
١٩ DG starter card demo ٢٠
Example : movement/intruder detector ٢١ ٢٢
Modern open source embedded systems The Arduino microcontroller is an open source hardware controller which is designed to easily interface with a variety of sensors (to register user inputs), and to drive the responses and behaviors of external components such as LEDs, motors, and speakers (to respond to user inputs) ٢٣ PWR IN USB (to Computer) RESET SCL\SDA (I2C Bus) POWER 5V / 3.3V / GND Analog INPUTS Digital I\O PWM(3, 5, 6, 9, 10, 11) ٢٤
Arduino is a small mother board, that has it s clock generator, power source, USB interface, and of course boot loader. Arduino is expandable MC, you can buy extra upgrade board for WiFi, GSM, Ethernet, Motor driver, LCD, etc. Arduino is programmed using high level language (mixed between C and Java), there is no assembly any more. ٢٥ Example of Arduino Project : parking alarm ٢٦
Basics ٢٧ Instruction Sets CISC: Complex Instruction Set Computer RISC: Reduced Instruction Set Computer Memory Types Volatile: Random Access Memory (RAM) Non volatile: Read Only Memory (ROM) ٢٨
Von Neumann and Harvard Computers ٢٩ Review of Memory Technologies Read Only Memory (ROM) Random Access Memory (RAM): Read/Write Static RAM (SRAM): Each cell is a simple flip flop of six transistors, CMOS, volatile Programmable ROM (PROM): Each cell is one transistor, MOS, non volatile, plastic package. Erasable PROM (EPROM): Each cell is one transistor, MOS, non volatile, erasable with ultraviolet light, ceramic package with quartz window. ٣٠
Electrically EPROM (EEPROM): Each cell is one transistor with additional transistors for programming, MOS, non volatile, erasable electrically (takes time), suffers from wear. Flash Memory: Each cell is one transistor, MOS, non volatile, erasable electrically (takes time) in blocks, suffers from wear, popular. ٣١ Microprocessors and Microcontrollers The microprocessor is a processor on one silicon chip. The microcontrollers are used in embedded computing. The microcontroller is a microprocessor with added circuitry. ٣٢
Microcontrollers ٣٣ Microcontroller Packaging and Appearance From left to right: PIC 12F508, PIC 16F84A, PIC 16C72, Motorola 68HC05B16, PIC 16F877, Motorola 68000 ٣٤
Thanks,.. See you next week (ISA), ٣٥