RAM module build - part 2

Ben Eater
21 Aug 201621:02

Summary

TLDRIn this instructional video, the presenter builds a 16-byte memory system with 4 address lines and 8 data lines, utilizing a 74 LS173 4-bit register for address selection. They explain how to connect the address lines to the register and introduce a programming mode using DIP switches for manual address and data setting. A 74 LS157 quad two-line to one-line data selector is employed to toggle between the DIP switches and the address register. The video concludes with a demonstration of switching between run and program modes, setting up for future data line configuration.

Takeaways

  • 😀 The video discusses building a 16-byte memory system with four address lines and eight data lines.
  • 🛠️ A 74 LS 173 4-bit register is used to connect the memory address lines to the address register.
  • 🕹️ The memory system includes an 8-bit Tri-State buffer for outputting data to a bus.
  • 🔌 The clock module is connected to the memory system, even though it's not directly related, for layout purposes.
  • 🔄 The 74 LS 157 quad two-line to one-line data selector is introduced to toggle between the address register and dip switches.
  • 🔲 The video demonstrates how to use dip switches to manually set memory addresses for programming the computer.
  • 🔵🔴 Indicator LEDs are used to show the current mode of operation (programming or run mode).
  • 🔑 A double throw switch is used to toggle between programming mode (using dip switches) and run mode (using the address register).
  • 🔄 The video shows how to connect the address register outputs to the memory address inputs and verify the functionality.
  • 🔍 The process of switching between different memory addresses using the address register or dip switches is demonstrated.

Q & A

  • What is the purpose of the 16-byte memory being built in the video?

    -The purpose of the 16-byte memory is to store 16 bytes of data, which can be read from or written to using the four address lines, eight data lines, and an 8-bit Tri-State buffer for output to a bus.

  • What is the function of the 74 LS 173 in the memory system described?

    -The 74 LS 173 is used as a 4-bit register to store the memory address, allowing the system to select which of the 16 bytes is being read or written to.

  • Why is the clock module connected to the memory system even though it's not directly related?

    -The clock module is connected to the memory system for layout purposes, as the final computer design will have the clock module positioned just above the RAM.

  • How does the video demonstrate switching between programming mode and run mode?

    -The video demonstrates switching between programming mode and run mode by using a double throw switch to toggle between the dip switches and the address register, with indicator LEDs showing the current mode.

  • What is the role of the 74 LS 157 in the memory system?

    -The 74 LS 157 is used as a quad two-line to one-line data selector, allowing the system to choose between the address provided by the dip switches (programming mode) or the address from the address register (run mode).

  • How are the dip switches used in the memory system?

    -The dip switches are used to manually set the memory address in programming mode, allowing for direct input of data into specific memory locations.

  • What is the significance of the strobe input on the 74 LS 157 chip?

    -The strobe input on the 74 LS 157 chip acts as a master enable. When the strobe is low, it enables the chip, allowing the selection between the A and B inputs.

  • How does the memory system handle inputting data into the memory address register?

    -The memory system handles inputting data into the memory address register by using the data enable pins on the 74 LS 173 register, which control whether the input from the bus is clocked in on the clock pulse.

  • What is the purpose of the current limiting resistors used with the indicator LEDs?

    -The current limiting resistors are used with the indicator LEDs to prevent excessive current flow, which could burn out the LEDs, by limiting the current when they are connected directly to 5 volts.

  • How does the video ensure the memory system is not constantly resetting?

    -The video ensures the memory system is not constantly resetting by managing the clear signal on the 74 LS 173 register, which needs to be kept low to prevent constant clearing of the register.

Outlines

00:00

💻 Building a 16-byte Memory System

