RAM module build - part 1

Ben Eater
7 Aug 201613:45

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

00:00

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

05:01

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

10:04

🔧 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

The 74LS189 is a type of SRAM (Static Random Access Memory) chip mentioned in the video. It provides 16, 4-bit words of memory, which is not enough for the 16 bytes or 16 8-bit words required for the computer's memory. The video explains the need to use two of these chips to achieve the desired memory capacity. This chip is central to the video's theme of building a computer's memory system.

💡Inverters

In the context of the video, inverters are used to re-invert the output data from the 74LS189 chips, which initially provide the complement of the stored data. The video mentions using two 74LS04 chips, which contain six inverters each, to achieve the correct output. This process is crucial for ensuring that the data read from memory matches the data written to it.

💡Address Lines

Address lines are used to select a specific memory location in the SRAM chips. The video describes how to connect the address lines from the memory chips to ensure that both chips are addressed simultaneously. This is essential for accessing and manipulating data stored in the computer's memory.

💡Tri-state Buffer

The 74LS245 is a type of 8-bit tri-state buffer used in the video to control the flow of data between the memory chips and the data bus. The video explains setting the direction pin to ensure data flows in the correct direction. Tri-state buffers are important for managing data transmission in computer systems.

💡Write Enable

The write enable signal, active low, is a crucial control signal in the memory system described in the video. It is used to determine when data should be written into the memory chips. The video demonstrates how to connect the write enable pins of the 74LS189 chips to allow simultaneous writing to both chips.

💡LEDs

LEDs (Light Emitting Diodes) are used in the video to visually indicate the state of the memory outputs. By connecting LEDs to the outputs of the inverters and the tri-state buffer, the video creator can monitor and test the memory system's functionality. LEDs serve as a practical tool for debugging and verifying the operation of the memory system.

💡DIP Switches

DIP switches are mentioned in the video as a future component for programming the computer. They will be used to provide data inputs to the memory system, allowing the user to manually set values for programming purposes. DIP switches are a user-friendly interface for inputting data into a system.

💡Memory Address Register

Although not explicitly detailed in the provided script, the memory address register is implied as a component that will be connected to the address lines of the memory chips. It is a register that holds the address of the memory location currently being accessed. The video suggests that future videos will cover how to connect this register to the memory system.

💡Garbage Value

The term 'garbage value' is used in the video to describe the random data that might be present in memory locations before they are explicitly written to. This is a common occurrence in digital systems, and the video demonstrates how writing to memory locations can overwrite these values with intended data.

💡Bi-directional Buffer

The 74LS245 is described as a bi-directional buffer in the video, which means it can facilitate data transfer in both directions. However, in the context of the memory system, it is used in one direction only, from the memory chips to the data bus. Understanding the functionality of bi-directional buffers is important for designing data communication systems.

💡Output Enable

The output enable signal is a control signal used in the video to enable or disable the output of the tri-state buffer. When the output enable is high, the buffer does not drive the data bus, and when it is low, the buffer drives the bus with the data from the memory. This signal is crucial for controlling the data flow in the computer's memory system.

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

play00:00

in the last video we look at the 74 LS

play00:02

189 which is the SRAM chip then we're

play00:04

going to use for the memory in our

play00:06

computer and remember it's gives us 16

play00:09

4-bit words of course we want 16 bytes

play00:11

or 16 8-bit words so we're going to need

play00:13

to use two of these chips so I've got

play00:16

two of these chips here and then the

play00:18

other thing is that the output data is

play00:20

is the complement of the store and so

play00:22

that it's got these inverters on the

play00:23

output which we really kind of don't

play00:25

want so we're going to have to re invert

play00:28

those so we're also going to use to the

play00:31

74 LS 0 for chips which are these

play00:34

inverters and each a each chip has 6

play00:37

inverters we're only going to use 4 of

play00:38

them from each chip let's start out by

play00:42

sticking these things on the board here

play00:43

we've got our 2 74 LS 189 s and our 2 74

play00:49

LS 0 for inverters so now just hook up

play00:55

power to each of these and the last pin

play00:58

here is the 5 volt power and then this

play01:01

pin 8 or pin 7 on these chips is ground

play01:07

and so it's pin 7 on these chips because

