RAM module build - part 3
Summary
TLDRIn this video, the presenter enhances a 16-bit RAM module by integrating an address register and 74 LS157 chips, enabling data input from DIP switches or a bus. They demonstrate setting memory addresses with switches and writing data into memory using a push button. The setup allows toggling between programming and run modes, with an AND gate combining control and clock signals for memory writes during run mode. The video concludes with a setup overview, promising further testing in the next installment.
Takeaways
- πΎ The video discusses augmenting a 16-bit RAM module with an address register to facilitate memory management.
- π It explains the process of switching between address register and programming mode using DIP switches.
- π The presenter demonstrates connecting 8 bits of data to either the bus or DIP switches using 74LS74 series chips.
- π οΈ Additional breadboarding is used to accommodate the growing complexity of the computer's circuitry.
- π© The video covers the connection of power and ground for the 74LS157 chips, which are used for data input selection.
- π The strobe input (pin 15) is connected to ground to enable the chip, which is crucial for the operation of the memory module.
- π Outputs from the 74LS157 chips are directed to the data inputs of the memory, allowing data to be written into memory.
- π DIP switches are used to set data values for memory programming, with the state of the switch determining the data input (0 or 1).
- π² The video also addresses the need to switch between programming mode (using DIP switches) and run mode (using bus data).
- π A 74LS157 chip is used to select the write signal source, either from a push button in programming mode or from control logic in run mode.
- π The write operation is synchronized with the clock signal using a NAND gate to ensure data is written on the rising edge of the clock cycle.
Q & A
What is the primary purpose of augmenting the 16-bit RAM module with an address register?
-The primary purpose is to enable switching between the address register and the programming mode, allowing the setting of the address with DIP switches and viewing the memory contents.
How does the use of 74LS74 chips help in the memory storage process described in the script?
-The 74LS74 chips are used to switch between the DIP switches and the bus for the data being stored in memory, allowing the selection of data input sources for memory storage.
What is the significance of the strobe input connected to ground in the context of the 74LS157 chips?
-The strobe input connected to ground acts as an enable line for the 74LS157 chips, ensuring that the chips are enabled and functioning when the strobe input is low.
Why are two 74LS157 chips needed for the eight-bit data handling in this setup?
-Two 74LS157 chips are needed because each chip handles four bits, and with eight bits of data to manage, two chips are required to cover all data inputs.
How are the DIP switches used to program the memory in the described setup?
-The DIP switches are used to set the data values that are written into memory when in programming mode. The switches connect the A inputs of the 74LS74 chips to ground when on, representing the data to be stored.
What is the role of the push button in the memory programming process?
-The push button is used to trigger the write operation, allowing data set on the DIP switches to be written into the memory at the address set by the address register.
How does the script differentiate between programming mode and run mode for memory operations?
-Programming mode is indicated by the use of DIP switches for data input and a push button for write signals, while run mode uses data from the bus and control signals from the computer's control logic.
What is the function of the 74LS00 NAND gate in the context of the memory write signal?
-The 74LS00 NAND gate is used to combine the control signal and the clock signal to determine when to write data into memory, ensuring that the write operation occurs on the rising edge of the clock.
Why is the write signal from the control logic combined with the clock signal?
-The write signal from the control logic is combined with the clock signal to synchronize the write operation with the system's clock, ensuring that data is written to memory at the correct time during the system's operation.
What is the purpose of the select pins on the 74LS74 chips in the script?
-The select pins on the 74LS74 chips are used to determine whether the system is in programming mode or run mode, switching the input sources for data accordingly.
Outlines
π» Enhancing RAM Module with Address and Data Input
The video begins with a continuation from the previous one, where the presenter has augmented a 16-bit RAM module with an address register. The aim is to allow switching between the address register and programming mode using DIP switches to set the address. The presenter plans to connect the data bits of the RAM to either take data from the bus or from DIP switches, similar to the address register setup. To achieve this, 74LS74 chips are used to switch between the DIP switches and the bus for data storage. The presenter adds another breadboard for more room and connects the instruction register from a previous video, not for immediate use but for future integration. The 74LS157 chips are introduced for selecting between the A and B inputs, with the strobe input connected to ground to enable the chip. The outputs of these selectors are then connected to the data inputs of the memory, allowing for data programming from the DIP switches or data input from the bus.
π Wiring DIP Switches and Bus for Data Input
The presenter proceeds to connect the DIP switches to the A inputs of the 74LS74 chips, allowing the setting of data values when in programming mode. The switches are wired such that when on, they connect to ground, setting a low logic level, and when off, they default to high due to the internal pull-up resistors. The presenter also connects the bus to the B inputs of the 74LS74 chips, enabling data to be written into memory from the bus during normal operation. The video details the process of setting up the wiring for both programming and run modes, including the use of a push button for writing data to memory in programming mode. The presenter also discusses the need for a control signal to write data into memory, which will be managed by another 74LS157 chip, and the use of a NAND gate to combine the control signal and the clock signal for memory writing in run mode.
π§ Finalizing RAM Module Setup and Testing
In the final part of the video, the presenter focuses on the final connections and setup of the RAM module. The right signal, which controls writing to memory, is sourced from a selector using a 74LS157 chip. The presenter explains the need to combine the right signal with the clock signal using a NAND gate to ensure that writing to memory occurs on the rising edge of the clock. The presenter connects the necessary power and ground for the NAND gate and hooks up the control signal and clock signal to the inputs of the gate. The setup is then tested, with the presenter noting the need to connect the select pins for all the 74LS74 chips to ensure they operate correctly in both programming and run modes. The video concludes with the presenter preparing to power up the system and test it more thoroughly in the next video.
Mindmap
Keywords
π‘Address Register
π‘DIP Switches
π‘Memory Contents
π‘74LS74
π‘Bus
π‘Programming Mode
π‘Instruction Register
π‘74LS157
π‘Strobe Input
π‘Tri-State Buffers
π‘Control Logic
Highlights
Augmentation of the 16-bit RAM module with a 4-bit address register for address setting using DIP switches.
Introduction of a mechanism to switch between address register and programming mode for memory address setting.
Connection of 8 bits to an input for data storage in memory, either from the bus or DIP switches.
Utilization of 74LS74 series for switching between DIP switches and bus data for memory storage.
Expansion of the breadboard setup to accommodate additional components like the instruction register.
Explanation of the strobe input's role as an enable line for the 74LS157 chip.
Connection of the outputs of the selectors to the data inputs of memory for data writing.
Setup of DIP switches to connect the A inputs of the 74LS74 chips to ground when a switch is on.
Inversion of switch logic to match the intuitive understanding of on (connected to ground) and off (disconnected).
Connection of the bus to the B inputs of the 74LS157 chips for normal run mode data writing.
Description of the programming process involving setting an address and data, then writing to memory using a push button.
Use of another 74LS157 chip to switch between the push button and control logic signals for memory writing.
Discussion on the necessity of synchronizing the write signal with the clock signal using a NAND gate.
Connection of the NAND gate to create a conditional write signal based on the control signal and the clock.
Final setup and testing of the RAM module with the new programming and write capabilities.
Anticipation of future videos detailing the control logic and its integration with the memory writing process.
Transcripts
so in the last video we augmented our 16
by Ram module with an address register a
4-bit address register uh that we can
then switch between the address register
and our programming mode which allows us
to set the address with these dip
switches and we can see the address here
and we can see the memory contents here
in this video what I want to do is do
something similar for the the actual
data that we're storing in memory so
right now we have these eight bits which
right now I've just connected down here
to looks like they're all set to ones
but instead we want to connect these uh
to to some uh sort of input that's
either going to take the data to store
off the bus or uh take it from dip
switches so very similar to this and so
again we're going to use the 74 ls7s to
switch between um the dip switches and
the bus for the data that we're storing
in memory and so again we want to give
ourselves a little bit more room so
going to use another breadboard here and
I'm going to connect it right here
because we're going to do this right
below here now actually I'm also going
to connect below this the um uh
instruction register which we built in a
previous video uh and we're not really
going to be using the instruction
register at all for this but um just
when we put the final computer together
this is a good place for it so we'll
just we'll just have that there so like
I said what we want is we want some dip
switches here when we're in programming
mode we'll be able to set the address
here we'll be able to set the data here
uh to write data into memory um and
that's how we get our program into
memory before we actually start running
uh things on the computer and then to
switch between uh using the switches to
program the computer and uh actually
being able to let the computer put
things in its memory on its own from the
bus we want to use those 74 LS 157 uh
chips that we that we looked at in the
last video um so it has these A and B
inputs and a y output and and you select
between A and B using this select uh pin
here since we have eight bits here
instead of the four um instead of using
one of these chips we'll we'll need two
and we'll start of course by hooking up
the power and ground for each of these
chips and then uh just as we did up here
we have this uh pin 15 which is the
strobe input connected to ground um and
that's essentially just kind of an
enable line for the whole chip so uh
whenever that's low the chip is enabled
so I'll go ahead and connect
pin 15 here to ground and this one's
going to be a little bit tricky cuz I
have these LEDs in the way but let me
pull this out for a moment and we can
kind of slide that
in and put the LED back in there
hopefully in the right
place okay so that's hooked up and then
next what I'm going to do is I'm going
to connect the outputs got four lines on
on each of these we have total of eight
lines that we're selecting between
either the dip switches or uh well it'll
be the bus that we end up connecting
into the uh the B and puts here uh but
first I'll start with connecting the
outputs of these into the the the data
inputs of our memory so that whichever
Source we're selecting from the output
is going to go into our memory so we're
writing that that bite into
memory okay so I think that is
everything so we can pull these
out and now all of
the outputs of our of our selectors uh
should be going to the data inputs of
our memory so we should be able able to
well once we hook up our dip switches
and our bus we should EI either be able
to program the memory from the Dip
switches or you know data coming in from
the bus should be able to find its way
into the memory so now to hook up the
dip switches it's going to be very
similar to what we did up here which is
we're going to be using the dip switches
to connect the in the a inputs on both
of these to ground when the switch is on
uh so for
example this will connect the a input of
this
first uh this first bit or the sort of
the most significant bit here to ground
when the switch is on and of course for
that to work I need to connect this side
of it to
ground so when that's on then it
connects ground to that input and then
when it's off it's disconnected uh which
means that the input's going to default
to high because all of the inputs on
these on these have a pull-up resistors
built into these chips if it's not
connected the input will be High um and
again just like we did here uh because
it's kind of unintuitive for the switch
to be down meaning high and up meaning
uh zero or so down is a one up is a zero
um I'm going to just flip this switch
upside down so that way
when the switches are down they're on
and then when we flip the switch up the
switch turns off and so when it's off
it's not connected to ground which means
it's going to be a one and when it's on
when it's down it is connected to ground
and it's a zero so I'll go ahead and
connect the the rest of
these and of course for these inputs up
here then I'll just connect the uh
connect them through the switch the
other way connect the grounds down here
and then they just connect up into these
pins up here rather than trying to run
the wires back and
forth okay and that should be connecting
our dip switches up to the a inputs of
of the 74
ls7s now the B inputs of the 74 ls7s so
so the a inputs are when we're in uh
programming mode so in programming mode
we set our address here we set our um
our data value here and then we can
write using this signal and it'll hook
up a a push button for this in a in a
moment uh use this signal to put
whatever uh value we set here into the
address uh that we set here and that's
how we program the computer that's how
we put data into the into the memory
before we start the computer when we go
into run mode then uh when we want to
write data into the memory it's going to
be coming from the bus and the bus and
then when we when we want to read data
from memory it goes out to the bus
through these Tri-State buffers but to
get data in from the bus um we want to
bring that down into the B inputs of our
74 LS 157 our our selectors here so I'm
going to go ahead head and hook that up
now okay so that now connects the bus
which which is going to be connected
here uh on these eight bits that that
extends that bus into the selectors here
so that'll be the normal run mode but
then when we're in program mode uh
instead of reading data from the bus
we'll be reading data from our dip
switches here and so the way the
programming will work is we'll we'll
switch over to program mode set the
address we want to program here set the
data that we want to put in that address
here and then we want to toggle our
right of course to do that it would be
nice to have a little push button switch
so I've got that
here stick that in there and so this
will just be a little button that we can
push to uh write the data so once we put
the address that we want to write it to
and put the data here push that button
and it'll write it uh to to there uh but
of course again we want to be able to
switch between using this button to
write to memory and the computer being
able to have a control signal that's
going to come from the control logic of
the computer to tell it that we want to
write data into the memory uh so this
this right signal that's going into the
memory now
um has to be switched depending on
whether we're in program mode or not uh
so of course to do that we're going to
uh use another 74
157 which I'll put right here so this
right signal is going to come from the
output of one of
the one of the selectors in this 150 in
the 74 LS 157 um actually should have
maybe connected our power here first get
that underneath there so
power and of course
ground and then again pin 15 of this 74
L1 157 is the essentially the enable
signal so if we want to set that low so
that uh the chip is enabled it's a low
active low uh signal there so that
that's that and so when we're in program
mode we want the this push button to uh
to essentially take the program s or the
right uh signal here low whenever we
push it so we'll connect the uh switch
uh from uh from ground through the
switch and then into the uh the a
input of our 74 LS 157 and so the a
input is is the input that we'll be
using when we're in program mode and
then when we're in run mode um this is
going to be a little bit
different in run mode we want to
essentially take this signal from uh
from the control logic so the control
logic in the computer which we'll get to
in in future videos um at some point
while programs are executing it's going
to say hey I want to write to memory uh
so it'll it'll set this right signal um
but we don't want it to necessarily
write immediately when the right signal
gets set because we want the right
signal to say okay on the next clock
cycle we're going to write to memory but
then we have want to wait for that clock
cycle so really uh we want the right
signal to be a combination of the the
right signal from the control logic as
well as the clock signal um and actually
specifically the rising edge of the
clock so what I'm going to do is
essentially and together using an and
gate uh the clock signal and the control
signal saying uh that we want to write
to memory so I'm going to use a 74 LS 00
um which which actually is not an n gate
it's a nand gate and the reason I want a
nand gate is because this is an active
low so a nand gate is going to say when
the right signal is high and the clock
signal is high then output a zero and
the zero is the thing that that tells
the uh the memory the 74 LS 189's in
this case to actually uh you know take
the data from the bus and write it so
first let me hook up the power for the
74 ls0 the nand gate uh we're just going
to use one of the nand gates on here so
the pin out is pin one and pin two are
the inputs and pin three is the output
so I'm going to hook pin three
here over here to the B input of our
selector so hook that to the B input of
our of our selector so whenever this Nan
gate is outputting a zero and we're in
run mode uh then this selector will will
feed that zero on through to the memory
and we'll we'll end up writing uh
whatever whatever data is coming in so
one of these inputs is going to be the
control signal that's coming from our uh
our control logic which we'll you know
touch on in a in a or we we'll build it
in a in a future video and go into it um
so when that's low then we're not
writing and then if that goes High then
we will be writing something into memory
um so we'll have that low the other
input is going to be from our clock go
ahead and connect this up to our our
clock signal just kind of bring that
bring that back down here and so this is
saying when the clock is high and our
our right signal is high then this goes
low um
which then is passed through so I think
we can go ahead and test this out and
see see what happens so if we power it
up uh so we can see our our clock is
running there and we see of course we
have some random random data here if we
go into write mode uh we can set our
address so if we set the address zero uh
this should write whatever value we have
on our dip switches here so we have all
zeros so we hit
that nothing
happens
H oh of course so we don't we're not
actually selecting here um I neglected
to to connect the actual select pins so
remember these 74
l17s um we want to select whether we're
programming or writing and of course we
have this hooked up you know pin one is
the select pin you can see pin one here
is connected over to this red LED which
goes low when we go into into right mode
we need to bring that that signal down
here so that when we switch to right
mode uh these guys are also selected in
right mode so let me disconnect power
and go ahead and do
that and so that should tie all of our
selects for all four four of the 74 ls7s
the three down here and the one up here
uh to the same switch here and so I
think that should be almost everything
for the ram module so I'll go ahead and
pause here and in the next video we'll
Power It Up and test things out a little
bit more thoroughly
5.0 / 5 (0 votes)