The script begins with the construction of a 16-byte memory system using a 4-bit address to select one of the 16 memory locations for reading or writing. It features eight data lines for inputting data into the selected memory location and eight buffered output lines through an 8-bit Tri-State buffer for bus communication. The focus then shifts to connecting the address lines to an address register using a 74 LS 173, a 4-bit register. The presenter also discusses the integration of a clock module for synchronization and the need for a memory address register to manage memory addressing. The aim is to connect the memory address register to the memory and allow for manual data input via DIP switches for computer programming, necessitating a switch between register control and switch control.

05:00

🔌 Wiring the Address Selector Circuit

This section delves into the wiring of the address selector circuit using a 74 LS 157, a quad two-line to one-line data selector. The chip allows toggling between the address register and DIP switches for memory addressing. The presenter explains the functionality of the 74 LS 157, including its use of an enable strobe and the process of selecting between the A and B inputs. The wiring setup is detailed, including the connection of the address register outputs to the selector and the DIP switches to the selector's A inputs. The script also covers the use of a double-throw switch to toggle between programming and run modes, with indicator LEDs to show the current mode.

10:03

🔄 Configuring the DIP Switches and LEDs

The script continues with the configuration of DIP switches for manual memory addressing and the setup of indicator LEDs to reflect the current operational mode. The presenter discusses how the DIP switches, when off, default to inputting all ones and, when on, input zeros due to the internal pull-up resistors in the TTL chips. The switches are connected to the A inputs of the 74 LS 157 selector, allowing the user to control memory addressing manually. The LEDs are wired to indicate the current mode, with a red LED for programming mode and a green LED for run mode. The presenter also addresses the initial confusion regarding the LED indicators and resolves it by suggesting to reverse the switch orientation.

15:04

🔄 Switching Between Run and Program Modes

The focus of this part is on the functionality of switching between run and program modes using the 74 LS 157 selector and the double-throw switch. The presenter demonstrates how the selector's output changes based on the mode, reflecting the DIP switch settings in program mode and the memory address register's contents in run mode. The script includes a practical demonstration of how the memory system responds to address changes in both modes, showing that different memory contents are accessed based on the selected address. The presenter also discusses the need to connect the selector's outputs to the memory's address inputs for proper memory addressing.

20:06

🔄 Preparing for Data Line Integration

The final paragraph outlines the next steps in the project, which involve replicating the process for the data lines. The goal is to enable the setting of data using DIP switches during programming mode and then switching to run mode where the memory will use data from the bus. The script concludes with a summary of the progress made in setting up the memory section, including the ability to switch between run and program modes and address memory locations accordingly.

Mindmap

Keywords

💡Memory

Memory in the context of the video refers to the computer's storage component that holds data temporarily. The video discusses building a 16-byte memory system, which is a part of a larger computer project. Memory is crucial as it allows the computer to read from or write to specific locations, and the script describes how to select and manipulate these memory locations using address lines.

💡Address Lines

Address lines are used to select a specific location in memory for reading or writing data. In the video script, it is mentioned that there are four address lines to select one of the 16 bytes in the memory. This selection process is essential for accessing and manipulating data within the memory system being built.

💡Data Lines

Data lines are the pathways through which data is inputted into a memory location or outputted from it. The script describes having eight data lines for inputting data to be written into the selected memory location. These lines are also used for retrieving data from memory when needed.

💡Tri-State Buffer

A Tri-State Buffer is a device that can have three states: it can output a high signal, a low signal, or it can be in a high-impedance state (essentially off). In the video, the outputs from the memory are buffered through an 8-bit Tri-State buffer, which allows the memory to output data to a bus without driving too much current.

💡74 LS 173

The 74 LS 173 is a 4-bit register integrated circuit mentioned in the script. It is used in the video to create the memory address register, which stores the address of the memory location that is currently being accessed. This register is essential for the computer's ability to remember and access specific memory addresses.

💡Clock Module

The Clock Module is a component that generates a regular sequence of pulses, or a clock signal, which synchronizes operations in digital circuits. In the script, the clock module is connected to the memory system to ensure that data is written into the memory address register at the correct time.

💡DIP Switches

