Professional Documents
Culture Documents
Lecture 1,2,3,4,5,6,7,8
Lecture 1,2,3,4,5,6,7,8
ROBOTICS
Computational Devices
VI To Compute = To Calculate
Essential Features of a computing device –
1) Input data
Vishwakarma Institute of Technology
2) Processing units
3) Output i.e. Answer
Additional Features –
1) Storage of the data and output
2) To retrieve the data and output when required
3) Print / Display / Transfer the output
4) Make changes in the process
Role of Flip-flops
VI • Storage and Retrieval of the Data.
• Flip-flop is the basic unit which can do this.
• Thus called as basic building block of memory.
Vishwakarma Institute of Technology
Lecture 2
VI
Vishwakarma Institute of Technology
Classification of Embedded Systems
VI
Vishwakarma Institute of Technology
Lecture 3
Microprocessor and Microcontroller
VI
Vishwakarma Institute of Technology
Microcontroller
VI • It’s like a small computer on a single IC.
• It contains a processor core, ROM, RAM and I/
O pins.
Vishwakarma Institute of Technology
peripherals to work.
• Microprocessors are not made for specific task but they
are required where tasks are complex and tricky like
development of software’s, games and other
applications that require high memory and where input
and output are not defined.
Lecture 4
Memory
VI •Memory is an important part of an embedded system. The memory
used in embedded system can be either Program Storage Memory
(ROM) or Data memory (RAM) .
Vishwakarma Institute of Technology
•The primary advantage of MROM is low cost for high volume production.
MROM is the least expensive type of solid state memory.
•Different mechanisms are used for the masking process of the ROM, like
1.Creation of an enhancement or depletion mode transistor through
channel implant
2.By creating the memory cell either using a standard transistor or a high
threshold transistor.
3.In the high threshold mode, the supply voltage required to turn ON the
transistor is above the normal ROM IC operating voltage.
4.This ensures that the transistor is always off and the memory cell
stores always logic 0.
Masked ROM (MROM):
VI •The limitation with MROM based firmware storage is the inability to modify
the device firmware against firmware upgrades.
•The MROM is permanent in bit storage, it is not possible to alter the bit
Vishwakarma Institute of Technology
information
Programmable Read Only Memory (PROM) / (OTP)
•It is not pre-programmed by the manufacturer
VI
•The end user is responsible for Programming these devices.
•PROM/OTP hasnichrome orpolysilicon wires arranged in a matrix,
Vishwakarma Institute of Technology
of an FET
•Bit information is stored by using an EPROM Programmer,
which applies high voltage to charge the floating gate
•EPROM contains a quartz crystal window for erasing the stored
information. If the window is exposed to Ultra violet rays for a
fixed duration, the entire memory will be erased
•Even though the EPROM chip is flexible in terms of re-
programmability, it needs to be taken out of the circuit board
and needs to be put in a UV eraser device for 20 to 30 minutes
Electrically Erasable Programmable Read Only Memory
(EEPROM):
VI • Erasable Programmable Read Only (EPROM) memory
gives the flexibility to re-program the same chip using
electrical signals
Vishwakarma Institute of Technology
•RAM is volatile, meaning when the power is turned off, all the
Vishwakarma Institute of Technology
Four of the transistors are used for building the latch (flip-
flop) part of the memory cell and 2 for controlling the access.
•Static RAM is the fastest form of RAM available.
•SRAM is fast in operation due to its resistive networking and switching
capabilities
Dynamic RAM (DRAM)
VI •Dynamic RAM stores data in the form of charge. They are made up of MOS
transistor gates .
•The advantages of DRAM are its high density and low cost compared to
Vishwakarma Institute of Technology
SRAM .
•The disadvantage is that since the information is stored as charge it gets
leaked off with time and to prevent this they need to be refreshed periodically .
•Special circuits called DRAM controllers are used for the refreshing operation.
The refresh operation is done periodically in milliseconds interval .
SRAM Vs DRAM
VI
SRAM Cell DRAM Cell
(MOSFET) capacitor
Doesn’t Require refreshing Requires refreshing
Low capacity (Less dense) High Capacity (Highly dense)
More expensive Less Expensive
Fast in operation. Typical access Slow in operation due to refresh
time
requirements. Typical access
is 10ns time is
60ns.
Write operation is faster than
read operation.
VI
Vishwakarma Institute of Technology
Lecture 5,6
VI
Vishwakarma Institute of Technology RAM
VI
Vishwakarma Institute of Technology ROM
Non Volatile RAM (NVRAM):
Control Unit –A control unit (CU) handles all processor control signals. It
directs all input and output flow, fetches code for instructions and controlling
Arithmetic and Logic Unit (ALU) –The arithmetic logic unit is that part of the
CPU that handles all the calculations the CPU may need, e.g. Addition,
Data Bus: It carries data among the memory unit, the I/O devices,
and the processor.
Address Bus: It carries the address of data (not the actual data)
between memory and processor.
fetching fetching
Easier to pipeline so high Low performance
performance compared to Harvard
architecture
Comparatively high cost Cheaper
Characteristic of RISC –
Simpler instruction, hence simple instruction decoding.
Instruction come under size of one word. ( 1 word = 16
bits)
Instruction take single clock cycle to get executed.
More number of general purpose register.
Simple Addressing Modes.
Less Data types.
Pipelining can be achieved , because it uses Harvard
architecture
Computer Organization | RISC and CISC
VI Characteristic of CISC –
A instruction execute in single clock cycle Instruction take more than one clock cycle
memory connections:
Port 2 must be used along with P0 to
provide the 16-bit address for the external
memory.
P0 provides the lower 8 bits via A0 – A7.
P2 is used for the upper 8 bits of the 16-
bit address, designated as A8 – A15, and it
cannot be used for I/O
Port 3
VI Port 3 can be used as input or output.
Port 3 has the additional function of
providing some extremely important
Vishwakarma Institute of Technology
signals
Features of 8051 Microcontroller
VI • 8 - bit CPU with registers A and B
• 16 bit program counter and data pointer
• 8 Bit Program Status Word (PSW)
• 8 Bit Stack Pointer
Vishwakarma Institute of Technology
a specified time interval and used to generate a time delay, for example,
an hourglass is a timer.
A counter is a device that stores (and sometimes displays) the number
of times a particular event or process occurred, with respect to a clock
signal. It is used to count the events happening outside the
microcontroller. In electronics, counters can be implemented quite easily
using register-type circuits such as a flip-flop.
Difference between a Timer and a Counter
VI Timer Counter
at its corresponding to an
external input pin (T0, T1).
Maximum count rate is 1/12 Maximum count rate is 1/24
of the oscillator frequency. of the oscillator frequency.
Timer 0 Register
VI Timer 1 Register
Both Timer 0 and Timer 1 use the same register to set the various
timer operation modes. It is an 8-bit register in which the lower 4 bits
Vishwakarma Institute of Technology
are set aside for Timer 0 and the upper four bits for Timers. In each
case, the lower 2 bits are used to set the timer mode in advance and
the upper 2 bits are used to specify the location.
VI GATE
Every timer has a means of starting and stopping. Some timers do this
by software, some by hardware, and some have both software and
Vishwakarma Institute of Technology
This bit in the TMOD register is used to decide whether a timer is used
as a delay generator or an event manager. If C/T = 0, it is used as a
Vishwakarma Institute of Technology
timer for timer delay generation. The clock source to create the time
delay is the crystal frequency of the 8051. If C/T = 0, the crystal
frequency attached to the 8051 also decides the speed at which the
8051 timer ticks at a regular interval.
Timer frequency is always 1/12th of the frequency of the crystal
attached to the 8051. Although various 8051 based systems have an
XTAL frequency of 10 MHz to 40 MHz, we normally work with the
XTAL frequency of 11.0592 MHz. It is because the baud rate for serial
communication of the 8051.XTAL = 11.0592 allows the 8051 system
to communicate with the PC with no errors.
Timers of 8051 and their Associated Registers
VI
M1 M2 Mode
0 0 13-bit timer mode.
Vishwakarma Institute of Technology
The benefit of auto-reload mode is that you can have the timer to always
contain a value from 200 to 255. If you use mode 0 or 1, you would have
to check in the code to see the overflow and, in that case, reset the
timer to 200. In this case, precious instructions check the value and/or
get reloaded. In mode 2, the microcontroller takes care of this. Once you
have configured a timer in mode 2, you don't have to worry about
checking to see if the timer has overflowed, nor do you have to worry
about resetting the value because the microcontroller hardware will do
it all for you. The auto-reload mode is used for establishing a common
baud rate.
Timers of 8051 and their Associated Registers
Timer 1 is TH0. Both the timers count from 0 to 255 and in case of
overflow, reset back to 0. All the bits that are of Timer 1 will now be
tied to TH0.
When Timer 0 is in split mode, the real Timer 1 (i.e. TH1 and TL1) can
be set in modes 0, 1 or 2, but it cannot be started/stopped as the bits
that do that are now linked to TH0. The real timer 1 will be
incremented with every machine cycle.
Timers of 8051 and their Associated Registers
VI Initializing a Timer
Decide the timer mode. Consider a 16-bit timer that runs continuously,
and is independent of any external pins.
Initialize the TMOD SFR. Use the lowest 4 bits of TMOD and consider
Timer 0. Keep the two bits, GATE 0 and C/T 0, as 0, since we want the
Vishwakarma Institute of Technology
MOV TMOD,#01h
Now, Timer 0 is in 16-bit timer mode, but the timer is not running. To
start the timer in running mode, set the TR0 bit by executing the
following instruction −
SETB TR0
VI Reading a Timer
A 16-bit timer can be read in two ways. Either read the actual value of
the timer as a 16-bit number, or you detect when the timer has
overflowed.
Vishwakarma Institute of Technology