RAM module build - part 1
Summary
TLDRIn this instructional video, the presenter constructs a computer memory using two 74LS189 SRAM chips, which provide 16, 4-bit words. To achieve 16 bytes, two chips are necessary. The script explains how to connect the chips, inverters, and a 74LS245 tri-state buffer to ensure proper data output. The presenter demonstrates hooking up power, connecting outputs to inverters for correct data inversion, and using LEDs to visualize memory data. Address lines are connected to enable chip selection, and a write enable signal is used to program the memory. The video concludes with a test of the memory setup, showing successful data writing and reading.
Takeaways
- πΎ The video discusses the use of 74LS189 SRAM chips for computer memory, requiring two chips to achieve 16 bytes of storage.
- π The output data from the 74LS189 is in complement form, necessitating the use of 74LS04 inverters to correct the output.
- π Power connections are made to the chips, with 5 volts and ground identified for proper setup.
- π The outputs of the 74LS189 chips are connected to the inverters to re-invert the data, ensuring accurate output.
- π‘ LEDs are used to visually monitor the outputs of the inverters, providing a means to see the memory contents.
- π The 74LS245 is introduced as an 8-bit tri-state buffer to control data flow to the bus, with the direction pin set for output.
- π Address lines (A0-A3) are connected across both memory chips to enable simultaneous addressing.
- βοΈ A write enable signal is connected to both chips, allowing data to be written into memory when the signal is active low.
- π The video demonstrates testing the memory by writing and reading data at different addresses, verifying the memory's functionality.
- π§ Future videos will cover connecting address and data lines to registers and using DIP switches for computer programming.
Q & A
What is the purpose of the 74LS189 SRAM chip in the computer memory?
-The 74LS189 SRAM chip is used for memory in the computer, providing 16, 4-bit words of storage. Two of these chips are needed to achieve 16 bytes or 16 8-bit words of memory.
Why are inverters used with the 74LS189 SRAM chip?
-The output data from the 74LS189 is the complement of the stored data, which means it needs to be inverted to match the stored values. Inverters are used to re-invert the outputs so that the correct data is obtained.
How many inverters are used from each 74LS04 chip, and what is the total number of inverters available on one chip?
-Each 74LS04 chip has 6 inverters, but only 4 of them are used from each chip. This means a total of 8 inverters are used from two 74LS04 chips.
What is the function of the 74LS245 in the memory setup described in the script?
-The 74LS245 is an 8-bit tri-state buffer used to control whether the output of the memory chips is actually going out on the data bus. It is set to always transfer data from the bottom 8 pins to the top 8 pins.
How are the address lines connected between the two 74LS189 chips?
-The address lines A0, A1, A2, and A3 are tied together between the two 74LS189 chips so that both chips are addressed simultaneously, with one chip handling the high 4 bits and the other the low 4 bits.
What is the purpose of the chip select pin on the 74LS189, and how is it connected?
-The chip select pin on the 74LS189 is active low and is used to enable or disable the chip. In the setup, it is connected to ground to always keep the chips enabled.
Why do the outputs of the memory chips appear as random data when powered up?
-When the memory chips are powered up, they contain random data, often referred to as 'garbage,' because they have not yet been written to. Writing to the memory locations will then set the data stored in those locations.
What is the write enable signal, and how does it affect the memory chips?
-The write enable signal is an active low signal that, when low, allows data to be written into the memory chips. When high, it prevents writing to the chips.
How are the data inputs connected to the memory chips, and why is this order important?
-The data inputs are connected directly to the memory chips, and it is crucial to maintain the correct order to ensure that the bits are written and read in the correct sequence. Incorrect ordering can lead to data errors.
What is the next step in the computer memory setup after the memory chips are tested?
-The next step is to hook up the address lines to an address register and the data lines to a data input, which will be controlled by DIP switches or other means for programming the computer.
Outlines
π» Setting Up SRAM Chips for Computer Memory
The script describes the process of setting up two 74LS189 SRAM chips for use in a computer's memory. Each chip provides 16, 4-bit words, but since the goal is to have 16 bytes or 16, 8-bit words, two chips are necessary. The script explains the need to re-invert the output data due to the output being in complement form. To achieve this, two 74LS04 inverter chips are used. The setup involves connecting power to the chips, grounding them, and then hooking up the outputs of the SRAM chips to the inverters. The script also discusses the decision-making process behind choosing the 74LS189 chips despite the inconvenience of needing additional inverters, suggesting that alternative chips like the 74LS219 could be used if available.
π Wiring the Memory Components and Control Signals
This paragraph details the wiring of the memory components and the control signals for the computer's memory system. It includes connecting the outputs of the SRAM chips to LEDs to visualize the memory contents, setting up the chip select signal to always enable both memory chips, and using a 74LS245 tri-state buffer to control the data flow to the bus. The script also covers the connection of address lines to ensure both memory chips are addressed simultaneously, with one chip handling the high 4 bits and the other the low 4 bits. The process of testing the memory setup by writing and reading data at different addresses is described, along with the observation of initial random data patterns that get overwritten as data is written to specific memory locations.
π§ Testing the Memory and Buffering to the Bus
The final paragraph focuses on testing the memory setup, including the write enable signal that is crucial for writing data into memory. The script describes the observation of random data upon powering up the memory, which is expected behavior until data is written. It outlines the process of writing data to specific memory addresses and verifying the data written by reading from those addresses. The script also includes a test of the 74LS245 buffer to ensure that data can be correctly sent to the bus, which is a critical step for the memory system's functionality. The video concludes with a plan for future videos, which will involve connecting address and data lines to registers and discussing the use of DIP switches for programming the computer.
Mindmap
Keywords
π‘74LS189
π‘Inverters
π‘Address Lines
π‘Tri-state Buffer
π‘Write Enable
π‘LEDs
π‘DIP Switches
π‘Memory Address Register
π‘Garbage Value
π‘Bi-directional Buffer
π‘Output Enable
Highlights
Introduction to the 74LS189 SRAM chip used for computer memory.
Requirement of two chips to achieve 16 bytes of memory.
Explanation of output data complement and the need for re-inversion using inverters.
Use of 74LS04 chips for inverting the output of the SRAM chips.
Physical setup of the SRAM chips and inverters on the board.
Connection of power supply to the chips and identification of pin 1.
Hooking up the outputs of the 74LS189 to the inverters on the 74LS04.
Discussion on the inconvenience of using 74LS189 due to its inverted outputs.
Mention of alternative chips like 74LS219 that do not require inverters.
Encouragement for viewers to explore and modify the design.
Connection of LEDs to the outputs of inverters for visual feedback.
Explanation of chip select and its active low configuration.
Use of 74LS245 as an 8-bit tri-state buffer for output control.
Setting the direction of the 74LS245 buffer and connecting it to the LEDs.
Connecting address lines to both memory chips for simultaneous addressing.
Tying address lines together and setting them to zero for initial testing.
Connecting data inputs to the memory chips and ensuring bit order correctness.
Explanation of the write enable signal and its active low nature.
Testing the memory by writing and reading data at different addresses.
Verification of memory functionality through writing and reading different data patterns.
Testing the 74LS245 buffer to ensure proper data output to the bus.
Plans for future videos to include address and data input from registers or DIP switches.
Transcripts
in the last video we look at the 74 LS
189 which is the SRAM chip then we're
going to use for the memory in our
computer and remember it's gives us 16
4-bit words of course we want 16 bytes
or 16 8-bit words so we're going to need
to use two of these chips so I've got
two of these chips here and then the
other thing is that the output data is
is the complement of the store and so
that it's got these inverters on the
output which we really kind of don't
want so we're going to have to re invert
those so we're also going to use to the
74 LS 0 for chips which are these
inverters and each a each chip has 6
inverters we're only going to use 4 of
them from each chip let's start out by
sticking these things on the board here
we've got our 2 74 LS 189 s and our 2 74
LS 0 for inverters so now just hook up
power to each of these and the last pin
here is the 5 volt power and then this
pin 8 or pin 7 on these chips is ground
and so it's pin 7 on these chips because
these are 14 pin chips instead of 16 pin
chips and I've got all these turns up in
one is over here on the left see little
dot there indicates pin 1 I got the
power hooked up for all of them so the
first thing I'll hook up is the for the
74 LS 1 89 got the outputs here I'll put
1 2 3 & 4 I'm going to hook these up to
the inverters because these these
outputs are inverted and we want to
reimburse them so that we get the right
output here so first thing I'm gonna do
is hook up those outputs
so that's the first the four outputs of
this first chip now are connected to
four of the inverters on this first chip
here so these are the inputs input four
one two three and then four up here so
it just corresponds to these inputs on
these inverters for these and then this
one up here and we're we're not going to
use these two so next I'll do the same
thing for these second pair of chips
yeah so there are a few people that
comment on the last video asking you
know why use the 74 LS 189 when you've
got to hook these inverters up to and
it's it's you know it seems a little bit
inconvenient and and yeah it is a little
inconvenient it doesn't seem terrible
but you know I looked and there was a 74
LS to 19 but I couldn't seem to find
that anywhere but if I guess if I could
get my if you get your hands on one that
one doesn't require the inverters and
any others other ships to you know I
just didn't do a ton of research to find
the you know the absolute best chip I'm
just kind of using what I've got
available but you know if you've got if
you want to find a different chip and
use that in yours I definitely encourage
you to do that you know definitely
hopefully these these videos are kind of
inspiring you to to try some of your own
things because if you you know if you
want to build this and make some
modifications to it you know not only
you're going to probably learn more by
by trying your own modifications but
you'll he'll be even even more proud of
what you've built when you're done but
in any event now we've got our all of
our outputs of our 74 LS 189 hooked up
to our inverters and so now we should
somewhere in here have inverted or
actually onion verted outputs now from
our memory so of course we won't be able
to see what's going on here so I'm going
to hook up some LEDs to each of the
outputs so the outputs of these
inverters now are you know pin 2 4 6 and
then on the one here it's going to be
pin 8 up here and then over on the on
the yeah and the one on the right here
I used pin it will be pin 12 and then
again 2 4 & 6 down along the bottom here
so I can just hook some LEDs up to those
pins here so we can see what's going on
so that's 2 pins 2 4 & 6 you know see
using this this inverter up here so
that's going to be pin eight up here so
I'll just hook up a little jumper that
brings it down to the bottom here and I
can hook my LED up right there in line
and then same thing over on this side
just hook up a little jumper to bring
that down here so I can hook my LED up
down here and then on this chip again
it's just pins 2 4 & 6 and there we go
those should be the the outputs of the
of the inverters that are coming from
the outputs of our of our RAM chips over
here next I look at the pin out of the
RAM chip there's a pin 2 as a chip
select and it's active low and that
basically allows us to enable or disable
each of the chips and in our case we
always want them to be enabled so what
I'm going to do is I'm just going to
type in 2 on both of these chips low so
that both of these chips will always be
enabled and then to control whether the
output of these chips is actually going
out on the bus I'm going to use the 74
LS 245 that we've used many times before
in our registers which is this 8-bit
tri-state buffer I will just add this in
over here in this case it's a 20 pin
chip so pin 10 over here is ground and
pin 20 up here is going to be 5 volt
power and again this is a bi-directional
buffer but we're only going to use it in
one direction so we'll just set the
direction pin which is pin 1 to 2 5
volts so that will set the direction so
that it's always going from sort of
these bottom 8 pins to the top 8 pins
and then these bottoms so the bottom you
know pins was a 2 through 9 are going to
be our inputs and so I'm just going to
hook those up to our 8 LEDs here are
eight bits
okay so now all of our our outputs here
or that are correctly inverted are now
up to the inputs of our of our tri-state
buffer so we can hook our bus in over
here now if we look back at the pin out
of our 74 LS 189 again the other pins
that we haven't hooked up yet so far are
near the data inputs so d1 d2 d3 d4 and
then you know the other 4 bits on the
other chip as well as our address line
so a 0 a 1 a 2 and a 3 so this is a
4-bit address and we've got 2 chips and
so what we want to do is we want to tie
a 0 together 4 on both chips and then
tie a 1 to a 1 on the other chip a 2 2 a
2 a 3 2 a 3 so that when we have our
4-bit address it's addressing both chips
at the same time and then you know one
chip will have the the high 4 order data
bits and the other chip will have the
low 4 order data bits so so basically
what we're going to do is just tie these
these four address lines together so the
first address on a 0 whoops is is pin 1
so we'll just type in 1 on these two
chips together and then the second
address line is pin 15 here and pin 14
and pin 13 so that's highs the address
lines the for address bits from the two
memory chips together and kind of run
out of room on this board but what I'll
do is I'll just hook up some some wires
here for those 4 address lines and just
hook these up here so we've got
basically 4 address lines so the first
one is is pin 1 here and then the second
one is this guy here
then this and then this so I'm just
going to hook them all to ground for now
so basically setting all my addresses to
zero zero zero zero and then eventually
we'll have another input coming from our
memory address register that'll come in
to here when we'll hook that up later
and then same thing for the data line so
the data you know first bit is is coming
is the input for the first bit is here
and then the input for the second bit is
here and then so on for each bit and of
course important to make sure we keep
these in order based on how the bits are
order here and ultimately how they're
going out on the bus otherwise we get
the bits out of order things are not
going to work correctly so these are the
these are the date eight data inputs now
to the to the memory so we've got our
address lines which we will use to set
the address whether we're reading or
writing we have the output that is shown
on these LEDs and also can be sent to
the bus here and of course we need our
our output enable which is just going to
be this pin here on this chip so we can
set that higher load depending on
whether we want to output the data to
the bus we have our address lines then
we have our data input and you would you
would think normally this would come in
from the bus but for now I'm not going
to hook it directly to come in from the
bus because when we're programming the
computer we actually don't want it to
come from the bus we wanted to come from
our dip switches that we're going to use
to program the computer so we'll talk
about that in future video but for now
we've got we've got our memory we've got
the inverters that get the output re
inverted so it matches what we've stored
we have our buffer that's going to
buffer us out to the bus we've got our
headers lines and our data inputs and so
we want to test this a little bit we can
we can power it on and it looks like
we're getting all zeroes either that or
it's not working I don't know let's try
let's try changing their headers okay
we're trying to get some things
oh and one thing actually I forgot to
hook up is our right signal if we want
to write data into memory we need a
signal to do that and that's just going
to be this right enable which is on pin
3 and so of course what we're writing we
want to write to both chips at the same
time so I'm going to hook pin 3 on both
of these chips together and we've got
our write signal here and it is a active
low so if it's high and then we're not
writing and then if we bring this low
then that will write whatever data is
here into our chips so it's powered up
again and see what's going on so yeah
you notice when we power it up you get
kind of a random random data okay now
it's consistent but it's different than
it was before
I don't know but did any of that
normally when you power it up you're
just going to get have some kind of
garbage in the memory and until until we
actually write it so right now we've got
a zero going in here so if we change our
write enable it writes that zero now to
that address and of course have to
address zero if we go to address one we
see we have some other garbage in there
and we can write a zero to that okay or
we could write something else remember
that these are our inputs so we have you
know zero zero zero zero zero but let's
change this bit here to a one so it's
zero zero one zero zero now if we write
that there we go we get that written to
address memory location 1 or if we go
back to address 0 we still have the 0
that we put there if we go back to
address 1 we get that data that we put
there let's try going to address I don't
know this is 3 right 0 0 1 1 in binary
that's 3 and let's you know we get some
garbage in there or whatever let's just
write some other little data pattern
here so let's just alternate bits so
this is 0 1 0 1 0 1 0 1 and if we take
our right enable low for a moment it
writes that data into address 3 and of
course we go back to address 1 we get
what we put there if we go back to
address 0 we should have a 0 there
and it looks like we've got our memory
working pretty well I guess the only
other piece we haven't tested is our 74
LS 245 to see if our buffer out to our
bus is working I guess we could you know
hook some some LEDs up on the on the
output side of this here so you know
essentially just hook up a few LEDs over
here maybe I won't even hook them all up
just want to just want to see if it
works first off let's go back to
something that has some of those bits on
up there we are so we can see that those
last three bits are out there and then
we should be able to disable that with
our output enable yep and it looks like
it's working pretty well great so in the
next videos what we'll do is we'll hook
up our address lines to our address
register and our data lines to our data
input and both of these are going to be
either coming from address registers or
the or the data bus or we're going to
have a switch that will allow us to to
program the computer you know kind of
like what I'm doing here where I'm
setting these wires and toggling the the
right but it'll be a little bit nicer
we'll use we'll use some dip switches
and stuff to allow us to program the
computer
5.0 / 5 (0 votes)