Prelim Notes
Prelim Notes
First Processors
Basic Technologies:
o Semiconductor
o Magnetic
Address, Data, and Control Bus
o Optical(or combination) The three components – MPU, memory, and I/O – are
StaticR/WM connected by a group of wires called the BUS
o 4/6 transistor to save a single bit Address bus
o Volatile o consists of 16, 20, 24, or 32 parallel signal lines
o Fast but expensive (wires) - unidirectional
Dynamic R/WM o these lines contain the address of the memory
o one transistor and one capacitor to store a bit location to read or written
o Leakage problem, thus requires refreshing Control bus
o Used for dynamic data/program storage o consists of 4 to 10 (or more) parallel signal
o Cheap and slow lines
o CPU sends signals along these lines to memory
Erasable ROMs
and to I/O ports
o examples: Memory Read, Memory Write, I/O
Marked Programmed ROM
Read, I/O Write
o Programmed by the manufacturer
Data bus
Programmable ROM (PROM)
o consists of 8,16, or 32 parallel signal lines
o Can be programmed in the field via the
o bi-directional
programmer
o only one device at a time can have its outputs
Erasable Programmable ROM (EPROM)
o Uses ultraviolet light to erase (through a enabled,
o this requires the devices to have three-state
quartz window)
o OTP refers to one-time programmable output
o Electrically Erasable Programmable ROM
Microcontrollers
(EEPROM)
o Each program location can be individually A microcontroller is a complete microprocessor system,
erased consisting of microprocessor, limited amount of ROM or
o Expensive EPROM, RAM & I/O ports all built on a single integrated
o Requires programmer circuit.
FLASH Microcontroller can be used to perform control
o Can be programmed in-circuit (in-system) functions so it is comparable with a microcomputer.
o Easy to erase (no programmer) It must include full or nearly full implementation of a
o Only one section can be erased/written at a standard microprocessor, ROM or EPROM, RAM, parallel
time (typically 64 bytes at a time) I/O ports, serial ports, timer, clock.
More complex than a microprocessor. Microcontroller Unit (MCU): Block Diagram
An integrated electronic computing and logic device that RISC (Harvard)
includes three major components on a single chip o Reduced instruction set computer
o Microprocessor o Simple operations
o Memory o Simple addressing modes
o I/O ports o Longer compiled program bust faster to
Includes support devices execute
o Timers o Uses pipelining
o A/D converter CISC (Von Neuman)
o Serial I/O o Complex instruction set computer
o Parallel Slave Port o More complex instructions (closer to high-level
All components connected by common communication language support)
lines called the system bus. Bench marks: How to compare MCUs together
MIPS: Million Instructions / second (Useful when the
Microcontroller Architectures compilers are the same)
Embedded controllers
No operating systems
Execute a single program, tailored exactly to the
controller hardware
Assembly language (vs. High-level language)
Not transportable, machine specific
Programmer need to know CPU architecture
Speed
Program size
Uniqueness
Common Microcontrollers
Atmel
ARM
Intel
o 8-bit
8XC42
MCS48
MCS51
8xC251
o 16-bit
MCS96
MXS296
National Semiconductor
o COP8
Microchip
o 12-bit instruction PIC
o 14-bit instruction PIC
o PIC16F84 PERIPHERAL INTERFACE CONTROLLER
o 16-bit instruction PIC
NEC PIC: Peripheral Interface Controller
Motorola Microchip Technology (www.microchip.com)
o 8-bit Harvard Architecture
68HC05 Origin: Harvard Architecture for DAPRA Project
68HC08 Beaten by Princeton (Single memory)
68HC11 Picked by Signetics 8x300
o 16-bit PIC for General Instruments
Compensation for poor I/O
68HC12
GI spun off into Arizona Microchip
68HC16
Technology (1985)-Microchip Technology
o 32-bit
683xx
Texas Instruments
o TMS370, 16/32 bit
o MSP430 , 16 bit
Zilog
o Z8
o Z86E02
First Microcontrollers
Applications of Microcontrollers
MICROCONTROLLER SOLUTION
Microcontroller features
o CPU – processing unit
o Non-volatile program memory
o Re-settable non-volatile data memory
(EEPROM)
o RAM for data storage
o Direct support for various input/output Antilock braking – 16-bit
Up to fifty 8-bit microcontrollers for functions of
SOME TYPICAL APPLICATIONS Wiper control
Electric Mirrors
Automotive air bag systems
Air Bags
Remote control
Handheld tools AUTOMOTIVE TODAY CONTINUED
Appliances – coffee pot, mixer, stove, refrigerator, dish
washer, washer, dryer Up to fifty 8-bit microcontrollers for functions of
Major home systems – heating and cooling Wiper control
Cordless phones and cell phones
Electric Mirrors Addressable up to 8Kx14-bit
Air Bags FLASH Memory
Fuel pump Reset Vector: $0000
Speedometer Interrupt: $0004
Security system
Climate control system
Power windows
FREQUENCY OF BRANCHES
PROGRAM MEMORY
13-bit
PC
INTRODUCTION TO ARDUINO
ARDUINO
single-board microcontroller,
intended to make the application of
interactive objects or environments
more accessible .
Designed to make the process of
using electronics multidisciplinary projects more
accessible
Sense the environment by receiving input from variety
of sensors.
Affect its surroundings by controlling lights, motors, and
other actuators.
BRIEF HISTORY
In 2005, a project was initiated to make a device for Bugs? Presents to PC as a mouse or keyboard
controlling student-built interactive design projects that
was less expensive than other prototyping systems DUE
available at the time.
Much faster
Founders Massimo Banzi and David Cuartiellesnamed
processor, many
the project after Arduin of Ivrea and began producing
more pins
boards in a small factory located in Ivrea.
Operates on 3.3 volts
Similar to Mega
The Arduino Uno can be programmed with the Arduino When size matters: Micro, Nano, Mini
software IDE(integrated development environment) . Includes all functionality of the Leonardo
The Atmega328 on the Arduino Uno comes preburned Easily usable on a breadboard
with a Bootloader that allows you to upload new code to
it without the use of an external hardware programmer.
You can also bypass the Bootloader and program the
microcontroller through the ICSP (In-Circuit Serial
Programming) header.
Arduino IDE works on windows , linux as well as Mac lion
X platforms.
ARDUINO TYPES
LEONARDO
Compared to the
Uno, a slight
upgrade.
Built in USB
compatibility
Digital inputs will come to the Arduino as either on or off
(HIGH or LOW, respectively).
o HIGH is 5VDC.
o LOW is 0VDC.
CONFIGURING THE ARDUINO
Analog inputs will come to the Arduino as a range of
Defaults to COM1, will probably need to change the numbers, based upon the electrical characteristics of the
COM port setting (my work PC uses 7). circuit.
Appears in Device Manager (Win7) under Ports as a o 0 to 1023
Commport o .0049 V per digit (4.9 mV)
o Read time is 100 microseconds (10,000 a
ARDUINO C
pinMode(pin, mode)
o Designates the specified pin for input or
output
digitalWrite(pin, value)
o Sends a voltage level to the designated pin second)
digitalRead(pin)
o Reads the current voltage level from the ANALOG INPUT-APPLICATION
designated pin
The variable resistor can be replaced with a sensor.
analog versions of above
For example, a photo resistor.
o analogRead's range is 0 to 1023
Depending upon the light level at the photo resistor:
serial commands
o Turn on a light
o print, println, write
o Increase or decrease the brightness of an LED
(or an LED array)
Most sensors are simply variable resistors, but vary their
resistance based on some physical characteristic.
SENSORS
INPUTS
Sensors that only vary their resistances require a circuit Hierarchy: computers control controllers, controllers
called a voltage divider to provide the Arduino a voltage. control hardware.
ADVANTAGES OF ARDUINO
Open source
Simplified and user-friendly programming language
No additional programmer/burner hardware required
for programming board
Portable
Low power consumption
Best for beginners
DISADVANTAGES OF ARDUINO
PIC VS ARDUINO
Disadvantages
Robotics,
Electrical appliances based on IR, smart home
automation,
the fault recognition use in an underground cable.