DIP Switches, or Dual In-line Package switches, are small toggle switches used for manually setting binary values. The video script describes using DIP switches to set memory addresses and data values manually, which is useful for programming the computer. This allows the user to input specific values into the memory system without relying on the computer's internal processes.

💡74 LS 157

The 74 LS 157 is a quad 2-line to 1-line data selector, which is used in the video to choose between two sources of input data for the memory address. This chip allows the system to switch between using the address register or the DIP switches to set the memory address, providing flexibility in how the memory is accessed and programmed.

💡Programming Mode

Programming Mode, as discussed in the script, is a state where the computer allows manual input of data and addresses using DIP switches. This mode is essential for setting up the initial values in the memory before the computer starts running its programs. The video explains how to switch between programming mode and run mode using a selector switch.

💡Run Mode

Run Mode is the operational state of the computer where it executes programs using the stored data in memory. In contrast to Programming Mode, Run Mode uses the memory address register to access memory locations. The video script describes how to switch the system into Run Mode, allowing the computer to function using the values stored in its memory.

Highlights

Building a 16-byte memory system with 4 address lines and 8 data lines.

Utilizing 74 LS 173, a 4-bit register, for memory address storage.

Connecting the memory address register to the bus for dynamic address input.

Integrating a clock module to synchronize memory operations.

Describing the function of the 8-bit Tri-State buffer for memory output.

Implementing a switch to toggle between programming and run modes.

Using 74 LS 157 for selecting between address register and DIP switches.

Configuring DIP switches for manual memory address and data input during programming mode.

Explaining the logic behind the address selection with AND and OR gates.

Demonstrating how to set the memory address using DIP switches in programming mode.

Connecting indicator LEDs to show the current mode of operation.

Powering up the system and testing the address register functionality.

Observing memory contents change with different addresses in programming mode.

Switching to run mode and using the memory address register to access memory.

Discussing the next steps for data line integration in the memory system.

Previewing the upcoming video's focus on data lines and bus integration.

Transcripts

play00:00

so in the last video we started building

play00:01

this 16 byte memory uh which is able to

play00:04

store 16 bytes uh we've got uh the four

play00:07

address lines here to select which of

play00:09

the 16 bytes we're we're reading or

play00:10

writing to uh we've got eight data lines

play00:14

for inputting the data that we're going

play00:16

to write into the the memory location

play00:18

that's selected with the address line

play00:19

and we've got our eight outputs that are

play00:21

buffered through this uh uh 8bit

play00:24

Tri-State buffer so we can output to to

play00:27

a bus in this video what I want to do is

play00:30

um you know start to connect the address

play00:33

lines here to our address register and

play00:36

since the memory address is Just 4 bits

play00:38

we can we can use the 74 LS 173 that

play00:41

we've used in the past which is a 4-bit

play00:43

register so I'm going to start by uh

play00:46

just getting another breadboard and and

play00:48

connecting it up

play00:53

here like that I'm also going to remove

play00:57

this this top one and and connect the

play01:00

clock module that we built uh in in some

play01:02

of the F earlier videos um and it's not

play01:06

that the clock module is directly

play01:07

related to the memory at all but just

play01:09

the final layout of the computer we're

play01:11

going to have the clock module just

play01:13

above the the

play01:18

RAM and so now that gives us room in

play01:20

here that we can go ahead and put

play01:23

together our memory address register U

play01:25

which is going to connect into our

play01:26

memory address lines here so I'm going

play01:29

to just get these out of the way for now

play01:31

just move them all down

play01:33

here just give ourselves a little bit

play01:36

more

play01:37

room so the memory address register

play01:39

we're going to use the 74 LS

play01:41

173 uh that we've that we've used many

play01:44

times before for registers and I'll hook

play01:46

that up over here uh that's going to be

play01:48

connected to the bus because uh at at

play01:51

various points we're going to have

play01:52

memory address appear on the bus and

play01:55

we'll want to bring that in and store

play01:56

that in the memory address register

