RAM module build - part 3

Ben Eater
4 Sept 201614:13

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

00:00

💻 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.

05:00

🔌 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.

10:00

🔧 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

An address register is a type of storage register in a computer system that holds the memory address of data or instructions. In the context of the video, the address register is augmented with a 4-bit address register to allow switching between the address register and programming mode, enabling the setting of the address with DIP switches. This is crucial for accessing and manipulating specific locations in memory during the programming of the computer.

💡DIP Switches

DIP switches, or dual inline package switches, are a type of user interface for electronic devices that allow for manual configuration of settings. In the video, DIP switches are used to set the address and data values for programming the computer's memory. They provide a physical means to input values directly into the system, which is essential for initial programming before the computer operates autonomously.

💡Memory Contents

Memory contents refer to the data stored in a computer's memory. The video discusses the connection of 8 bits to the memory, which initially appear to be set to ones, but are intended to be connected to an input source for data storage. Understanding memory contents is key to grasping how data is written to and read from memory during the computer's operation.

💡74LS74

The 74LS74 is a type of integrated circuit, specifically a dual positive-edge triggered flip-flop. In the video, 74LS74 is mentioned in the context of switching between DIP switches and the bus for data storage in memory. It plays a critical role in the data input/output process, allowing the system to select between different data sources based on the mode of operation.

💡Bus

A bus in computer terminology refers to a shared communication path that allows different parts of a computer to exchange data. In the video, the bus is mentioned as a pathway for data to be stored in memory or read from it. It's an essential component for the transfer of information within the computer system, particularly during the normal operation mode when the computer is not being programmed manually.

💡Programming Mode

Programming mode is a state in which a computer system is configured to receive and store instructions or data manually. In the video, the process of switching to programming mode allows the user to set addresses and data using DIP switches, which is necessary for loading a program into the computer's memory before execution.

💡Instruction Register

An instruction register is a type of register that holds the current instruction being executed by the computer's processor. Although not directly utilized in the context of the video, the instruction register is mentioned as a component that will be placed in the computer setup, indicating its importance in the overall architecture of the computer for holding and executing instructions.

💡74LS157

The 74LS157 is a multiplexer integrated circuit that selects one of several input lines and routes it to a single output line. In the video, two 74LS157 chips are used to switch between the DIP switches and the bus for data input into memory. This selection process is vital for determining whether data comes from the user's manual inputs (DIP switches) or from the computer's internal data flow (bus).

💡Strobe Input

A strobe input is a signal used to synchronize data transmission, often used to latch data at a specific time. In the video, the strobe input connected to ground acts as an enable line for the 74LS157 chip, allowing the chip to function when the strobe signal is low. This is an important aspect of controlling the timing of data input into the memory.

💡Tri-State Buffers

Tri-state buffers are digital circuits that can have three output states: high, low, or high-impedance (off). In the video, these buffers are mentioned in the context of reading data from memory and sending it to the bus. They are crucial for managing data flow and preventing conflicts on the bus by disabling the output when not in use.

💡Control Logic

Control logic refers to the part of a computer system that controls the operation of the processor, determining the sequence of instructions and managing the flow of data. In the video, the control logic is mentioned as a future component that will provide signals to write data into memory during the computer's run mode, indicating its role in the computer's operational control.

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

play00:00

so in the last video we augmented our 16

play00:02

by Ram module with an address register a

play00:05

4-bit address register uh that we can

play00:07

then switch between the address register

play00:10

and our programming mode which allows us

play00:12

to set the address with these dip

play00:14

switches and we can see the address here

play00:16

and we can see the memory contents here

play00:18

in this video what I want to do is do

play00:20

something similar for the the actual

play00:23

data that we're storing in memory so

play00:25

right now we have these eight bits which

play00:27

right now I've just connected down here

play00:29

to looks like they're all set to ones

play00:31

but instead we want to connect these uh

play00:33

to to some uh sort of input that's

play00:36

either going to take the data to store

play00:39

off the bus or uh take it from dip

play00:42

switches so very similar to this and so

play00:44

again we're going to use the 74 ls7s to

play00:46

switch between um the dip switches and

play00:49

the bus for the data that we're storing

play00:51

in memory and so again we want to give

play00:53

