Placeholder Image

Subtitles section Play video

  • There are many kinds of ROM chips, or "Read Only Memories"

  • and ROM could refer to a chip that has some data in it

  • that you can only read - there is no way to write it or change it

  • so that the chip is manufactured in a way that it has that

  • data in it but there are other types of

  • ROMs that are programmable and

  • those are called PROMs or "Programmable

  • Read-Only Memory and those usually

  • give you some way of programming it

  • once, so you get the chip and it's blank

  • and you can program it once and

  • once you've programmed it then you can't

  • change what's programmed in it but you

  • can read it as much as you want and of

  • course that can be inconvenient so they

  • also make any EPROMs which are

  • erasable programmable read only memories

  • and usually can be erased by exposing

  • them to ultraviolet light so this here

  • is an EPROM and you see

  • there's a little window on the top of

  • the chip and you can see the the die and

  • so what you can program this and then

  • it's a read-only memory at that point

  • but you can also erase it by exposing

  • the the die here to ultraviolet light so

  • you need some kind of ultraviolet eraser

  • thing to to erase these otherwise you

  • know you can also you leave them out in

  • the Sun for a few hours sometimes that

  • works which is which is why they also

  • have these little stickers that go over

  • top so they don't accidentally erase

  • themselves so that's a erasable

  • programmable read-only memory but the

  • most convenient kind of the electrically

  • erasable programmable read-only memory

  • which is what these guys are which

  • allows you to program them and then of

  • course they acted normal read-only

  • memory at that point but then you can

  • also erase them and reprogram them

  • electronically without needing to expose

  • ultraviolet light or do anything special.

  • So the 28C16 that's what I've got here

  • I've got two different 28C16s. This is

  • made by Catalyst, this one's made by Exel.

  • I also have the data sheet over here for

  • the Atmel AT28C16, they're all

  • basically the same. So this is sixteen thousand bits,

  • which is organized as two thousand 8-bit words or

  • "bytes" essentially, two thousand

  • bytes. Parallel EEPROMs so if we take a

  • look on the data sheet at the pin-out

  • here this is our pin out comes in a

  • couple different packages. We have the

  • plastic dual inline package

  • that's this guy here. It's fairly

  • straightforward - there's basically

  • eight I/O pins, so 0, 1, 2, 3, 4, 5, 6, 7 so eight I/O pins that's for

  • our data. They're input for

  • programming and normally they'd be

  • output for reading from it and then there are

  • 11 address lines so zero through seven

  • here and eight nine and ten over here

  • and those address lines are used for

  • telling it which byte we want to read, or

  • write if we're writing to it for programming it.

  • And other than that pretty

  • straightforward. There's ground and power for

  • powering the thing and then there's a

  • "Write Enable", "Output Enable" and "Chip Enable",

  • which we will take a look at in a

  • moment. I'll start by hooking up power

  • and ground. The next pin I'll hook up is

  • pin 18 which is the "Chip Enable", and I'll hook

  • that to ground, and so chip enable is

  • active low so when this is low the chip

  • is enabled and we always want the chip to be

  • enabled so we'll just tie that directly

  • to ground. Next to note is there's are 8 I/O lines, so

  • I/O 0, 1, 2, 3, 4, 5, 6 and 7 so I'm going to hook those up to

  • some LEDs so we can see what's in the

  • chip so when we we look at a particular

  • address will be able to see what data is

  • stored in the chip. So I'm gonna add some LEDs

  • here that we'll use for looking at what

  • data is in here.

  • Alright, so there's 8 LEDs that we'll use for

  • looking at the data. Now I'll connect the data

  • pins here so I/0 0 (pin 9). I'll connect

  • that. I'll start connecting those to the

  • LEDs. So that's I/O 0 (pin 9) going to

  • the first LED, pin 10 to the next LED

  • here, and pin 11, and I/O 3 I'll connect over

  • here to the other side of these LEDs.

  • I/O 4

  • So I've connected all these I/O lines to the LEDs so we'll be

  • able to see the output of the chip, but we

  • need to connect the other side of the

  • LEDs over to ground. So I'm connecting

  • these LEDs to ground through these 330

  • ohm resistors, and that's important because

  • this chip doesn't have any current

  • limiting on its outputs so if we don't

  • have these current limiting resistors

  • here, then it's going to drive as much

  • current can through the chip through the

  • LED, potentially damaging both the chip

  • and the LED in the process so we don't

  • want that we need to do some kind of

  • current limiting. So I've got these 330 ohm

  • resistors that are that are going from

  • ground through the LED and then into the

  • chip into the output of the chip will

  • who will go through the LED into ground

  • and these are a little bit asymmetrical

  • because the the ones on this side are

  • going to the LEDs this way into ground

  • the ones on the this side are going through

  • the LEDs that way and then the ground and

  • so these first 5 LEDs are the other way

  • around

  • so this should allow us to see what's

  • coming out of these I/O lines, but in

  • order to do that we've got to first tell

  • it what address we want to look

  • at. So if we want to read from address 0 for

  • example have to set all these address

  • lines to 0. We want to be able to select

  • which address we're reading from so what

  • I want to do is hook these address lines

  • up to some switches so we can select

  • whichever address we want.

  • So I'll put some DIP-switches here that we'll use for setting the address,

  • and I'll hook all the address lines up to the switches

  • So that's the first eight address lines here

  • and from zero through address seven are hooked

  • up to these switches when the

  • switches are off we want the address

  • lines to be low so i'm gonna tie them

  • low with a, this is a 10k resistor I think, brown black

  • and I think that's orange, so it's a 10k resistor so

  • I'm going to tie these these all low

  • with these 10k resistors. So when the switches

  • are off these will all be tied low through

  • these resistors when we turn the switch

  • on then we want to connect these to

  • five volts. So if we hook the other side of the

  • switch to five volts then when the switch is

  • on the pin will be high and when the switch is

  • off then it's pulled up by that

  • resistor or pulled down i guess by

  • that resistor to ground so we want

  • this side of the switches to all be tied to five volts

  • So that should take care of the

  • first 8 address lines over here now we've still

  • got address 8, 9 and 10 over on this side

  • so i'm going to add another set of

  • switches here and we're going to use the

  • the, i guess the bottom three of these

  • for address 8, 9 and 10 and I'm gonna

  • hook them up pretty much the same way.

  • and so that's address 8, 9 and 10 here;

  • 8, 9 and 10 hooked up to this side

  • of the switch and so again when these

  • switches are off we want to pull them

  • low, so I'll do that with the 10k resistors

  • and then when the switches are on we

  • want to be pulled high

  • so now we can use these first 11 switches

  • everything but the top one here to set our address

  • and of course 11 bits of address gives us the

  • 2048 (two thousand fourty eight) or approximately 2,000

  • different memory locations

  • So the only pins we haven't hooked up yet

  • are the right enable and output enable

  • the output enable is... let's keep pin 20

  • and if we set that too low its active

  • low so if we set that to low by tying

  • that to ground then that will enable the

  • output which means that whatever address

  • we set here we'll see the contents down

  • here on the I/O lines

  • so we try that we can hook this up to

  • power now so I'm gonna hook this up to 5 volts

  • and what we see is all ones and so that's

  • address location 0 and if we change this

  • to address 1 we see all ones if we go

  • to address 2 we still see all ones, address 3

  • all ones and you might be noticing a pattern

  • here that's because when these chips are

  • brand-new or they're erased, they are

  • erased with one's at every location so

  • all one's named the chip is erased and

  • there's there's nothing stored there and

  • that makes sense because we haven't

  • programmed anything here yet.

  • So to program stuff that's where the right enable pin

  • comes into play and understand how that

  • works we're gonna have to take a closer

  • look at the data sheet if we go to page

  • three there's the section about byte

  • write and it says a few things. it says

  • you can use a low pulse on the right

  • enable or chip enable input with the

  • output enable high and either chip

  • enable write enable low respectively and

  • that initiates a byte write. So what does

  • that mean? Well you can read that a few

  • times and there's some more details in

  • there

  • it also helps to look over on page six

  • theres some timing diagrams usually the

  • best way to to understand these data

  • sheets have to read them through you

  • know at least a couple times and you

  • know when you're reading it through it

  • may not make sense entirely what's going

  • on but as you see other parts of the

  • data sheet you'll start to kind of get a

  • picture of what's going on and so here

  • it is helpful to look at the timing

  • diagram which tells you how to write and

  • then it turns out there's there's two

  • ways you can write you can either write

  • to the chip using the write enable

  • controlled option or the chip enable

  • controlled option

  • we're going to go with write enable

  • controlled and basically what that means

  • is that means that its the write enable

  • pin going low and then high that controls the

  • write, that the tell that went to write

  • data and the way you read these timing

  • diagrams is you imagine time going from

  • left to right and there's all these

  • different transitions and things that

  • are going on here and really what

  • they're trying to do is we're trying to

  • show you the the parameters for the

  • timing and all of these parameters are

  • given in the table above and so for

  • example you know there's this tWP which

  • is the time of the write pulse so that's

  • the time from here to here which is the