play01:58

which will then be connected to to our

play02:00

memory to tell it what address to uh to

play02:04

address and and then once that address

play02:07

is set there then we'll either output

play02:09

contents from the bus or we might input

play02:11

uh a new value from the bus into the

play02:14

memory uh but while we're inputting or

play02:16

outputting from the memory we need to

play02:17

store the address to which we're storing

play02:20

or reading from uh in this in this

play02:22

address register uh so we could just uh

play02:25

you know it seems like it'd be simple

play02:27

enough to just take these address lines

play02:28

and hook them up to this register and

play02:29

and whatever stored in that register

play02:31

will be the address that we're pointing

play02:33

to in our in our memory here uh but we

play02:36

don't want to just do that we also want

play02:38

to be able to program the computer and

play02:42

when we program the computer we

play02:43

basically want to just switch the the

play02:45

memory into a totally different mode

play02:47

where we're able to set the address and

play02:50

set the data uh by hand with uh with

play02:53

like dip switches like

play02:56

this and so we want to have some

play02:58

switches here that allow us to set what

play03:01

address we're we're pointing to and then

play03:03

we'll have another set of dip switches

play03:05

where we can set the data that we want

play03:06

to write into that memory location uh so

play03:09

we can program the computer by hand and

play03:11

then we want to be able to switch out of

play03:12

programming mode and use this register

play03:15

so we basically want to we want these

play03:17

address lines um to either be hooked up

play03:19

to the register or so that the memory

play03:22

can be addressed by uh you know data

play03:25

coming in from the bus or an address

play03:26

coming in from the bus or we want to be

play03:29

able to set the address with these

play03:30

switches and we want to be able to

play03:31

switch between those two things you know

play03:33

you can imagine we've got four bits over

play03:35

here of address and we've got four bits

play03:37

over here of address set on these

play03:38

switches how do we switch between those

play03:40

well this is this is a a fairly

play03:42

straightforward uh circuit that you can

play03:44

we can kind of Reason through that

play03:45

allows us to select between two

play03:47

different uh values so for example and

play03:51

this is just one bit so for

play03:54

example the the first bit of our address

play03:57

uh that's stored in our register might

play03:59

be a and the first bit of our address on

play04:02

these switches might be b um and then we

play04:05

can select which of those we want to use

play04:08

using the select signal and you can kind

play04:11

of see how that works where if select is

play04:14

high then this input to the end gate

play04:16

will be a one um which means that if

play04:19

this other input to the end gate is a

play04:20

one uh then the output's a one if this

play04:23

input's a zero then the output's a zero

play04:25

uh so if we're if select is a one then

play04:28

this a signal is just based basically

play04:29

going to pass through the and gate um

play04:32

and because this is inverted this and

play04:34

gate will definitely always be a zero

play04:36

because we'll have a zero coming in here

play04:39

um and then the or gate will just be

play04:41

whatever is coming in a if select goes

play04:44

low then this and gate is basically

play04:47

always going to be off because we'll

play04:48

have a zero coming in here um and we'll

play04:51

have a one coming in here so this and

play04:53

gate will pass through the B and then of

play04:55

course the orgate it'll be a zero or

play04:57

whatever B is and so the outut will just

play05:00

be whatever B is um and so by setting

play05:03

the select high or low we're selecting

play05:05

whether we want a or b uh to appear on

play05:08

this output conveniently there is a chip

play05:11

that does exactly this it's the 74 LS1

play05:15

157 which is a quad two line to one line

play05:18

data selector so we're selecting between

play05:20

you know from two lines to one line uh

play05:22

which is which is kind of what we just

play05:23

described and you can see here on the

play05:25

data sheet uh it has um essentially four

play05:29

copies of that of that circuit uh so you

play05:32

can see the two end Gates and the orgate

play05:33

which is what we were just looking at

play05:36

here the two end Gates and the orgate

play05:38

and then the inverter uh down here for

play05:40