play01:10

these are 14 pin chips instead of 16 pin

play01:13

chips and I've got all these turns up in

play01:15

one is over here on the left see little

play01:17

dot there indicates pin 1 I got the

play01:21

power hooked up for all of them so the

play01:23

first thing I'll hook up is the for the

play01:25

74 LS 1 89 got the outputs here I'll put

play01:29

1 2 3 & 4 I'm going to hook these up to

play01:33

the inverters because these these

play01:35

outputs are inverted and we want to

play01:36

reimburse them so that we get the right

play01:38

output here so first thing I'm gonna do

play01:40

is hook up those outputs

play01:47

so that's the first the four outputs of

play01:50

this first chip now are connected to

play01:52

four of the inverters on this first chip

play01:55

here so these are the inputs input four

play01:57

one two three and then four up here so

play02:01

it just corresponds to these inputs on

play02:03

these inverters for these and then this

play02:05

one up here and we're we're not going to

play02:06

use these two so next I'll do the same

play02:11

thing for these second pair of chips

play02:13

yeah so there are a few people that

play02:15

comment on the last video asking you

play02:16

know why use the 74 LS 189 when you've

play02:18

got to hook these inverters up to and

play02:20

it's it's you know it seems a little bit

play02:21

inconvenient and and yeah it is a little

play02:24

inconvenient it doesn't seem terrible

play02:26

but you know I looked and there was a 74

play02:29

LS to 19 but I couldn't seem to find

play02:32

that anywhere but if I guess if I could

play02:34

get my if you get your hands on one that

play02:37

one doesn't require the inverters and

play02:39

any others other ships to you know I

play02:40

just didn't do a ton of research to find

play02:42

the you know the absolute best chip I'm

play02:44

just kind of using what I've got

play02:45

available but you know if you've got if

play02:48

you want to find a different chip and

play02:50

use that in yours I definitely encourage

play02:51

you to do that you know definitely

play02:54

hopefully these these videos are kind of

play02:56

inspiring you to to try some of your own

play02:58

things because if you you know if you

play03:00

want to build this and make some

play03:01

modifications to it you know not only

play03:03

you're going to probably learn more by

play03:04

by trying your own modifications but

play03:06

you'll he'll be even even more proud of

play03:08

what you've built when you're done but

play03:10

in any event now we've got our all of

play03:13

our outputs of our 74 LS 189 hooked up

play03:16

to our inverters and so now we should

play03:18

somewhere in here have inverted or

play03:20

actually onion verted outputs now from

play03:24

our memory so of course we won't be able

play03:26

to see what's going on here so I'm going

play03:28

to hook up some LEDs to each of the

play03:29

outputs so the outputs of these

play03:32

inverters now are you know pin 2 4 6 and

play03:35

then on the one here it's going to be

play03:38

pin 8 up here and then over on the on

play03:41

the yeah and the one on the right here

play03:43

I used pin it will be pin 12 and then

play03:48

again 2 4 & 6 down along the bottom here

play03:52

so I can just hook some LEDs up to those

play03:55

pins here so we can see what's going on

play03:58

so that's 2 pins 2 4 & 6 you know see

play04:03

using this this inverter up here so

play04:05

that's going to be pin eight up here so

play04:08

I'll just hook up a little jumper that

play04:10

brings it down to the bottom here and I

play04:13

can hook my LED up right there in line

play04:15

and then same thing over on this side

play04:19

just hook up a little jumper to bring

play04:23

that down here so I can hook my LED up

play04:25

down here and then on this chip again

play04:29

it's just pins 2 4 & 6 and there we go

play04:39

those should be the the outputs of the

play04:41

of the inverters that are coming from

play04:43

the outputs of our of our RAM chips over

play04:45

here next I look at the pin out of the

play04:48

RAM chip there's a pin 2 as a chip

play04:51

select and it's active low and that

play04:54

basically allows us to enable or disable

play04:56

each of the chips and in our case we

play04:59

always want them to be enabled so what

play05:01

I'm going to do is I'm just going to

play05:02

type in 2 on both of these chips low so

play05:06

that both of these chips will always be

play05:07

enabled and then to control whether the

play05:10

output of these chips is actually going

play05:12

out on the bus I'm going to use the 74

