Lecture-5 Development of Memory Chip
Lecture-5 Development of Memory Chip
MEMORY:
If a memory stores N- words of information each word being of
m bits, we say it is a Nxm memory. e.g. 8x4 memory means there are
8 words 4 each word containing 4- bit of information (called nibble). 8
words are stored at 8-memory locations and these memory locations
are clearly identified by addresses. Addresses are formulated by bit
combinations available in wires known as address lines. To identify 8
memory locations we require 3 address lines designed A2A1A0. The
memory locations identify and the corresponding content stored is
shown in table.
A2 A1 A0 Decimal Memory Contents of the
Equivalent Location memory location
0 0 0 0 0 M(0)
0 0 1 1 1 M(1)
0 1 0 2 2 M(2)
0 1 1 3 2 M(3)
1 0 0 4 3 M(4)
1 0 1 5 5 M(5)
1 1 0 6 6 M(6)
1 1 1 7 7 M(7)
Classification of Memory:
In general, semiconductor memories can be clarified in two
main groups random access memories (RAM) and sequential access
memories (SAM).
RAM can be classified in three main groups as shown below.
ROMS:
The type of memory means the content of an address location
can only be read and cannot be written into. The contents of the
memory location are not destroyed whether the power is ON or OFF.
Such a memory is known as non volatile memory. ROMs are used to
store data on permanent basis. They are random access memories
and this makes them very useful for the storage of computer
operating systems, software language computers, look-up tables and
programs for dedicated microprocessor applications. ROMs can only
be read are not written into.
MASK ROMs:
Mask ROMs are programmed by a masking operation
performed on the chip during the manufacturing process. The
contents of a ROM are decided by the manufacture. These contents
are permanently stored in a ROM at the time of manufacturing. The
contents of MROMs cannot be changed by the user. Most desktop
computers use MROMs to contain there operating system and for
execution fixed procedures, such as decoding the keyboard and the
generation of characters for the CRT.
PROMs:
If user needs relatively few ROMs, there is a variation, which
cost more per devices but allows the user to in rest the information.
To avoid the high one-time cost of producing custom mask ROMs, IC
manufacturing provides user programmable ROMs. This device is
called programmable Read only memory. Using special equipments,
called PROM programmers, user can program a PROM- once.
Subsequently one can read the information out of PROM as often as
one wish, but one can never write into it again. Therefore once the
PROM is programmed with correct information it can be used as a
ROM only in microcomputer. If one needs to change or correct the
information stored in the PROM, one must pull it out, throw it away
and replace is with a fresh unused PROM, writing the new on
corrected information into this in used devices. The PROM will hold
its contents indefinitely.
These PROMs are provided with fusible links which are burned
during the programming. Once the data are permanently stored in the
PROMs, it can be read again and again by just accessing the correct
memory location.
EPROMs:
If a mistake is done in programming ROM and PROMs, the
correction cannot be made. The solution of this problem is erasable
PROM (EPROM). An EPROM is an erasable PROM. The contents
are erased by ultra violet light. Therefore, they are also called
UVEPROM. The user can not erase the content of a single memory
location, the entire contents are erased.
EPROMs can be reprogrammed using EPROM programmer.
Once programmed, it can be used as ROM in microcomputer. Later,
if one needs to correct the information stored, it is taken out from the
system, erase the program written, write new program into it and use
it.
The EPROM is erased by exposing an open window in the IC to
an ultraviolet light source for a specified length of time, typical erase
time vary between two and 30 minutes, the EPROM programmed and
providing proper addresses.
An EPROM also holds the information indefinitely once it has
been programmed. One can read the contents of an EPROM as often
as one like.
RMMs:
They are read mostly memories, since they have much slower
write time then read time, there memories are usually suited for
operation where mostly reading rather than, sorting will be performed.
E2PROMs:
E2PROM are electrically erasable PROM. They need not to be
removed from a microcomputer board for erasing. Erasing &
programming E2PROM is much easier as the ultraviolet sources are
not required. The stored information can be erased by applying a high
voltage of about 21V, a singly byte or the entire chip can be erased
in10 mille sec. This is faster than UV erasing and it can be done
easily while the chip is still in circuit, It is also known as EAPROM
(electrically alterable PROM). One can write into at any time without
erasing prior contents. The problems with EAROM are that
electronically they are relatively difficult to use also, they slowly lose
their information.
One application of the E2PROM is in the tuner of a morden TV
set. The E2PROM remember (i) the channel, you were watching
when your tuned off the set (2) the volume setting of the audio
amplifier.
RWMS:
In this type of memory one can either read the contents of an
addressed location in a MEMORY READ operation or one can write a
m bit of data in the addressed memory location in a MEMORY
WRITE operation. It is a volatile memory. It is normally known as
RANDOM ACCESS MEMORY (RAM). The content of RWM shall be
destroyed when the power is OFF. During of MEMORY REALD
operation the content of the addressed location is not destroyed. It is
only read onto the external data bus. During a MEMORY WRITE
operation, however, the original content of the addressed location is
destroyed and the new content takes it placed which is just now
written.
Read/write memories are used for temporary storage of data
and program instruction in a up based septum there are also RAMs,
RWMs are generally called RAMs, RAMMs a specific terms it tells
that the data can be read on written to any memory location,
RAM is classified as either static on dynamic, static RAMs
(SRAMs) flip flops as basic storage elements; whereas the dynamic
RAMs (DRAMs) use internal capacitor as basic storage elements,
additional refresh circuitry is needed to maintain the charge on the
internal capacitor of a dynamic RAM; they have more packing
density, there it has more storage capacity per unit area team a
static RAM, the cast per bit of dynamic RAMs is also much less than
that of the static RAMs.
Non-volatile RAM:
A Non-volatile RAM combines a static RAM and E2PROM into
the same chip. Such a device operates as a normal RAM. If power
supply fails the entire content of RAM are stored in E2PROM by a
single signal . A signal can transfer data from
E2PROM back into the RAM. E.g. x2201 is a non-volatile RAM of 1K
bit. The transfer time is 4msec.
Lecture-7
The symbolic diagram of a static RAM and ROM are shown below:
Figure (a)
The pin details are given below:
GND = +5V and Ground
- address lines
data lines
Programming voltage
= output enables (to enable the output data buffer)
/PROG= dual function pin. While programming HIGH pulse is
applied at this pin and during read operation the chip is selected
enabled by making pin low.
The above procedure is repeated for all location to programme all the
2K memory location. One can programme 2716 partly as required. All
the above actions are carried out in separate unit known as EPROM
programmer. It requires only 100sec to programme all the memory
locations.
Once the programme is written down in memory chip, it cannot be
erased. If we want to change it we put it in UV eraser and erase it and
then programme it again.
The wave forms of the chip show that the data out puts became valid
after a delay for setting up the addresses on enable the chip on
inability the output whichever is completed last.
Fig (b)
The truth table for control signals are as follows:
Operation REMARKS
The data available on the data bus shall
0 0 X WRITE be written on the addressed location. The
original contents are lost. The new labes
it place
The content of the addressed location is
0 1 0 READ READ on to the output data line 0-00. The
content other addressed location is not
destroyed.
No
0 1 1 operation Output is Tri state.
*tri stated
No
1 * * operation Output is Tri state.
tri stated
The two chips 2716 and 6116 are pin by pin compatible and can be
used in place of other. The pin by pin compatibility of 6116 with 2716
has a advantage. In the initial stage of a programme development we
fix up 6116 in the 24 pin socket provided on the microcomputer and
develop the programme. After a lot of effort we are ready with a
permanent programme. Once the programme is completely tested
and satisfactory then using a PROM programmer the programme can
be transferred to 2716 ROM for permanent storage. Thereafter, 2716
can be put directly to the same socket occupied by 6116. A simple
jumper should be provided for pin no 21. This is shown in figure
below.
Lecture-8
Dynamic RAM chip:
A dynamic RAM comprises storage cells that may be thought of
eclectically as capacitors there are many thousands of these
capacitors, or storage cells on a dynamic RAM chip, each all is
capable of storing one bit of information.
The capacitor that makes this storage cell is not ideal. That is,
change placed on this capacitor will leak off given enough time. In a
DRAM, the change on the capacitor represents the stored data.
Therefore, the data stored in the cell can be lost. A more accurate
model of the storage cell is a capacitor in parallel with a resistor.
: When the up has output the col address on the A5-A0 lines, the
line is assented internally.
DIN: Data is stored in the cap cell by making this line o or 1. After
the row & ecol address are latched internally, the up writer to the cell
by places data on this line.
DOUT: Data is read from the RAM chip their line, after the row & col,
address are latched internally, the selected cell entreats are output to
the line.
Lecture-9
Intel 8085 Microprocessor
It is a 40-pin DIP(Dual in package) chip, base on NMOS technology,
on a single chip of silicon. It requires a single +5v supply between
Vcc at pin no 40 and GND at pin no 20. It can address directly 216
memory locations or 6536 memory locations or 64k memory locations
using 16 address line (A15-A0).
Pin no 28 to 21 gives as the higher order 8 bits of the address (A15-
A8).these 8- address lines are uni-directional tri-state address lines
these address lines becomes tri-state under three conditions namely.
(a) During DMA (direct memory access )operation
(b) When a HALT instruction is executed
(c) When is being RESET.
A15-A8 at pin no 19 to pin no 12 pin no 19 to pin no 12, marked A7-
A0 is used for dual purpose. The during it operation shall move
from one state to the other. There are ten (10) different states for the
R7.5 FLIP-FLOP
The RST 7.5 control signal input is a LOW to HIGH transition
active interrupt control signal input. The LOW to HIGH transition of
the signal is registered in R7.5 FLIP-FLOP. Whenever M7.5 FLIP-
FLOP is CLEAR, the output of R7.5 is sensed and recognized as an
interrupt by the R7.5 FLIP-FLOP can be CLEAR through the
same SIM instruction. It is for the user to make use of these facilities.
With the above explanation, we can write the logic expression for the
logic variable, VALID INT.
VALID INT = 0 when none of the interrupt control signal input are
interrupting the microprocessor and VALID INT = 1 when any of the
interrupt control signal is active. Thus
VALID INT= TRAP+ INTE [INTR+R7.5 + RST 6.5 + RST
5.5 ]
These control signal are normally HIGH and becomes active LOW
during T2 state and goes back to HIGH during T3 state. In between T2
& T3 states any no of WAIT states Tw can be inserted.
The three crossed bits are redundant bits and not used. They can be either 0
or 1. It is immaterial but normally forced to be zero. These five bits are
affected as a result of execution of an instruction. All instruction execution
do not affected the flags e.g. data transferring operation do not affect these
flags the arithmetic operation effect all these flags the meaning & the effect
of the fleegs are as follow;
CY CARRY FLAG BIT: this particular bit is SET if there is a carry from the
MSB position during an addition operation or if there is a borrow during the
subtraction operation, otherwise this flag is RESET.
AC- AOXILIARY CARRY FLAG BIT: This bit is SET if there is a carry
from A3 bit to A4 bit of the accumulator during the process of executing
operation connected with an accumulator otherwise it is RESET. The AE
flag is useful for arithmetic & is used in a particular instruction known as
DAA (Decimal adjust accumulates).
Z-ZERO FLAG: Zero flag bit is SET if the result of an operation is zero,
otherwise it is RESET.
S-SIGN FLAG: This flag is SET if the MSB of the result is a 1 otherwise it
is RESET. As an example, let us consider the execution of the instruction
ADDB. ADD is the mnemonic for addition B is the second operand. The
first operand is known to exist as the content of the accumulator. The
meaning of the instruction is add the content of the B register to the content
of A register and store the result back in the accumulator, symbolically, we
write the macro RTL complemented.
A B 1 0100 0000 A
cy 1111 1111 AC
C C 1 C C
Let us suppose C contains (C) =D2H before the execution of the instruction
after the instruction, C shall contains D1H and therefore in not zero.
Therefore the flag register will be affected as follows.
S Z X AC X P X CY
FR = 1 0 0 0 010 0
On the other hand, if a contains 01H just before the execution if the
instruction, C shall contain 00H. Since the result of the operation is 0 the
zero flag shall now be SET to 1. Other flag will be affected in the normal
way.
These flag bits are utilized in many instructions for branding operations
during the execution of a programme normally one of these bits are tested
for TRUE or FALSE condition depending upon the condition the
programme branches. This is shown in fig 18.
REGISTER SECTION:
There are 6-8 bit register designed B, C, D, E, H, & L. all are accessible to
the user. In an instruction these six 8bit register along with the accumulator
A shall be identified by a 8 bit code designated either SSS or DDD.
Whenever SSS is used, it corresponds to service register. Whenever, DDD is
used, it corresponds to destination register. The code used as follows,
SSS or DDD
000 ----- B
001 ----- C
010 ----- D
011 ----- E
100 ----- H
101 ----- L
111 ----- A
Note in the above code 110 is not used. Whenever 110 is used for SSS or
DDD, it means a specific register pair (H,L), together to from 16 bit register
known as memory address register (MAR) or M- pointer.
This is an ALP statement, MOV is the mnemonic for move, and V1, v2 are
the operand register, in the statement, V2 is the source register and V1 is the
destination register. The meaning of the instruction is MOVE the contents of
v2 register into V1 register5. Symbolically this basic operation can be
described by a basic RTL statement (V1) ---- (V2).
This is a single byte instruction. The single byte being the operation code.
The arrangement of the op code single byte is shown in fig 19.
V1 code V2 code
0 1 D D D S S S
Fig 19 (a) gives the example of MOV A, H code for this statement is,
0 1 1 1 1 1 0 0
For move fig 19 (a).
The opcode is read is together 0111 1100 B = 7CH. when the instruction7CH
is executed content of H register shall be transferred to A register. Note
that content of H register is not destroyed. However, the original content of
A register is lost. Let us take another example for the use of code 110.
RP
00 ----- (B, C)
01 ----- (D, E)
10 ----- (H, L)
11 ----- SP --------- (SPH, SPL)
Lecture-13
PROGRAM COUNTER:
Note: If the address information for PC has not been sent out during
T state to the external world, them the PC will not be incremented
using T2 state.
Since the contents of (B, C) & (D, E) reg. pairs are stored at the
top of the stack, these registers are now available for further
computation in the subroutine. At a later stage of execution of the
program after utilizing B, C, D, E registers, there may be a need to
restore the original contents to the respective registers. E.g. at the
end of the subroutine, the data is restored to the proper register.
When POP D is executed the data from the top of the stack is copied
to reg. E, data pointer is incremented by 1, then the next byte of the
saved data is copied from the stack to the reg. D, and SP is further
incremented by 1.
This is similar to previous one but now some data has been
stored in the stack area but these are irrelevant anyway. They will be
destroyed during the next PUSH operation on the stack.
From the above discussion, following points emerge:
1. The stack pointer always points to the top of the stack up to
which it is full with relevant data.
2. Storing or saving the data on stack is known as PUSH
operation.
3. The restoring or reading data from the stack onto certain
internal registers are known as POP instructions.
4. The stack operates on Last in first out basis.
5. The stack pointer can be initialized to the bottom of the stack
but bottom of the stack cannot be utilized to store any useful
data.
6. It is for the user to see that the program area does not overlap
with stack area.
Lecture-14
W-Z:
When a 3-byte instruction containing 2 byte address is to be
executed by the , the first byte is the (op-code) which is fetched
and then decoded by the decoder. Then two memories read m/c
cycles are executed to read the two byte address one in each m/c
cycle and placed in W-Z register. During instruction execution, (in
next m/c cycle), the addr in W-Z register pair is transferred to the
address latch to address memory or I/O for data transfer.
Interrupt Control Section:
Sometimes it is necessary to interrupt the execution of the main
program to answer a request from an I/O device. For instance, an I/O
device may send an interrupt signal to interrupt control unit to indicate
that data is ready for input. The temporarily stops what it is doing,
inputs the data and then returns to what it was doing.
Serial I/O Control:
Sometimes, I/O devices work with serial data rather than
parallel. In this case, the serial data stream from an input device must
be converted to 8-bit parallel data before the computer can use it.
Likewise the 8-bit data out of a computer must be converted to serial
form before a serial output device can use it.
The SID input is where serial data enters the 8085. The SOD
output is where the serial data leaves the 8085. Two instructions
known as SIM & RIM allow the user to perform the serial parallel
conversion needed for serial I/O device.
Timing and control section:
The timing and control section supervise the complete
operation of the . The on chip clock oscillator which produces the
internal clock is a part of this section. The timing and control section
also has a state generator to generate 10 different states namely
state generator is a multi
mode counter. The next state of the state generator from the present
state is decided by the many control signals like READ, HALI, INTR,
HOLD etc in each states then section of generator many control
signals for executing the instruction fetched.
The operation of the is cyclic in natural. During the normal
operation from the ward Go, sequentially and executes one
instruction after another until a HALT instruction is executed. The
fetching and execution of a single instruction constitutes an
instruction cycle. The instruction cycle consists of one or more read
or write operation to memory or an I/O device each memory I/O
reference requires a mechanic cycle. In other words every time a byte
of data is more from CPU to I/O or memory or from memory I/O to
cpu , a machine cycle is required.
There are seven different kinds of m/c cycles in the 8085 A:
1. OPCODE FETCH
2. MEMORY READ
3. MEMORY WRITE
4. I/O READ
5. I/O WRITE
6. INTEROPT ACKNOLEDGE
7. BUS IDLE
Three status signals IO/ generated at the beginning of
each m/c cycle (and generated during state of
the M/C cycle) identify each type of the m/c cycle the station signals
remain valid for the duration of the cycle. The instruction fetch portion
of an instruction cycle requires a machine cycle for each byte of the
instruction to be fetched since instruction consist of 1 to 8 bytes (1,2
or 3), the instruction fetch Is one to three machine cycles in duration.
The first m/c cycle in an instruction cycle is always an OPCODE
fetch m/c cycle which is always single by long and the 8 bits obtained
during an OPCODE FETCH are always interpreted as an OPCODE
of an instruction. Note that to fetch an instruction is to transfer an
entire instruction from memory to the necessitates an OPCODE
FETCH m/c cycle. However, one or two memory read m/c cycles are
also needed to complete the fetch for 2&3 byte instruction
respectively.
The number of m/c cycles required to execute the instruction
depends on the particular instruction. Some instruction require no
addition m/c cycles after the instruction fetch is complete, other
requires additional m/c cycles to write or read data to or from memory
or I/O devices from one to five. Around 50% of the instruction
requires only one m/c cycle for fetching and executing the instruction,
no instruction requires more than five m/c cycles M/C cycles like the
memory read or memory write may occur more than once a single
instruction cycle.
MC-i (i=2,3,4,5)
Thus one complete transition from state through the state
diagram and back to constitutes a complete m/c cycle the partial
state transition diagram is shown below assuming READY=1 is no
wait.
The shaded portion above that these state may be neede in
same instructions. Instruction cycles for various 8085A instruction
required to execute an instruction will depend on the READY & HOLD
signal inputs.
For example consider the 3 byte instruction STA ADDR, STA stands
for store accumulator direct the meaning of the instruction is transfer
the content of the accumulator to an external memory location whose
address is specified in the instruction is ADDR since. The location
can be anywhere in the 64k memory space that the 8085A can
directly address, 16k are required for the address thus the STA
instruction contain 8bytes; a 1 byte op-code and 2-byte address. The
instruction is stored in the memory as follows.
OP CODE BYTE 1
LOWER ADDR 2
HIGHER ADDR 3
Three m/c cycles are required o fetch this
instruction. In MC-1 is op code fetch M/C ,the opcode is transferred
from memory to the instruction register during states and then
during state it is interpreted , at this point the cpu knows that it
must do more m/c cycles two RMC to fetch the complete instruction
in MC-2 the lower addresses transferred from the memory to the
temporary register Z. in MC-3 the third byte i.e. the higher address is
transferred from the memory to the temporary register W. when the
entire instruction is in the it is executed. Execution means a data
transfer from the to memory. The contents of the accumulators
are transferred to the memory location, whose address was
previously transferred to the by the proceeding two memory read
m/c cycles the address of the memory location to be written is
generated as follows the high order address byte is temp reg. W is
transferred to the address latch and the low order address byte in Z
reg. is transferred to address/data latch. The content of the A is then
placed on the data bus. This data transfer is affected by a MWRMC
thus 3 byte STA instruction has four m/c cycles in its instruction
cycles.
Mnemonic Instruction byte
STA op code OP CODE
FETCH
LO addr MRMC
Hi addr MRMC
MWRMC
This STA has a total of 13 states. If the 8085A is operating at
325.5ns time, the STA instruction cycle is executed in 4.23 . This
time period is the instruction execution time, although it actually
includes both the instruction fetch and the execution time.
Lecture-15
MACHINE CYCLES