select that's inverting uh depending on

play05:45

which whether whether we're selecting

play05:47

the a the Four A's or the Four B's so

play05:49

there's a single select that selects

play05:51

between all four A's or all four B's um

play05:54

this also you can see there's a third

play05:55

input on all of these and Gates that

play05:57

goes to the strobe um which is basically

play05:59

just kind of a master enable um so as

play06:01

long as the strobe is low then this

play06:04

third input all these an Gates will be a

play06:06

one and and essentially that enables the

play06:08

whole chip so we'll just tie this low

play06:10

for for our purposes and and then it'll

play06:13

it'll essentially just behave uh like

play06:17

like this uh circuit that I just showed

play06:19

you um and so if you look at the pinout

play06:22

for the 74 LS 157 you can see of course

play06:26

we have our select input selecting A or

play06:28

B and then you can see there's an A and

play06:30

an output ab and an output uh ab and an

play06:35

output ab and an output so it's

play06:37

basically four of these that are all

play06:39

tied to a single select um and then of

play06:42

course we have our ground and our power

play06:44

and then this strobe line which I said

play06:45

we'll tie low to just to enable the

play06:47

thing so this 74 LS 157 um will

play06:51

basically allow us to select you know

play06:54

and toggle between do we want to use the

play06:57

switches to set the address of our

play06:59

memory or do we want to use the memory

play07:00

register to set the address of our

play07:02

memory so I'll go ahead and add the 74

play07:04

LS 157

play07:07

here we can connect the

play07:11

power uh

play07:12

and ground here so connect the power for

play07:16

that guy um and

play07:18

then remember this uh pin 15 is this

play07:21

strobe which we just want to set low to

play07:24

enable this chip so we'll just set that

play07:27

low and then while we here I can also

play07:28

connect the power power for our address

play07:31

register the 74 LS 173 so power and

play07:35

ground I'm going to pull these LEDs out

play07:38

of here and we're just using those for

play07:39

testing uh so we got that powered

play07:42

up and then the 74 LS 173 this is uh

play07:46

what it looks like and remember again

play07:47

you know it's got four uh D flip-flops

play07:50

that are that are storing our four bits

play07:52

in our register and we have um you know

play07:55

our output control which if one and pins

play07:58

one and two are are low

play08:00

then our output is enabled and and we

play08:01

always want that to be the case so we'll

play08:04

go ahead and tie pins one and two low so

play08:06

that our output is always

play08:09

enabled and then we also have our uh our

play08:12

data enable pins 9 and 10 and that

play08:14

controls whether the input which is

play08:17

going to come from the bus is is being

play08:19

clocked in on on the clock pulse so this

play08:22

is going to be a control signal uh to to

play08:24

tell it to store whatever's on the bus

play08:26

in this register so that's pins 9 and 10

play08:29

so I'll hook pins 9 and 10 together and

play08:32

then that's just a control signal that

play08:33

we'll need to set either high or or low

play08:37

uh to control whether we're storing a

play08:39

new value in

play08:40

here then pin seven is our clock so we

play08:43

can hook that up to our clock up here

play08:46

which we've now got

play08:49

nearby so now these four pins here uh 11

play08:52

12 13 and 14 are the the inputs for our

play08:56

register and so those will be connected

play08:57

off to our bus at some point uh and and

play08:59

then our outputs are pins 3 4 5 and six

play09:03

so we can connect the outputs to one of

play09:05

the the two inputs of the one of the 74

play09:07

LS 157 right because it has these A and

play09:11

B inputs for the four uh the four bits

play09:15

that it that it has um so let's go ahead

play09:18

and connect the four bits of the

play09:20

register to the to the four B inputs and

play09:23

then we'll connect our dip switches to

play09:25

the a inputs

play09:34

okay so now the outputs of our uh memory

play09:36

address register are going into one of

play09:38

the inputs of our 157 74 LS 157 selector

play09:42

so we'll be able to select either this

play09:44