play05:15

LS 245 that we've used many times before

play05:17

in our registers which is this 8-bit

play05:21

tri-state buffer I will just add this in

play05:26

over here in this case it's a 20 pin

play05:29

chip so pin 10 over here is ground and

play05:31

pin 20 up here is going to be 5 volt

play05:34

power and again this is a bi-directional

play05:37

buffer but we're only going to use it in

play05:39

one direction so we'll just set the

play05:41

direction pin which is pin 1 to 2 5

play05:45

volts so that will set the direction so

play05:48

that it's always going from sort of

play05:49

these bottom 8 pins to the top 8 pins

play05:52

and then these bottoms so the bottom you

play05:55

know pins was a 2 through 9 are going to

play05:57

be our inputs and so I'm just going to

play05:59

hook those up to our 8 LEDs here are

play06:02

eight bits

play06:21

okay so now all of our our outputs here

play06:24

or that are correctly inverted are now

play06:27

up to the inputs of our of our tri-state

play06:29

buffer so we can hook our bus in over

play06:32

here now if we look back at the pin out

play06:35

of our 74 LS 189 again the other pins

play06:39

that we haven't hooked up yet so far are

play06:41

near the data inputs so d1 d2 d3 d4 and

play06:47

then you know the other 4 bits on the

play06:48

other chip as well as our address line

play06:51

so a 0 a 1 a 2 and a 3 so this is a

play06:54

4-bit address and we've got 2 chips and

play06:58

so what we want to do is we want to tie

play07:00

a 0 together 4 on both chips and then

play07:03

tie a 1 to a 1 on the other chip a 2 2 a

play07:05

2 a 3 2 a 3 so that when we have our

play07:08

4-bit address it's addressing both chips

play07:11

at the same time and then you know one

play07:13

chip will have the the high 4 order data

play07:16

bits and the other chip will have the

play07:18

low 4 order data bits so so basically

play07:21

what we're going to do is just tie these

play07:22

these four address lines together so the

play07:25

first address on a 0 whoops is is pin 1

play07:28

so we'll just type in 1 on these two

play07:31

chips together and then the second

play07:33

address line is pin 15 here and pin 14

play07:40

and pin 13 so that's highs the address

play07:45

lines the for address bits from the two

play07:47

memory chips together and kind of run

play07:50

out of room on this board but what I'll

play07:52

do is I'll just hook up some some wires

play07:54

here for those 4 address lines and just

play07:59

hook these up here so we've got

play08:00

basically 4 address lines so the first

play08:02

one is is pin 1 here and then the second

play08:06

one is this guy here

play08:10

then this and then this so I'm just

play08:14

going to hook them all to ground for now

play08:15

so basically setting all my addresses to

play08:17

zero zero zero zero and then eventually

play08:20

we'll have another input coming from our

play08:23

memory address register that'll come in

play08:24

to here when we'll hook that up later

play08:29

and then same thing for the data line so

play08:31

the data you know first bit is is coming

play08:34

is the input for the first bit is here

play08:36

and then the input for the second bit is

play08:39

here and then so on for each bit and of

play08:45

course important to make sure we keep

play08:48

these in order based on how the bits are

play08:50

order here and ultimately how they're

play08:51

going out on the bus otherwise we get

play08:55

the bits out of order things are not

play08:56

going to work correctly so these are the

play09:01

these are the date eight data inputs now

play09:04

to the to the memory so we've got our

play09:07

address lines which we will use to set

play09:09

the address whether we're reading or

play09:11

writing we have the output that is shown

play09:14

on these LEDs and also can be sent to

play09:16

the bus here and of course we need our

play09:19

our output enable which is just going to

play09:21

be this pin here on this chip so we can

play09:23

set that higher load depending on

play09:25

whether we want to output the data to

play09:28

the bus we have our address lines then

play09:31

we have our data input and you would you

play09:33

would think normally this would come in

play09:34

from the bus but for now I'm not going

play09:36

to hook it directly to come in from the

play09:38

bus because when we're programming the

play09:40

computer we actually don't want it to

play09:41

come from the bus we wanted to come from

play09:43

our dip switches that we're going to use

play09:44

to program the computer so we'll talk

play09:46

about that in future video but for now