ourselves a little bit more room so

play00:54

going to use another breadboard here and

play00:57

I'm going to connect it right here

play00:58

because we're going to do this right

play00:59

below here now actually I'm also going

play01:00

to connect below this the um uh

play01:03

instruction register which we built in a

play01:05

previous video uh and we're not really

play01:07

going to be using the instruction

play01:08

register at all for this but um just

play01:11

when we put the final computer together

play01:13

this is a good place for it so we'll

play01:14

just we'll just have that there so like

play01:17

I said what we want is we want some dip

play01:18

switches here when we're in programming

play01:20

mode we'll be able to set the address

play01:22

here we'll be able to set the data here

play01:25

uh to write data into memory um and

play01:27

that's how we get our program into

play01:28

memory before we actually start running

play01:30

uh things on the computer and then to

play01:32

switch between uh using the switches to

play01:35

program the computer and uh actually

play01:38

being able to let the computer put

play01:40

things in its memory on its own from the

play01:42

bus we want to use those 74 LS 157 uh

play01:46

chips that we that we looked at in the

play01:47

last video um so it has these A and B

play01:50

inputs and a y output and and you select

play01:52

between A and B using this select uh pin

play01:56

here since we have eight bits here

play01:57

instead of the four um instead of using

play02:00

one of these chips we'll we'll need two

play02:03

and we'll start of course by hooking up

play02:06

the power and ground for each of these

play02:09

chips and then uh just as we did up here

play02:11

we have this uh pin 15 which is the

play02:14

strobe input connected to ground um and

play02:16

that's essentially just kind of an

play02:18

enable line for the whole chip so uh

play02:20

whenever that's low the chip is enabled

play02:22

so I'll go ahead and connect

play02:25

pin 15 here to ground and this one's

play02:28

going to be a little bit tricky cuz I

play02:30

have these LEDs in the way but let me

play02:33

pull this out for a moment and we can

play02:36

kind of slide that

play02:40

in and put the LED back in there

play02:42

hopefully in the right

play02:44

place okay so that's hooked up and then

play02:47

next what I'm going to do is I'm going

play02:48

to connect the outputs got four lines on

play02:51

on each of these we have total of eight

play02:52

lines that we're selecting between

play02:54

either the dip switches or uh well it'll

play02:56

be the bus that we end up connecting

play02:58

into the uh the B and puts here uh but

play03:01

first I'll start with connecting the

play03:02

outputs of these into the the the data

play03:05

inputs of our memory so that whichever

play03:07

Source we're selecting from the output

play03:09

is going to go into our memory so we're

play03:11

writing that that bite into

play03:26

memory okay so I think that is

play03:29

everything so we can pull these

play03:32

out and now all of

play03:36

the outputs of our of our selectors uh

play03:40

should be going to the data inputs of

play03:43

our memory so we should be able able to

play03:45

well once we hook up our dip switches

play03:47

and our bus we should EI either be able

play03:49

to program the memory from the Dip

play03:50

switches or you know data coming in from

play03:53

the bus should be able to find its way

play03:54

into the memory so now to hook up the

play03:56

dip switches it's going to be very

play03:57

similar to what we did up here which is

play03:59

we're going to be using the dip switches

play04:01

to connect the in the a inputs on both

play04:05

of these to ground when the switch is on

play04:08

uh so for

play04:09

example this will connect the a input of

play04:12

this

play04:13

first uh this first bit or the sort of

play04:17

the most significant bit here to ground

play04:19

when the switch is on and of course for

play04:21

that to work I need to connect this side

play04:24

of it to

play04:25

ground so when that's on then it

play04:28

connects ground to that input and then

play04:30

when it's off it's disconnected uh which

play04:32

means that the input's going to default

play04:34

to high because all of the inputs on

play04:36

these on these have a pull-up resistors

play04:39

built into these chips if it's not

play04:40

connected the input will be High um and

play04:42

again just like we did here uh because

play04:44

it's kind of unintuitive for the switch

play04:46

to be down meaning high and up meaning

play04:50

uh zero or so down is a one up is a zero

play04:54

um I'm going to just flip this switch

play04:57

upside down so that way

play05:00

when the switches are down they're on

play05:03

and then when we flip the switch up the

play05:07