or the the dip

play09:47

switches so now to hook up the dip

play09:49

switches to the other input of the 74ls

play09:51

157 what I want to do is take advantage

play09:53

of the way that the inputs on these

play09:55

chips work which is for for most of

play09:57

these TTL chips that we're using

play09:59

the inputs are are tied High there's a

play10:02

resistor inside these these chips that

play10:05

connects the input uh to to plus 5 volts

play10:09

so if we don't connect these switches to

play10:12

here at all then the a inputs on on this

play10:15

will all be ones by default and if we

play10:18

then connect some of the inputs to

play10:20

ground then those inputs that we connect

play10:22

to ground will be zeros and the rest of

play10:23

the inputs that aren't connected will be

play10:26

ones so what we can do is we can connect

play10:28

this to the switches and then the

play10:30

switches we can use to to selectively

play10:33

connect a PIN to ground or not so for

play10:36

example for the first bit here um pin

play10:38

two is the a input pin uh three is the B

play10:43

input and pin four is the output so for

play10:45

the B input we already have that

play10:47

connected up to our register for the a

play10:49

input I can connect that

play10:52

to uh the first switch here on our dip

play10:55

switch and if it's off like this then

play10:58

it's not connected this is going to be a

play10:59

one if I turn it on then it will

play11:02

complete the circuit over to this side

play11:04

and if I connect that side to ground

play11:07

then turning this on will connect this

play11:09

to zero and so on is zero and then off

play11:13

will be a one because it's not

play11:15

connected and I can do the same thing

play11:18

for the second bit connect the second

play11:22

switch to the a input of our second

play11:25

selector here and connect the other side

play11:27

of this switch again to ground

play11:30

and so if the switch is off then this

play11:32

input is defaults to a one if the switch

play11:35

is on then it connects it to ground and

play11:38

it takes this down to a

play11:40

zero same thing for the third bit in

play11:43

this case the input is up here on on the

play11:45

top side of the chip so I can just kind

play11:48

of run through the uh the switch the

play11:50

other

play11:51

way and connect the ground down here and

play11:55

so then again if the switch is on then

play11:57

it connects the ground to that pin if

play11:59

it's off then it doesn't and so then it

play12:03

defaults to a

play12:04

one and then finally for the last bit I

play12:08

can do the same thing and connect to

play12:11

ground here one thing that's a little

play12:13

bit confusing about this is that when

play12:14

the switches are in the down position

play12:16

here when they're off uh then basically

play12:19

we're inputting all ones and if they're

play12:21

up like this they're all up they're all

play12:22

on that means that we are we are

play12:25

connecting all of these inputs to ground

play12:28

and so we're inputting all zeros so it

play12:30

might be a little bit confusing because

play12:31

usually you would think down would be

play12:32

zero and and up would be a one um

play12:35

fortunately there's a pretty easy

play12:36

solution to that which is turn the

play12:39

switch around so that uh when the switch

play12:42

is down it's on and when it's up it's

play12:45

off so now we have the 74 LS 157 which

play12:48

can select between either the dip switch

play12:50

input or the address register input but

play12:53

we need to have some way of telling it

play12:55

which one we want so I'm going to add a

play12:59

switch here that we can toggle between

play13:03

the dip switches and the address

play13:06

register and this is a double throw

play13:08

switch so we can connect the center pin

play13:10

here to ground um and then depending on

play13:14

whether which position the switches in

play13:15

whether we have pushed in or pushed out

play13:17

uh it'll connect that ground to either

play13:20

the left pin or the right pin and so

play13:22

something I want to do just to make this

play13:24

a little bit I don't know maybe a little

play13:25

nicer to use is have uh some indicator

play13:29

LEDs to tell us which position the

play13:31

switch is in I you can look at the

play13:33

switch and see but um I like having

play13:35

these indicators so we can tell if the

play13:37

computer which mode the computer is in

play13:39

because we definitely want to be able to

play13:40