play09:49

we've got we've got our memory we've got

play09:52

the inverters that get the output re

play09:54

inverted so it matches what we've stored

play09:56

we have our buffer that's going to

play09:58

buffer us out to the bus we've got our

play10:00

headers lines and our data inputs and so

play10:03

we want to test this a little bit we can

play10:05

we can power it on and it looks like

play10:09

we're getting all zeroes either that or

play10:11

it's not working I don't know let's try

play10:14

let's try changing their headers okay

play10:16

we're trying to get some things

play10:18

oh and one thing actually I forgot to

play10:19

hook up is our right signal if we want

play10:23

to write data into memory we need a

play10:25

signal to do that and that's just going

play10:28

to be this right enable which is on pin

play10:32

3 and so of course what we're writing we

play10:35

want to write to both chips at the same

play10:37

time so I'm going to hook pin 3 on both

play10:40

of these chips together and we've got

play10:45

our write signal here and it is a active

play10:51

low so if it's high and then we're not

play10:52

writing and then if we bring this low

play10:54

then that will write whatever data is

play10:56

here into our chips so it's powered up

play10:59

again and see what's going on so yeah

play11:02

you notice when we power it up you get

play11:04

kind of a random random data okay now

play11:07

it's consistent but it's different than

play11:08

it was before

play11:09

I don't know but did any of that

play11:10

normally when you power it up you're

play11:11

just going to get have some kind of

play11:13

garbage in the memory and until until we

play11:15

actually write it so right now we've got

play11:16

a zero going in here so if we change our

play11:19

write enable it writes that zero now to

play11:23

that address and of course have to

play11:24

address zero if we go to address one we

play11:27

see we have some other garbage in there

play11:28

and we can write a zero to that okay or

play11:33

we could write something else remember

play11:34

that these are our inputs so we have you

play11:36

know zero zero zero zero zero but let's

play11:38

change this bit here to a one so it's

play11:40

zero zero one zero zero now if we write

play11:42

that there we go we get that written to

play11:46

address memory location 1 or if we go

play11:49

back to address 0 we still have the 0

play11:51

that we put there if we go back to

play11:52

address 1 we get that data that we put

play11:56

there let's try going to address I don't

play11:59

know this is 3 right 0 0 1 1 in binary

play12:02

that's 3 and let's you know we get some

play12:05

garbage in there or whatever let's just

play12:07

write some other little data pattern

play12:09

here so let's just alternate bits so

play12:12

this is 0 1 0 1 0 1 0 1 and if we take

play12:18

our right enable low for a moment it

play12:21

writes that data into address 3 and of

play12:23

course we go back to address 1 we get

play12:26

what we put there if we go back to

play12:27

address 0 we should have a 0 there

play12:29

and it looks like we've got our memory

play12:31

working pretty well I guess the only

play12:34

other piece we haven't tested is our 74

play12:37

LS 245 to see if our buffer out to our

play12:39

bus is working I guess we could you know

play12:43

hook some some LEDs up on the on the

play12:46

output side of this here so you know

play12:52

essentially just hook up a few LEDs over

play12:54

here maybe I won't even hook them all up

play12:56

just want to just want to see if it

play12:58

works first off let's go back to

play12:59

something that has some of those bits on

play13:01

up there we are so we can see that those

play13:03

last three bits are out there and then

play13:06

we should be able to disable that with

play13:08

our output enable yep and it looks like

play13:12

it's working pretty well great so in the

play13:15

next videos what we'll do is we'll hook

play13:17

up our address lines to our address

play13:19

register and our data lines to our data

play13:21

input and both of these are going to be

play13:24

either coming from address registers or

play13:26

the or the data bus or we're going to

play13:28

have a switch that will allow us to to

play13:32

program the computer you know kind of

play13:34

like what I'm doing here where I'm

play13:35

setting these wires and toggling the the

play13:37

right but it'll be a little bit nicer

play13:39

we'll use we'll use some dip switches

play13:41

and stuff to allow us to program the

play13:43

computer

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Computer BuildingMemory TutorialSRAM Chips74LS189InvertersDIY ElectronicsData StorageHardware HackingTech EducationMemory Circuit
هل تحتاج إلى تلخيص باللغة الإنجليزية؟