switch turns off and so when it's off

play05:10

it's not connected to ground which means

play05:12

it's going to be a one and when it's on

play05:14

when it's down it is connected to ground

play05:16

and it's a zero so I'll go ahead and

play05:18

connect the the rest of

play05:25

these and of course for these inputs up

play05:28

here then I'll just connect the uh

play05:31

connect them through the switch the

play05:32

other way connect the grounds down here

play05:35

and then they just connect up into these

play05:38

pins up here rather than trying to run

play05:39

the wires back and

play05:58

forth okay and that should be connecting

play06:01

our dip switches up to the a inputs of

play06:04

of the 74

play06:06

ls7s now the B inputs of the 74 ls7s so

play06:10

so the a inputs are when we're in uh

play06:12

programming mode so in programming mode

play06:14

we set our address here we set our um

play06:17

our data value here and then we can

play06:20

write using this signal and it'll hook

play06:22

up a a push button for this in a in a

play06:24

moment uh use this signal to put

play06:26

whatever uh value we set here into the

play06:29

address uh that we set here and that's

play06:31

how we program the computer that's how

play06:32

we put data into the into the memory

play06:34

before we start the computer when we go

play06:36

into run mode then uh when we want to

play06:39

write data into the memory it's going to

play06:41

be coming from the bus and the bus and

play06:44

then when we when we want to read data

play06:45

from memory it goes out to the bus

play06:47

through these Tri-State buffers but to

play06:49

get data in from the bus um we want to

play06:51

bring that down into the B inputs of our

play06:54

74 LS 157 our our selectors here so I'm

play06:59

going to go ahead head and hook that up

play07:12

now okay so that now connects the bus

play07:15

which which is going to be connected

play07:16

here uh on these eight bits that that

play07:20

extends that bus into the selectors here

play07:22

so that'll be the normal run mode but

play07:24

then when we're in program mode uh

play07:26

instead of reading data from the bus

play07:28

we'll be reading data from our dip

play07:29

switches here and so the way the

play07:30

programming will work is we'll we'll

play07:33

switch over to program mode set the

play07:35

address we want to program here set the

play07:37

data that we want to put in that address

play07:39

here and then we want to toggle our

play07:41

right of course to do that it would be

play07:43

nice to have a little push button switch

play07:46

so I've got that

play07:49

here stick that in there and so this

play07:52

will just be a little button that we can

play07:53

push to uh write the data so once we put

play07:55

the address that we want to write it to

play07:57

and put the data here push that button

play07:59

and it'll write it uh to to there uh but

play08:02

of course again we want to be able to

play08:04

switch between using this button to

play08:07

write to memory and the computer being

play08:09

able to have a control signal that's

play08:11

going to come from the control logic of

play08:12

the computer to tell it that we want to

play08:14

write data into the memory uh so this

play08:17

this right signal that's going into the

play08:18

memory now

play08:20

um has to be switched depending on

play08:23

whether we're in program mode or not uh

play08:25

so of course to do that we're going to

play08:28

uh use another 74

play08:32

157 which I'll put right here so this

play08:36

right signal is going to come from the

play08:39

output of one of

play08:44

the one of the selectors in this 150 in

play08:46

the 74 LS 157 um actually should have

play08:49

maybe connected our power here first get

play08:52

that underneath there so

play08:54

power and of course

play08:58

ground and then again pin 15 of this 74

play09:01

L1 157 is the essentially the enable

play09:04

signal so if we want to set that low so

play09:06

that uh the chip is enabled it's a low

play09:08

active low uh signal there so that

play09:11

that's that and so when we're in program

play09:13

mode we want the this push button to uh

play09:17

to essentially take the program s or the

play09:19

right uh signal here low whenever we

play09:22

push it so we'll connect the uh switch

play09:25

uh from uh from ground through the

play09:28

switch and then into the uh the a

play09:31

input of our 74 LS 157 and so the a

play09:35

input is is the input that we'll be

play09:36

using when we're in program mode and

play09:39

then when we're in run mode um this is

play09:42

going to be a little bit

play09:45

different in run mode we want to

play09:47

essentially take this signal from uh

play09:50

from the control logic so the control

play09:52

logic in the computer which we'll get to

play09:54

in in future videos um at some point