tell pretty easily whether the computer

play13:41

is in programming mode which will be the

play13:43

red LED on or in run mode which means

play13:47

the the green LED is on so what I'll do

play13:49

is connect the the switch up here to

play13:52

both of these LEDs so one side of the

play13:54

switch to the red LED and the other side

play13:56

of the switch to the green LED

play13:59

and then the other side of the LED will

play14:01

hook up to our 5 Vol through these

play14:06

current limiting

play14:07

resistors and we need currently many

play14:09

resistors here uh you know because we're

play14:11

connecting you know when whichever

play14:13

position the switch is in we're going to

play14:14

be connecting directly from 5 volts

play14:15

through the LED to ground and so without

play14:18

a current limiting resistor we'll be

play14:19

pushing tons of current through the LED

play14:21

and we'll burn it out uh we don't need

play14:23

those in these cases because these chips

play14:25

have uh resistors you know essentially

play14:27

resistors on the The Collector side of

play14:29

the outputs so it's already going to

play14:31

limit the current that it can drive but

play14:33

in this case we do need them and so if I

play14:36

go ahead and connect up some power here

play14:37

just to kind of show you what we've what

play14:39

we've got so far let me uh just hook up

play14:42

connect my power all the way through

play14:46

here and then hook up power to this

play14:48

whole

play14:49

Board of course we've got our clock

play14:51

going and something in our memory uh but

play14:54

what you'll see now is depending on how

play14:56

we toggle the switch uh it selects

play14:58

either green or red basically um but the

play15:01

other thing that happens is what this is

play15:03

really doing is selecting uh which of

play15:06

these two things is grounded and so in

play15:08

this case the the red LED uh here is

play15:11

grounded and in this case the green LED

play15:13

is grounded to you know complete the

play15:14

circuit from the 5 volts uh through the

play15:16

resistor here uh and so what we can do

play15:18

is we can connect you know the the red

play15:21

LED side here to pin one of the 74 LS

play15:24

1557 and pin one is the select pin which

play15:27

selects which of the two inputs we're

play15:29

going to use and so if we're on the the

play15:32

red LED essentially pin one then goes

play15:35

low and we're uh let's see which one are

play15:38

we selecting so if uh select is low then

play15:42

it looks like we're we're selecting the

play15:43

a input uh so if we're on the red LED so

play15:48

if pin one is low then we're selecting a

play15:49

which is our dip switches so red LED on

play15:52

means that we're using our dip switches

play15:54

which means we're in programming mode

play15:55

because we're using our dip switches to

play15:56

program the computer and then if we

play15:59

modes here uh then this is no longer

play16:02

connected and so pin one will default to

play16:03

being high in which case it's going to

play16:05

use input two or B rather input B which

play16:09

is our our register over here and so

play16:10

we're going to be using the the address

play16:12

register of course this will make a lot

play16:14

more sense if we hook up the outputs of

play16:16

the 74 LS 157 so we actually see what's

play16:18

going

play16:26

on okay so there's our outputs and now

play16:28

now if we start here in run mode it's

play16:33

going to you know our output here will

play16:34

be whatever we've got in the register

play16:37

which appears to be all zeros either

play16:39

that or it's not working right and if we

play16:40

switch to program mode then the output

play16:44

here should reflect whatever our dip

play16:45

switches show so 0011 makes sense if we

play16:48

turn those off it's all zeros and you

play16:50

can see it's it's just you know whatever

play16:51

we put in our dip switches here is what

play16:54

we're getting out here and then if we

play16:55

switch to back to run mode you see we

play16:56

get all zeros and that's um presumably

play16:59

what is stored in this uh register and

play17:02

we can try to get something else in this

play17:03

register I think if we set the input

play17:05

signal uh low here we should

play17:09

see well I would expect it to read in

play17:11

all ones because none of these inputs

play17:15

are connected um oh but our our reset

play17:19

signal is also not connected so this is

play17:21