play09:56

while programs are executing it's going

play09:58

to say hey I want to write to memory uh

play10:00

so it'll it'll set this right signal um

play10:03

but we don't want it to necessarily

play10:05

write immediately when the right signal

play10:07

gets set because we want the right

play10:09

signal to say okay on the next clock

play10:11

cycle we're going to write to memory but

play10:13

then we have want to wait for that clock

play10:15

cycle so really uh we want the right

play10:18

signal to be a combination of the the

play10:22

right signal from the control logic as

play10:24

well as the clock signal um and actually

play10:27

specifically the rising edge of the

play10:29

clock so what I'm going to do is

play10:32

essentially and together using an and

play10:34

gate uh the clock signal and the control

play10:38

signal saying uh that we want to write

play10:40

to memory so I'm going to use a 74 LS 00

play10:44

um which which actually is not an n gate

play10:46

it's a nand gate and the reason I want a

play10:49

nand gate is because this is an active

play10:50

low so a nand gate is going to say when

play10:54

the right signal is high and the clock

play10:57

signal is high then output a zero and

play11:01

the zero is the thing that that tells

play11:03

the uh the memory the 74 LS 189's in

play11:06

this case to actually uh you know take

play11:09

the data from the bus and write it so

play11:13

first let me hook up the power for the

play11:15

74 ls0 the nand gate uh we're just going

play11:19

to use one of the nand gates on here so

play11:20

the pin out is pin one and pin two are

play11:22

the inputs and pin three is the output

play11:25

so I'm going to hook pin three

play11:27

here over here to the B input of our

play11:33

selector so hook that to the B input of

play11:35

our of our selector so whenever this Nan

play11:39

gate is outputting a zero and we're in

play11:41

run mode uh then this selector will will

play11:43

feed that zero on through to the memory

play11:47

and we'll we'll end up writing uh

play11:49

whatever whatever data is coming in so

play11:52

one of these inputs is going to be the

play11:53

control signal that's coming from our uh

play11:56

our control logic which we'll you know

play11:58

touch on in a in a or we we'll build it

play12:00

in a in a future video and go into it um

play12:03

so when that's low then we're not

play12:04

writing and then if that goes High then

play12:07

we will be writing something into memory

play12:11

um so we'll have that low the other

play12:13

input is going to be from our clock go

play12:15

ahead and connect this up to our our

play12:18

clock signal just kind of bring that

play12:20

bring that back down here and so this is

play12:22

saying when the clock is high and our

play12:24

our right signal is high then this goes

play12:27

low um

play12:29

which then is passed through so I think

play12:32

we can go ahead and test this out and

play12:34

see see what happens so if we power it

play12:39

up uh so we can see our our clock is

play12:42

running there and we see of course we

play12:44

have some random random data here if we

play12:46

go into write mode uh we can set our

play12:48

address so if we set the address zero uh

play12:51

this should write whatever value we have

play12:53

on our dip switches here so we have all

play12:55

zeros so we hit

play12:57

that nothing

play13:00

happens

play13:02

H oh of course so we don't we're not

play13:05

actually selecting here um I neglected

play13:08

to to connect the actual select pins so

play13:11

remember these 74

play13:13

l17s um we want to select whether we're

play13:15

programming or writing and of course we

play13:17

have this hooked up you know pin one is

play13:19

the select pin you can see pin one here

play13:22

is connected over to this red LED which

play13:26

goes low when we go into into right mode

play13:29

we need to bring that that signal down

play13:31

here so that when we switch to right

play13:33

mode uh these guys are also selected in

play13:35

right mode so let me disconnect power

play13:37

and go ahead and do

play13:53

that and so that should tie all of our

play13:56

selects for all four four of the 74 ls7s

play14:00

the three down here and the one up here

play14:02

uh to the same switch here and so I

play14:04

think that should be almost everything

play14:05

for the ram module so I'll go ahead and

play14:08

pause here and in the next video we'll

play14:10

Power It Up and test things out a little

play14:11

bit more thoroughly

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
DIY ComputingElectronics ProjectMemory StorageComputer Building74LS15774LS00DIP SwitchesAddress RegisterData ProgrammingMemory Writing
Benötigen Sie eine Zusammenfassung auf Englisch?