constantly being reset so um yeah pin 15

play17:26

is the clear signal so we want to keep

play17:29

that

play17:34

high actually I think we want to keep it

play17:36

low right okay that might make more

play17:39

sense yeah so we want to we want our

play17:41

clear signal to be low so that we're not

play17:43

constantly clearing this right because

play17:45

it would it would be defaulting to be

play17:46

High um and

play17:48

then if we bring our data enable low

play17:51

then it should read in um whatever is on

play17:54

the bus here which is which is going to

play17:55

default all ones but we could try

play17:58

hooking a couple of these bits let's

play18:00

just hook up two bits here to

play18:04

ground um and then set our our our input

play18:08

signal low okay and then on the next

play18:10

clock cycle it read that in um and so

play18:13

that's what's in this register now okay

play18:15

so it looks like we can we can input a

play18:17

value into this register and it shows up

play18:19

here if we're in uh run mode and then if

play18:22

we switch over to program mode then we

play18:24

get whatever we set on these

play18:27

switches so now all we need to do is

play18:29

just hook up our outputs here which

play18:32

which right now are just going to these

play18:33

LEDs and actually hook them into the

play18:35

memory uh address input of our of our

play18:38

actual

play18:46

memory okay so now I've got our outputs

play18:48

hooked up to our address line inputs of

play18:51

our

play18:51

memory so let's go ahead and power this

play18:53

back up

play18:57

again and so we can see it came up so

play19:00

we're in program mode so the 0101 that

play19:03

we have in our dip switches is what

play19:04

we're seeing here and we're seeing

play19:06

something random in memory so we don't

play19:08

really know what that is but if we

play19:09

change the address we should see

play19:10

different things and there we go so if

play19:13

we go to address zero we see that if we

play19:15

go to address one we see something

play19:17

different address

play19:19

two something different address three

play19:22

something different so there's something

play19:23

different in each address I mean I guess

play19:25

we don't know for sure if we're

play19:27

addressing it right but I

play19:29

I mean it seems reasonable that if we're

play19:31

going to different addresses here we're

play19:34

getting different things um and if we

play19:36

switch out of program mode to run mode

play19:38

uh we see this goes back to zero and we

play19:40

see that we get this whatever random

play19:42

thing was in address zero so it looks

play19:45

like we're able to switch between run

play19:47

and program mode and in run mode we are

play19:50

going to be using whatever uh is in our

play19:54

memory address register and actually we

play19:56

can try to put that value back in here

play19:58

if we switch this over there yep and we

play20:00

can see when that changes we got to a

play20:01

different address here if we go back to

play20:03

program mode um we have the same address

play20:06

set here so we see the same thing here

play20:07

if we change

play20:08

address yeah it looks like it looks like

play20:11

we're able now to change our address

play20:13

either in programming mode with our dip

play20:15

switches or when we go to run mode it's

play20:18

looking at whatever is in our memory

play20:20

address register here which we can set

play20:23

by um putting some value on these four

play20:26

pins here uh which which will be

play20:28

connected to the bus and then we'll have

play20:29

a control signal to read from the bus so

play20:31

great now uh in the next video we will

play20:34

uh try to do the same thing for our for

play20:37

our data lines um because again when

play20:39

we're in program mode we want to be able

play20:40

to use the dip switch to set our eight

play20:43

data lines so we can set an address we

play20:44

can set data and then we can write that

play20:46

data into the memory and then we can

play20:48

switch back to run mode and instead of

play20:51

using the diff switches it'll use

play20:52

whatever's on the bus so in the next

play20:54

video we'll basically do the same thing

play20:55

that we just did but for data lines and

play20:57

that should wrap up everything we need

play20:59

for our our memory section

Rate This

5.0 / 5 (0 votes)

相关标签
Memory BuildingComputer HardwareAddress RegisterData Selector74LS17374LS157DIP SwitchesProgramming ModeRun ModeMemory Addressing
您是否需要英文摘要?