 Soundcheck, yes soundcheck, video check, screen check. Start streaming now. Start screaming now. Let's see. Well I don't know what the delay is like but if somebody could just type on the chat that the video is active that would be great. Okay great. I think we're live so hello greetings chip friends and it's another beautiful sunny day here in the Bay Area of California except there is a very strange mist over the mountains. I wonder why that is. Here I can set up a joke. Is California on fire? Yes well who knew. Okay so this live stream is going to be about reverse engineering a TTL chip from its dye image and you can see here on the screen in Inkscape I have a dye image of a 5490 chip from Texas Instruments and if you want to know what that is. Oh and by the way the screen there's it's kind of high density so you might want to go to full screen on your video and I will try to zoom in on things as much as possible but anyway so if you want to know what the 5490 is you can go to my page at project 54 74.org and here I have a list of chips and all the decapsulated dye images that I've taken and if we scroll down to 90 we can see that I have two instances of the chip that I've imaged. You can go to the page for Texas Instruments and here we can see some vital statistics about the chip that I took apart. This is a ceramic chip. I kind of like ceramic chips because they're easy to get at the dye you just apply heat and the top just comes right off and there's the dye image so annotated dye image that's kind of what we're going after today along with the schematic and the other one which I may or may not get to today is a 7490 from Stuart Warner from 1971 and if we take a look at that we can see that it looks pretty different so it'll be interesting to see you know if there are any differences in the schematic there are certainly differences in the layout so what I also have is a link to the datasheet which goes right to the Internet Archive and here is the Texas Instruments data book and you can just you know flip through it and you can see basically what it does so so let's get started so the first thing is that the the majority of stuff here the majority is going to be NPN transistors there may be a few diodes and there's going to be some resistors and that's pretty much all you're going to find on this chip so I thought that I would start by just drawing out the sort of structures that we're going to be seeing and that we should look for so I'm going to bring up my sketch pad here and let's see okay so here is a chip and we're going to make an NPN chip so first we're going to lay down a bunch of n-doped material and then we're going to lay down a bunch of p-doped material and then we're going to lay down some more n-doped material now this is extremely simplified I'm not going to put in you know all the details about how you make a chip but in essence this is what it looks like now this outer layer of N that's going to be the collector the inner layer of P is the base and the tiny bit of N is the emitter so there you go transistor emitter collector of course I got that backwards collector base okay the substrate which is over here that's the rest of the chip that's going to be P-doped so that it's the opposite of what your transistors are going to be so if you look at this so this is a side view and if you look at it from the top it's going to look like this so here's your chip image here's your die image you're going to see an outline of a rectangle that's going to be your N layer so there's N then you're going to see an inner part which is P and then you're going to see another smaller inner part and that's N so you can see that the outer one is going to be your collector the inner one or the next inner one is going to be your base and the small squares inside are going to be the emitter now typically in TTL chips you're you're going to see multiple emitter transistors really you can think about this as like if you have a two trend two transistor oops I'm off the screen if you have a two emitter transistor you can kind of think of it as two transistors with their collectors connected together and their bases connected together so and in that case you would actually see another inner square for another emitter okay so this is really the structure that we're going to look for so the thing that I want you to take away from this is that these are lacking a better term concentric squares or nested squares or something like that okay a resistor is just going to look like this maybe something like this you're going to see kind of like a wavy line like that and then there's going to be you know a connection over here and a connection over here so that's one type of resistor basically these resistors are sort of measured in squares and each square gives you another incremental unit of resistance and in fact resistance on chips is measured in ohms per square and the interesting thing is that squares are kind of unitless kind of dimensionless because if you have a square that looks like this it has the same resistance as a square that looks like this simply as long as you know your contact area is across the entire thing and the reason for that is that if you lengthen a square then you're increasing the resistance but if you widen a square then you're decreasing the resistance and of course if you do both at the same time in proportion your resistance is going to be the same and that's why you're going to see something like this instead of like you know ohms per meter or well ohms per micrometer or ohms per you know micrometer square no it's just ohms per square okay and I think that's all that I wanted to draw so let's actually start looking at this chip image and see what we can see so the first thing that I usually like to do is identify the pads so you can see the pads which are these squares on the outside and they have these funny black lines going off those black lines are actually the wires that go to the pins on the actual chip now the pins are going to be ordered in the same ordering as they are as as the pins are on the chip that's just a physical constraint so what we typically want to do is find the ground pin that's usually the easiest to identify on some chips now I'm gonna zoom in on a pad okay so here are two pads now on some chips or on many chips you're gonna see a lot of metal that's what this yellow stuff is on the top you're gonna see a lot of metal that goes around the chip I guess I should zoom out again zoom out I'm not zooming out happens by controls there okay you're gonna see a lot of metal going around the chip and that's typically going to be your ground so you know immediately we can probably say that this pad at the top right is ground and to verify that you can look at the pinout and you can start counting and you know see if it kind of looks correct because if you count and you look at your VCC pad and it also looks like there's a bunch of metal sort of feeding into a lot of things then you've probably got the right pin ordering so if we look at this pad that's pin 10 right and then well let's go around this way so we have pin 9 that's this pad pin 8 is this pad pin 8 goes to a thick piece of metal but it only goes to one thing so that's good pin 7 is down here pin 6 would be the lower right and here is pin 5 which is VCC and we can see that you know it does seem to go off and feed you know maybe a bunch of things certainly looks different from the other ones after pin 5 we have a no connect so there's no pad here then we have pin 3 pin 2 pin 1 pin 14 a no connect pin 12 pin 11 and pin 10 so I think that is correct so what I'm going to do is I'm going to go to the labels layer and I'm going to start by why aren't these controls working my controls are just not working today and I don't know why let me unplug a few things so I'm using a Waycom syntic 27 inch drawing tablet it's a tablet and a screen yeah I've just lost my controls ah there we go now it's working so I've got this pen here so that's kind of cool and I can move things around and I've got this other thing this is it it kind of looks like a remote control but it's actually basically you can set up hotkeys so there is like you know four buttons on one side four buttons on another four buttons in the middle and then there is a bunch of buttons around here and then there's this touch ring and the neat thing is that first of all it's wireless second of all it's magnetized so you can stick it you know on either side of the monitor you know depending on what handedness you are and the other neat thing is that you can you can program whatever hotkeys you want so and it's also application dependent so you know you can set up a set of hotkeys for inkscape which is what I'm using over here or Gimp or you know whatever and you can also get more than one of these if you know you run out of hotkeys so that's kind of neat anyway so I've programmed this so that oh yeah and the other neat thing about this sorry I'm going all over the place before I actually get to the meat of the video but anyway there is raised patterns on these buttons this one is a dot this one is a square and this one is a line also on the other side which is kind of neat because what I've done is I've programmed these keys for inkscape so that the dot is just my cursor the square will draw a rectangle and the line enables me to draw lines which I thought was pretty clever of me anyway so what I was going to do right so we've identified which pad is which pin so I'm just going to go ahead and type what is that hotkey device called well first of all unfortunately it's specific to waycom so you have to have a waycom tablet in order to use it so if you look on the waycom website it'll it'll say what it is I don't know offhand the model number but anyway yeah it's kind of unfortunate because I can really see this as a really useful thing and you know I'm I'm kind of hoping that somebody makes a third-party one that you can use with you know basically you don't have to use it with a monitor you can use it with whatever you like and it's just some thing sitting at the side of your computer and you can you know push the buttons I'm sure it some company must make something like that but anyway this is specific to waycom okay so I'm going to call this ground and that's really small I'm gonna make that a bit bigger like 64 yeah it looks good sure and the I don't like that font sans serif is good actually I kind of like using deja excuse me deja vu sans mono so there's ground and I can also put in pin 11 again okay so instead I should probably just delete this see where's my delete key my delete hotkey there it is copy and paste copy paste no they not know maybe it's this I have I have copy and paste set up on this thing so this is pin 11 and what I'm gonna do is first of all I'm going to zoom out zoom out and just go around the chip and label the pin numbers so I'm gonna copy this and paste this and this is 12 oops this isn't 10 this is this isn't 11 this is 10 so there was 11 12 is over here so you paste and unfortunately this is this is a little bit of setup that you have to do copy okay why copy paste usually this works pretty well copy paste I was pushing the wrong buttons because I'm an idiot okay 12 13 is no connect this is gonna be 14 and sometimes unfortunately you get a double press so that's kind of what happened there this is pin 1 now this is also something interesting that you should know pin 1 usually the pad for pin 1 usually looks different from all of their pads so you can see that these pads are kind of square up here they're kind of square but this one has you know a lot of zigzags and that's what the chip designers typically do to label pin 1 I think only once I've actually seen somebody put in metal the number one next to a pin usually you know they're square with like a little a little diagonal cut out cut out of it but in any case pin 1 often looks different so that's another clue that you can use to identify pin 1 okay with a chat lag of one minute why is there a wire connected if it's a no connect there is no wire connected if you whoops I need to zoom out yeah I'm not doing a very good job zooming out so okay if you count the number of pads it's exactly the number of pins that are connected there are no connects of course because you know they just wanted to make this a standard package they only needed 12 pins and there really isn't a standard 12 pin dip so they used 14 so obviously they needed to no connect two of them and in fact the spaces where there would be pads but there aren't any are here between 12 and 14 and where else here I think between three and five so there aren't actually wires connecting the no connect pads because there are no pads all right uh let's get back to copy paste so this is paste so this is three next this is paste so this is five press four to zoom fit drawing um yeah um I'm gonna try that right now f4 I think oh that didn't work maybe it's not four maybe it's some other four but yeah or you know maybe I have to just be in in cursor land for ah that actually worked interesting thank you very much okay five six um this is kind of interesting uh these pads are not square they've they've got this diagonal line on them uh if there weren't two of them if there were only one of these in the entire chip I would be tempted to call that pin one but that didn't happen so anyway uh paste pin seven all right let's go here and paste this is pin eight and we're back to pin nine okay and now I'm also going to label the pins with what they're labeled on labeled as on the pin out so five is vcc and uh let's see what's three and two three is r zero sub two so three it's not a very intuitive way of uh uh describing what these things do usually they're a lot better you got excited because you spotted a resistor between pin five and pin six uh excitement intensifies yeah there's a resistor right over here it's it's not actually between six it actually goes to a transistor over here but you know we're getting ahead of ourselves but well spotted indeed uh yeah okay uh pin one what is pin one input b I'm just going to call that b this is a and then 13 is no connect and 12 is qa so we have qa and qd so this is q oops double press qa this one is qd down here qd ground and then I think we had qb and qa qb all right um okay okay nice hot key four all right so we have all of the pins labeled and number oops I missed six and seven let's do that so seven is r nine two and six is r nine one so two copy that and okay I guess I didn't copy that that's okay r nine so one okay so we've labeled uh all the pin names and pin numbers pin eight is qc you say uh yeah I think you're probably correct I got that wrong thank you for checking all right so uh the reason that I did this uh is that um typically with ttl uh you're going to see kind of a standard input structure and a standard output structure so if you can identify the input pins and the output pins early um then you can prevent a lot of mistakes um and you can sort of get your bearings on what you're actually looking at so for example we know that qa is an output so we know that we're going to see the the typical ttl output which is you know one npn on the top one npn on the bottom and you know maybe a diode in the middle going to the pin so you know qa qb qc qd you're going to see that sort of standard structure uh for inputs like clock inputs uh inputs a and b those are pretty obviously clock inputs uh inputs um again you're going to see some sort of a typical thing some sort of typical structure and if you go to the datasheet which I probably have here if you go to the datasheet um yeah the wacom is really expensive but you can actually get cheaper drawing monitors I call them drawing monitors they're actually just touch monitors with a pen um and you can get them for a few hundred us um I tried one it did actually work unfortunately it didn't come with this which was really a deal breaker for me um and I wish I had done a little more research into you know whether there were a third party separate things like this but I just said screw it I'm in the bay area I may as well just get an expensive wacom uh wow that sounded tone deaf sorry um anyway um so let's see so yeah so here in the data book um you can see the input and output structures and that's the sort of thing that you would look for all right let's get started at looking for transistors so this is the first thing that I typically do so let's see so we're looking for squares that are um concentric or nested um and I think here's one all right so here we go so here is hopefully you can see my um pen moving around the arrow moving around so here is an outer square there we go outer square here is an inner square here and here's a more inner square here now you may be asking what are these other inner squares those are actually contact so what you need to know is that all this yellow stuff is metal right and in order to prevent the metal stuff from touching the semiconductor on the bottom you've got a layer of glass in between so you've got metal on the top and then a layer of glass and then you've got your semiconductor with you know the various doping patterns on the bottom and the way you make the metal touch the semiconductor is by putting a little hole or a window in the glass so that's what these squares are here these are basically contacts between the metal layer and the semiconductor layer underneath and what I typically like to do is draw that as these black squares so you know and I can just go around and you know recognize all of these things as contact and you know typically what I'll do you know is I might just go across the entire chip and look for these contacts they're really easy to find um because they're they're basically the innermost square of anything and they're always touching metal so I'm just going to do a few more once you sort of like get started doing one once you get started doing one you're sort of tempted to just go around the entire chip and do them all and it's really really hard not to do that right now so I'm going to force my there's another one there's a big one okay um so anyway this is the transistor that we were looking at at what I claim is a transistor okay so those are the contacts um so now what I'm going to do is I'm going to draw a red a square for the collector and that's the outermost square so I'm going to do this and I'm going to change the color to this okay um now I'm going to hide that and then I'm going to draw the next innermost square in blue so change the color and then I'm going to hide that layer and change and make another square and that's going to be green now I can unhide it and now you can see that that's what the transistor looks like so um I I chose red because usually the collectors on npn transistors are connected to positive and I suppose the the base I chose to be blue because it starts with b uh I don't know I'm an idiot anyway uh and then uh when I do that now I can sort of hide that and draw the metal now the metal uh is going to be a line so I'm just going to start drawing an outline here and I'm going to color that yellow and uh that's kind of a thick outside let's see fill in stroke stroke paint stroke style definitely don't want that I want it like smaller yeah it looks good sure okay um here is another bit of metal so here's a wire basically and this is the real reason why I got a touch or drawing screen um let me just grab the selection and grab the selection and do that delete the selection and draw it over again now that I've got the correct paint settings so this is the real reason that I got a uh a drawing screen is because you can draw these shapes really really quickly um and it really made it a lot more efficient for me to draw these things using a mouse it was just really really slow and really difficult so anyway there is another thing and now I can unhide everything and you can see again what a transistor kind of looks like um I think the collector layer could stand a little more opacity uh a little less opacity and maybe the base layer as well maybe the emitter layer also because I kind of want to see all the layers all at once um okay do you think it would be possible to automate some parts of the die reverse engineering using computer vision uh yes it probably could be done um I did take a very short brief stab at it using machine learning um in order to uh identify the metal layer and you know basically draw out the metal layer um and I had some success but it it it was just more efficient for me to you know to just go ahead and draw everything out yes I probably could have spent six months training a neural network to recognize the metal layer and then another six months training the neural network to recognize you know squares uh but I just couldn't be bothered um to me machine learning is awesome and there's a lot of potential with it but you know I just don't like using the tools I just find it very onerous um let's see uh what else um so the collector overlaps metal at the top but it's not connected that is correct there is no contact up at the top of here also at the bottom you can see that this wire just sort of goes over that transistor I don't know why it did it doesn't look like it had to but in any case that's correct there's no contact so that's that all right so we've identified the collector and we can see that this wire over here connects to the collector we can see that uh let's see this wire over here connects to the emitter that's this green part and this wire over here connects to the base so this is a very simple transistor because it's got one collector one base and one emitter and what I'm going to do is I'm going to label it so label uh I'm going to just stick a label in here and I'm going to call it q1 it get a little bigger and I'm going to change again the font so there's q1 our first transistor uh when I get a second transistor maybe I should start bringing up kinkat and sticking all these transistors down um okay um so there's q1 so what I typically like to do is go around the entire chip and look for all of the transistors so let's see if I can which is my zoom out to keep this one all right let's look for more transistors uh could you explain how to crack open ceramic I see um there is a video if you look on my channel there's a video about how to open the ceramic package I use a torch other people just use a hammer and a chisel I don't like that because you could damage sometimes the chip what do you do with the chip diagrams once you've worked them out once I work them out I put them on project 54 74 there are a lot of chips there that I have die images for but no schematics because it takes a long time to to to reverse engineer one of these chips okay um here's an interesting transistor right over here so it's not exactly a square uh but it's square enough um and you can see here is another square and here is another square inside it now this is a little confusing um there appears to be a square here which would imply it's a base but it can't be a base because by definition an emitter has to be inside a base so I suspect what we're seeing here is just a collector um and the reason that you see this other square is that typically in order to get really really good contact between an n type semiconductor and metal you put an additional strongly doped n region it's called an n plus region in order to get a lot better contact so I suspect that's what we're seeing here probably the same thing over here again the reason that I know that this is not a base and it's not an emitter is because a base would have an emitter inside it and an emitter would have a base around it and we don't have that here we just have the collector around here so what I think we're seeing right over here is a double connect double collector transistor uh and all that really means is that this wire is actually connected to this wire through the collector which is kind of cool what makes the transistor is the doping not the structure well it's actually both um if you if you go back to the beginning of the video I drew out um you know what the what the regions look like um but yeah the the geometric structure is what tells me what the transistor is only because I know what the geometric structures are actually doped as you can't actually see the doping um so yeah that's that's unfortunate there are probably some very very expensive techniques that you can use to see the doping and as far as I know that actually involves slicing the chip and then applying a lot of chemicals and then you can see sort of the doping and how deep it goes you know that's just like really really deep reverse engineering that's that's like super professional you know ultra um ultra million dollar uh reverse engineering um so no you can't see the doping um there is one interesting thing though that I discovered well I didn't discover it but I found that I could actually do this on the cheap is that if you were to remove all of the metal and all of the glass from the chip and that typically involves um just dunking it in hydrofluoric acid and I typically use um there's a stain remover um and I mentioned this on some other videos or you know maybe in my patreon page oh by the way if you look on my patreon page which you can see down in the the doobly doo as they call it um you may need to refresh because I added that just before the video there is a link to my patreon page um totally not asking for for patronage but you know if if you you want to that would be great um but I put a bunch of public posts on that page um with you know they're they're kind of short articles on reverse engineering chips so you might want to check that out just for the content not saying you have to subscribe or anything uh where was I right um so I I use a a stain remover uh for high relatively high hydrofluoric acid concentration uh no the doobly doo um the doobly doo I first learned it from the vlog brothers um they called it the doobly doo um and that was my first exposure to that term so now I call it the doobly doo uh anyway um yeah so uh yeah so if you go to my patreon page which is in the doobly doo uh there's an article there about hydrofluoric acid and using it to remove the metal layer and the glass layer from a chip and I found that if you left the chip in hydrofluoric acid then the p-doped material actually turned darker so so yes you can actually see some of the doping but it's limited to the p-doped layer and the reason that this is uh or maybe it's the n-doped no it's the p-doped layer and the reason that this is uh that I made this discovery and and that it's important is that if you look at these resistors now somebody mentioned that they got excited because they saw a resistor so I'm going to go to that resistor uh right over here the squiggly bit is a resistor now resistors on TTL chips are made out of p-doped material strongly p-doped material um because it has to be relatively conductive but not you know too conductive so there's a certain you know doping that you use but it's always a p-doped and the reason that I know it's p-doped is that you can see this rectangle around it that's called an n-doped well uh it's basically isolation between the p-doped silicon substrate and the p-doped resistor so that they're not actually connected there's this n-well in the middle so you can consider that kind of like a an insulator almost now I took apart a chip from Russia um it's a chip that drives nixie tubes it's it's basically a bcd decoder and then it has 10 outputs for each of the 10 for each of the 10 electrodes to a nixie tube and I took it apart and I looked at it under a microscope and I couldn't see a single resistor there were no resistors to be found anywhere so basically you would you would see this square over here and nothing over here you would just see these two bits of metal and they just appeared to end and I was like well there's got to be a resistor in there I just can't see it and I discovered that with hydrofluoric acid the p-doped material actually got stained so I could see the resistors um so that's kind of cool um anyway that's so there you go that's the answer to the can you see doped regions the answer is well yes and no all right so we had a transistor over here and anyway uh so the reasoning that I uh yeah it's the well not yeah 74 41 but whatever the Russians called it um uh the k 155 I think or something like that I know it had a five and a one and a k in it anyway um okay so okay so I've explained my reasoning as to what I think each of these squares is so I'm going to go ahead and draw out this n region so for instance I'm going to draw out an n region let me select that so now I can take the paint settings from there one thing that annoys me about inkscape that I really wish I could solve is that each layer should have its own default uh paint settings um for you know for rectangles and and lines and unfortunately since I switch back and forth so often uh that would be really nice but it doesn't actually happen so there's the red thing I'm going to hide that I'm going to make a base so I'm going to select the blue region select the rectangle tool take the paint settings from that selection um rectangle here so that's the base uh and then the emitter is here gonna color that green okay all right and I don't bother uh drawing out this n plus region this uh suit uh I think they call it like an omic contact um but it's you know it's basically a contact uh I don't bother drawing that out um but what I can do is label the transistor so labels let's go ahead and grab q1 copy and paste and this is q2 and later I might actually go around and relabel the transistors um usually transistors that are close together are actually connected uh close together uh so they're related um and so they should be numerically close together but anyway okay so we're gonna go around right so what I was saying is that I usually go around and identify the collector regions first so um I think here's one let me zoom out one step I totally screwed that up okay so right here is an interesting transistor that I happen to know from experience is a is kind of a logic type transistor um in that it performs a logical function um so here's the collector on the outside let me go ahead and draw that out right now so collector draw that out there's a collector oh there's one right next to it uh there's actually is this another one yeah this is another one right next to it and again you know from just from experience I know that this is a transistor because I can immediately see the squares and I can see that they're inside they're that they're nested um here's another one that was easy to spot and here's another one right next to it let's see anything else uh these squiggly bits are resistors um this is actually not a transistor right over here in the middle uh what it actually is is a pretty thick resistor um in fact it may not necessarily be a resistor or it may be a resistor with such low resistance that it's effectively a jumper and the reason that it's a jumper is that it has to go uh is that you know I think the designers needed to make a connection between this wire up here and this wire down here and unfortunately there was a wire in between so they had to make a jumper this is basically a jumper so um it is a square within a square but there is no square within a square within a square and you can see that there's only a contact you know let me draw these contacts whoops I'm in a line tool I want it to be in the square tool here's a contact and here's a contact so you can see that there's a contact and then there's just this square around both contacts and that basically said that this is just a very low resistance connection same thing over here contact contact very low resistance connection but this is a collector right here uh line tool this is a collector this structure okay this is a complex structure and I think the entire thing is a transistor but there's this squiggly bit over here um I'll get I'll get to this later there's something that I want to say about squiggly bits and bases but uh yeah here's another resistor looking thing but it also kind of looks like a transistor kind of so I'll get to that later let's see squiggly bit that's a resistor this I think is a transistor okay let's see what else we can find uh let me zoom out okay so that's what we've got so far we've got a few transistors found uh let's see if we can go in the upper side and next to this pin over here okay that's not a transistor but this square probably is okay are there any capacitors inside TTL chips um I think I've maybe seen one um and basically a capacitor uh kind of looks like a really big piece of metal and then a big piece of like n region or maybe p region underneath it and the glass is basically forming the insulation between right metal yeah exactly metal over p doped um and yes they do take up a lot of space so uh TTL TTL was kind of like a a dead end technology it was great for glue logic but when you got to you know like really high density designs like you know processors and you know other things they just went with with uh moss p-moss in the beginning because they couldn't make n-moss and then they went to n-moss and then they went to c-moss uh TTL was sort of like a sort of a side branch that was again great for glue logic but not for much else uh okay let's see I think this is a transistor here but I'll get to it later because I'm not quite sure actually I am pretty sure um let's see I'm not sure what I'm looking at here oh yeah yeah okay uh yeah uh sometimes what helps is that because you know that the entire chip is p-doped and then the next layer damp the next level would be n and then the next level would be p and then the next level would be n is that you can actually start from a region that you absolutely know is is p-doped like for example this region up here is p-doped and then when you cross a line well now you know that you're in an n-doped region and then when you cross another line you know you're in a p-doped region so sometimes if you're not quite sure what uh you know where you are like you know over here I'm looking at these squares and I'm not quite sure you know what level I'm on um you can actually you know just sort of say okay well here's p I just crossed a line that's n I just crossed another line that's p now I'm crossing out of that region so that's n now I crossed out of that region and that's p and that means that this is my n region right over here so now that I've got that straightened out I'll draw this draw this okay here is one that's something that I've never seen before is this kind of base region actually going outside of the collector region that's weird I don't know I don't know what that's all about okay um so there's that here's one this is an obvious one and yes unfortunately it gets tedious drawing all of these transistors but you've got to do the work uh kind of surprise you don't do an edge detect yes I actually could do it do an edge detect um but I can see these lines pretty pretty easily um with an edge detect the problem is that um the metal just sort of starts to look like you know any other uh doped region so um I guess you know I've sort of trained myself to find these um the the next chip that I want to do is the 74 is the 7490 which looks completely different in fact can I bring that up uh open recent 7490 okay so this is the 7490 it it looks more pinkish and colorful and if you start zooming in the lines are a little bit more difficult to see uh I think the reason for that is that like this is a more primitive process and the glass is thicker so it's more difficult to see the lines um especially okay like for example here um right over here this looks like a transistor because it's you know it's rectangular but you can sort of see that there's like all these artifacts around here and that's not an artifact of the imaging it's actually an optical artifact well okay yeah it's an artifact of the imaging it's not an artifact of you know the the compression or anything like that so it is a lot harder to see the transistors over here uh nevertheless you know using knowledge of what transistors should look like geometrically you can figure it out so you know this is like not something that you want to do really quickly you really want to know what you're doing um so you know looking at that and then looking at this chip uh you know all of a sudden you can see the lines a lot better can't you uh so you don't really need to do edge detect um okay uh collector here's one uh let's see so this uh is definitely not a transistor well is it i think it is yeah actually it is because there are several layers of squares here's another one so anyway um another important thing to note as i'm doing this is that this is a 5490 it's not a 54l 90 it's not a 54s 90 it's not a 54ls 90 l stands for low power s stands for shot key it's not an al s a stands for advanced or anything else this is a what they call a standard uh uh technology chip um and the standard technology chips are the easiest because the transistors are the largest there aren't a whole lot of extra components and extra connections going all over the place for optimization for low power optimization for speed um i've done s i've done standard i've done shot key i've done low power shot key i've done low power those are relatively easy to do uh every time i've looked at an advanced chip like an al s you just i just can't figure it out because the the transistors are really small um and there are diodes mixed in there um and it's just really really difficult to do and i'm just not as productive looking at an al s chip so i've just sort of given up on al s chips have you tried different lighting colors for different chips um i haven't typically the color is not important so much as the polarization and you do need a polarized filter for that which i don't have so i haven't experimented with polarization but yes that's actually a good point maybe with polarization you know we could see some of these regions a little better but i can see these regions well enough so okay is there an easy chip you would recommend to have a look at to begin to reverse engineer a chip yes um i would say the 7400 chip the 7400 chip was the very first 7400 series chip i think followed closely by the 7474 which is a flipflop uh the 7400 is a NAND chip and it has very little internal logic in other words it basically has the input circuitry connected directly to the output circuitry and when you do that you get a NAND gate um you can look at project 5474 and look at the existing 7400 chips that i've done so you at least have something to compare against um and you could take the images off it and you know practice using it so um yeah i would definitely suggest the 7400 to start with um if you're more interested in CMOS technology um i don't have a whole lot of CMOS um i do have a few NMOS chips on there um but i've actually found CMOS a lot easier to look at than uh PMOS and NMOS simply because they had to do weird tricks uh in order to get PMOS and NMOS to be fast enough CMOS is where it's at um so anyway uh if you're looking for TTL definitely a 7400 if you're looking for CMOS um well they make CMOS versions of like 7400s right there's like a 74 HC00 um i don't know if i've actually uh put that on project 5474 let's take a quick look well let's go back to 000 uh so in inventory it says that i've got a C that's CMOS HC that's CMOS HCT that's CMOS uh compatible with TTL levels um and if we go into the chips that i've done uh oh i actually did do an HC at one point and an HCT uh let's take a look at the HC oops that's the data sheet i don't want to look at the data sheet i want to look at the page so we could see the image um yeah you can see that the structure is really really simple to look at um and if you actually download this and zoom in um you'll see that these complicated structures in the middle that's actually just a single high power transistor um basically what you have is um you have uh the drain and the source sort of interdigitated like this um so that's why it looks so complicated and then you know uh anyway uh i'm getting distracted here uh sorry about that uh okay more transistors um okay this believe it or not the structure with what looks like a resistor in it is actually a transistor with a resistor in it um the resistor is actually connected to the base so you can think of this as a transistor whose base is connected to a resistor um there are some implications with respect to integrating a resistor into a transistor but you know for our purposes in a schematic it's just going to look like a resistor connected to the base of a transistor same thing over here you can see that here is the base region here is the emitter around it is the collector and this is that you know strongly connect here is this strongly connected connector thing over here here and then there's this squiggly bit running off of the base that's actually just a small resistor okay um this is a this kind of looks like a transistor right over here and it's awfully big so here let's see yeah i don't know i don't think this is a transistor i mean it might be i'll come back to that later this is a transistor so we've got here i'll do it from the inside out so here we have an emitter here then we have a base and you can see that the base has this integral resistor in it so what i'm going to do is i'm going to draw it goes here here here here here here here base so there's the base which unfortunately i drew on the emitter layer uh it's going to have to be deleted switch to the base layer and just do it again yes i could have copied it but base uh and then around it okay so you can see this uh thing over here is this an n plus now the reason the reason that i'm hesitating is that sometimes they put diodes in here now a diode is just a p n region so in other words this square over here could be p oh wait uh yeah this square could be p and the outer square could be n and that could actually be forming a diode so well okay uh i'm just going to color this blue i mean it's kind of big to be uh you know one of those super omic contacts um when we get to reverse engineering this particular section i'll try to explain that a little better why i think that is a yeah so um if i move this out of the way so you can see that there's a square here right but there's another square over here so why don't i color this also blue uh and that's because this square sort of you know almost exactly matches the metal above it so that's why i think that this is one of those omic contacts those super super low conductance contacts um this on the other hand um it's kind of off center and you know it's it's kind of larger than it seems it needs to be so you know that's why i suspect that's actually different doping region all together um and again that's probably going to be really confusing right now but hopefully you know if we actually look at it and stare at it and draw it out uh it it may actually end up being a just a diode so all right so there's a transistor um same thing here let me draw it from the inside out so here is the emitter that's green here is the base with an integral resistor it goes around this way and that way and that's blue and then the collector okay so we've got this um other square over here um it's smaller uh i'm just going to leave it alone for now sometimes you just have to you know draw it out draw it on a schematic and then realize that there's a component that should be there but isn't um and the way that you know that there's a component that should be there is that you've looked at typical ttl circuits and well this isn't it so uh n emitter so we'll go and draw that here base that's a square and collector that's a square oops well okay that's a square all right um here's a big long transistor okay so what i'm going to do here is i'm going to go from the inside out so i'm so i know that this is a transistor because i can see that there are three levels of squares um and so the inner squares are going to be emitters so i will draw those first here is one here is another one and unfortunately this area is a little blurry here is another one and here is another one and let's see what else have we got okay uh we have around those we have the base so we're going to go to the base layer and draw that i think that's where it ends now you can see that there's this additional square here um again maybe it's a diode um i'm gonna sort of do that well see if i do that it kind of looks like a connection to a base sort of region so what i'm going to do is not do that and again i'll get to it later let me go to the collector and draw a square around all of these there's the square and there it is now you can see that this has four emitters so basically this is equivalent to four transistors with their bases and collectors connected together now i know uh that uh a four emitter transistor is kind of like uh a four input NAND gate and you know this is just something you'll figure out from experience um okay so here's another thing uh let's go get some emitters here's one here is another one here is another one this one is not and you can kind of tell because the contacts also look different here i'll draw out the contact it's a little contact here a little one here a little one here bigger one here little one here this is kind of a bigger one here there's another one um what's that blurry horizontal line i often see going straight through bases ah yes okay interesting okay so what what you're talking about is this kind of fuzzier line it's not as delineated but it it's clearly there that is what they call a buried layer um so in order to make transistors um a little better what the collector actually does is it goes it is it goes deeper and then under the entire structure so let's go back to the sketch delete this yeah so this is kind of an interesting interesting feature um let's see if i can draw it out properly uh so traditionally i've drawn the p-layer here then there's an n-layer here and a p-layer here and an n-layer here and this is the collector and this is the base and this is the emitter now there's also a buried region um and i'm trying to remember how that actually looks i think it's i think it's like this basically kind of like this and it's um i think it's an n i could be wrong on this completely because i very rarely pay attention to the buried layer because it doesn't serve any purpose in the schematic um but it is a physical characteristic of the transistor and i think i think the idea is to um maybe i should just leave it at that because i obviously don't know what i'm talking about i do know that it's a buried layer and i also know that it has no effect on the schematic so i don't draw it but yes well spotted um okay where were we looking at the emitters of this thing so here's an emitter right so i was saying that these contacts are smaller um and they're smaller because their regions are smaller uh so there's the emitter now the base has this funny looking shape um and i've i've never really figured out whether it mattered or not but here's the base and it's got this little neck in the middle and i've never really figured out whether that's a really really teeny tiny resistor um i draw out the schematic and it doesn't look like you know it's important for all i know it actually is but i just i usually don't draw it as a separate resistor so let's just go ahead and draw out the base region there's the base region and then we've got the collector region so collector collector okay so there's our collector here let me go ahead and draw the contacts for this one so there's a contact there's a little one bigger one little one little one little one so those are some interesting logic transistors they're both for inputs all right uh all right let's zoom out and see where we are okay so you can see how much work this actually takes it looks like so so far i've spent like you know an hour just doing this of course i've had you know various um distractions and side explanations but um uh and this is a moderate complexity chip let's start from this area and draw some emitters uh let's let's let's let's draw some contacts contacts let's change it up a bit and start drawing some of these contacts big contact big contact little contact little one here's one over here here's one over here there's a bigger one there's a big fat one there's a teeny one yeah this is actually an interesting structure right over here so this is a pin pin it's uh r9 uh r9 sub 2 which is i think an input pin yeah it's an input pin now the input pins of ttl chips typically have a diode that goes to ground and it's a reverse bias diode and it looks like this so here is here's your typical uh input in and typically this is what an input looks like um so there's an input transistor um and rather than talking about why this transistor looks like that um i'll just say that this is an input and basically you know this is sort of like the the inverse of the input the signal right over here is the inverse of the input um typically what you'll see is a diode and this is a reverse bias diode so it's a protection against negative voltages because if you put a negative voltage on the input then current is going to flow through that diode more often than not destroying the diode but at least it doesn't destroy the rest of the chips so um and then of course because the diode is destroyed everything else gets destroyed too so uh but anyway this does protect against small negative voltages and you know low current negative uh negative connections um so a diode is just a p next to an n right and it's basically like this and it's easy to uh remember which is which because p stands for positive and typically you put the positive voltage on here and n stands for negative so you know that's how you would normally forward bias a uh a a diode by the way here's a little trick that i that i uh love to talk about which is the anode and which is the cathode i could never remember but if you look at the symbol for diode maybe if you turn it around see how there's a k over here that k that's the cathode cathode and see how there's kind of an a over here that's the anode that's why that's my stupid mnemonic uh anyway i never used the terms cathode and anode anyway unless i have to i just use positive and negative um anyway uh what i was getting at is that this is the structure of a diode uh well you don't have a p butted right up against an n right if you have let me erase this and p and so if you have i'm going to draw a top view now so here's your chip and it's p doped so there are a few ways that you can make a diode uh and typically the p substrate of the chip is connected to ground well if you're going to make a protective diode that looks like this oops i can't i delete like that okay if you're going to make a protective diode that looks like this well the p part should already be connected to ground right so all you really need is an n region so if i put an n region over here this forms a protective diode so you know whatever is connected over here it now has this sort of structure on it uh so that's one way of making a diode specifically for protection uh for reverse bias protection um the other way of making a diode of course is um well you really don't have any choice other than to put an n well over here and then you have a p over here and then you have another n right over there well that's a diode and you're like no rob that's a transistor and i'm like yes everyone that is a transistor because uh a transistor um can be considered as two diodes you can use it as two diodes if you connect it upright uh so here are the two diodes so in fact a transistor like this uh so let's see this is the collector this is the base and this is the emitter so um this is the collector this is the base and this is the emitter well if you draw this out as diodes you get a diode that connects to the collector like this and you get another diode that gets connected to the emitter so if you were to collect the if you were to connect the base to something positive and the collector to something negative and the emitter to something negative then your transistor doesn't act as a transistor anymore it just acts as diodes um and in fact if you look at the input of a um if you look at the input of a i'll just pick a 7400 because that's easy to do let me draw this transistor here base collector emitter and that's what it looks like if you treat them as diodes if you look at the input stage of a two input nand gate or a 7400 it looks like this one emitter it's actually a double emitter right and there's one input and there's the other input and then there's a resistor to plus and then there's this and it goes off to um i think just an output but you know let's just call it out and this is input a and this is input b and this is vcc and you've got your usual protective diodes well if you draw this out as diodes the input transistors of of ttl are not treated as transistors they don't function as transistors they actually function as diodes so if you draw this as a diode circuit here's vcc here's some resistor right and now we've got diodes that go to your inputs a and b and then you've got another diode that does this well if you ignore this output diode this is resistor diode logic and in fact the input stage of ttl is just resistor diode logic so you can see that if i ground b then current will flow from vcc through the resistor through the diode and down to ground so if this is a zero and this is a one well i get current that flows this way that means that current is not going to flow this way because all the current is being drawn out this way so you know because there's going to be another transistor over here so essentially current is essentially this this diode is now not being forward biased right because this is now at ground this is at something like 0.7 volts and you know there's no way that this diode there's no way that this node over here can go below ground or to be at ground because there's still this junction over here so there's no current over here so basically this thing's off so you can consider the output a zero if on the other hand both of them are one then no current flows through these diodes and current has to flow through this diode so that's a one that's actually an AND gate isn't it okay uh yeah i got that wrong so this is an AND gate i guess it's an rdl AND gate is that right uh yeah i think it is because if either one of these is zero that pulls this node down to zero so this is an AND gate uh all right so anyway okay so all that was going can you build a very simple computer with diodes uh yes and the answer is you do need you do need intermediate stages because every time you have a diode you lose some voltage so eventually you lose all your voltage so you would either have to keep stepping up your your supply voltage or put some amplification and that's really all there is to ttl to be honest it's a diode stage in the beginning followed by you know maybe some other logic which is diode logic with intermediate stages of amplification and then you've got an output conditioning stage and that's all there is to ttl really um okay uh and you can make unlimited complex combinatorial logic with just diodes uh yeah you can um but typically um so okay uh anyway what i was gonna do is talk about this diode right over here um so i happen to know that this is a protective diode and i happen to know that let's see so this is obviously p right over here no this is this is n it has to be n so that means that it is going to be an emitter i think or like an emitter so let me just draw that uh the next square has to be p which means it's a base and the next square has to be n so it kind of looks like it would be a transistor but it isn't um and the reason for that is what um there there is a reason and i forgot um did i get that wrong no i'm pretty sure i got that right uh the thing that's worrying me is that i don't see the actual connection to ground um okay well maybe there is a connection to ground somewhere in there but i will just leave that alone for now uh is it a zener diode no uh it isn't a zener diode um zener you don't really see zener diodes in ttl logic uh you do see schottky diodes and schottky diodes do look different in that they seem to have an extra bit of metal in there because that's actually a schottky connection um this is this is absolutely definitely a protection diode i know that much um i'm just kind of blanking on how exactly the connections work uh we can we can definitely see that this inner connection right over here it's got to be an n layer um and again i'm just not sure where the p layer connects to the substrate or to ground um so i'll come back to that see we see the same structure over here um yeah so i'll come back to that let's do another few resistors uh and then maybe what i'll do is instead of doing the entire all all of the transistors on the chip maybe i'll just you know start drawing out the schematic so that we get a little bit more excitement okay so wrong color uh the chip designer could have messed it up no no no no they definitely did not mess it up and this is a texas instrument's chip they did not mess it up uh often you do see not necessarily in TTL but in CMOS you see sort of fake circuits and that's to prevent reverse engineering actually it's to prevent piracy of their chips um so yeah sometimes you see fake circuitry but not in this case you don't see it in TTL at least i've never seen it in TTL um let me draw a few contacts here draw a few contacts here just quickly drawing some out big contact big contact by the way uh now that we know that this is VCC here's another contact here's another contact another contact um this is VCC and we know this thing to be a jumper so we know that this wire up here is also VCC connected contact very hard not to play the contact game okay and better okay also what you're talking about are test patterns um let's zoom out and see if there are any test patterns here test patterns come on four oops i need to be in arrow mode why am i not in arrow mode i don't know okay okay hotkeys are not working anymore so i will manually zoom out like an animal here is a test pattern uh they're usually at the edges of the chip or in the corner of the chip and basically all they do is you know slap down some doping regions and some metal layers and to make sure that the registration is is correct um so here's an example at the bottom i guess this is to measure um vertical registration of this of this inner square horizontal registration over here with this inner square over here uh can i keep the archive of this live stream public yes all of my live streams are public um let's see so here's another complicated bit where i guess they're testing um you know multiple squares and the metal layer and anyway um sometimes you can get an idea of the different layers that they use um with with their test patterns um and you'll see sometimes they just stick some letters down a b c d e f and each one of those is a different like doping layer or metal layer or something like that oh my hotkey works suddenly um is there any lettering or numbering around here oh look they they put another test pattern down here in this corner too um i wonder why they did that it's not like it costs anything more to do that um anyway yeah i don't see any any numbering over here sometimes they put the number of the chip or a mask revision or something like that i guess they didn't do that here so all right so what i was doing was going to this transistor over here and drawing it out so emitter emitter there's one base goes around it collector goes around that delete what's the squiggly line right next to the vcc pad that is a resistor this thing is a resistor um hey i'll draw it um resistor i typically color resistors as brown so here we go resistor okay um resistor goes around the contact it comes around here goes around and color it brown that brown that's a resistor um the thing around it again is an n well if you go back to the beginning of the video i talk about you know n wells as isolation but that's all that is and i typically do not draw those because again they're not reflected in the schematic and i'm only interested in the schematic let me draw out this transistor really quickly so here is an emitter and there's another one that's all we have base goes around the emitters base goes around the emitters and the collector goes around the base base okay let me hide those and just draw these metal bits because why not metal metal before i do that let me go to a metal bit that i've already drawn and select it and then go to the line tool and take the paint from the selection now we go back to where i was going which is here right now i can draw using the same style as before not all um let's draw this pad okay there's the pad um here's another one we're gonna end up here here here okay there's that and then there's this other one here it goes off to here and what have i gotten myself into commonly used methods to prevent reverse engineering of chips fake circuits i've mentioned before security layers which are just layers of metal on top that's just you know it's just slathered with metal and then you can't see anything underneath it and then you have to very carefully take that metal layer off and hope that you don't damage the metal layer underneath but for the most part it's going to be fake circuits there is a neat little transistor um let me draw the vcc metal oh yeah right um and i can't reverse engineer any chip that's older than around the mid 80s uh simply because the features are so small that i can't optically resolve them uh you can do a lot with x-rays and a lot more with um basically MRIs uh you can make 3d representations of chips with extremely small features but we're talking about really really expensive and you have to really really really be invested in pirating a chip in order to go through that it's a lot cheaper if you're in china at least it's a lot cheaper to just run off a few tens of thousands of more copies of the chip that you were outsourced to make and then sell those um so how do fake circuits prevent reverse engineering well you look at them and they kind of look like they belong in the circuit so you design your chip uh exactly the same way except you make the wrong connections uh you make connections that aren't supposed to be there and then your chip doesn't work so um okay so i am going to draw this vcc jumper out exactly like a resistor um so it's going to be just dishing now you know and i know that this is an extremely low resistor so it's not even going to appear in the schematic uh nevertheless i put it there because it is a connection so it is you know essentially a wire so let me go to the metal layer and draw the vcc pad this is probably going to go all the way to the other end of the chip well yes and no i mean obviously if you build the chip and it doesn't work you're not going to sell it well you might sell it and you know just i've seen that happen um you sell a chip that doesn't actually work or that isn't the the chip that that isn't the chip that you bought yeah exactly map makers do that they're called um kind of streets are they called ghost streets or something like that streets that don't actually exist uh trap streets i think i think they're called trap streets okay um let's zoom out and see how that looks that looks kind of cool so it's shaping up to be something um okay uh let's just um go ahead and trace this vcc thing out because it's kind of interesting this uh low resistance connection that i was talking about uh so there's another wire that goes up here to another low resistance connection so contacts and metal and here's another contact over here and we'll draw this thing on the resistor layer you know it isn't really well it kind of is a resistor so it's brown ends up connecting to this bit of metal uh let me just draw this contact over here and here is another one so now let me just draw the metal out so there we go metal so looks like i missed a contact over here um could you not emit these fake sections if you come across them while reverse engineering well that's the thing you have to recognize that they're a fake section they look like bits of the circuit except they're not right exactly they they would just copy it without understanding the chip and then it doesn't work and you don't know why because well sometimes you may as well just design your own okay um so here's an interesting bit we can see that there is some sort of resistor over here connecting this part of vcc to this part i mean there's nothing in between except this you know this fat layer so what's going on uh it's definitely not part of a transistor it's a jumper but it's jumping nothing so sometimes as Freud said a resistor is just a resistor so that is going to be drawn as a resistor so now i'm not entirely certain if this is actually vcc or not um so when we go ahead and draw this out as a schematic uh you know we'll just stick the resistor in there and see if it makes sense and if it does we'll leave it in and if it doesn't we'll remove it um so kind of assuming that that's vcc here's a transistor so i'll just draw that out um i really want to get to you know bits of kicad because it's already like 130 it's already been like two hours and i'm kind of thinking that time to actually instead of drawing things um i'm going to draw this out a p region and then draw this as an n region here's another transistor emitter and it looks like a diode d kind of thing around the lot why does that look different oh yeah because it's a line oh my color is wrong how did that happen shift page down as move selection to layer below um yeah i could probably do that um but then i'd have to reach over to my keyboard and i'd much rather program them as a hotkey which i'm not going to do right now um okay uh let us zoom out i just reached over to my keyboard um and i just said that i wasn't going to do that i'm an idiot um what should i do okay uh let me go over to this section with the clock oh yeah i know what i could do all right so i have a graphic that i pulled from the data sheet okay so this is what i pulled yeah i think i did accidentally change opacity on that one um i can go back and fix it later it's not that important um maybe you should save oh god i haven't saved oh thank you um yeah um okay so this is the block diagram that i found in the data sheet and surprisingly with a lot of these ttl chips um the the internal logic that they put um that they that they draw very very closely matches the internal circuitry so we can see that r91 and r92 go into a nand gate so i thought that what we would do is go to those pins and reverse engineer that nand gate so here's r91 and r92 okay um again we're we're i can guarantee you that that this square bit over here is a is a protective diode uh i just don't quite get how it works um so i'm just going to draw it in i just want to be sure we get all the features first then we can go and draw out our satisfying schematic oh let's see so we've got um so i've got r92 and r91 with their protective diodes great they both go to this transistor here uh we're up to q3 now so i'm just going to call this q3 q3 that a little smaller that's a good size so there's q3 sitting over there um we have a resistor to vcc so i'm going to call that r1 i think the small thing which you made green square is a low impedance contact you don't know about that because if the outside message retracted yeah um okay oops the message is back i think the small square which you made green is a low impedance contact oh yeah okay um well okay so the square here let me just hide all these regions okay so if this square is a low impedance region then let's ignore it and that means that this is the anode which is negative so it's got to be n that would mean the outside would be p and then the outside of that would be n which we know to be incorrect because that is the substrate so i don't think that's right um i'm pretty sure that this is an n region maybe what's going on is that this is the n region over here and this is actually the substrate you know it's actually uh it it's actually just the substrate no because then what is this other square doing around it i don't know okay so we've got r9 2 and r9 1 going q3 going to emitters we've got the base going through a resistor to vcc and then we've got the collector going off somewhere well let's do that in chiCAD so i've got chiCAD right here a little bigger okay so this is my schematic so what we need is a dual emitter npn transistor now i have both on project 5474.org and here i have a library which has let's see where's project project 5474 so i have a bunch of you know just symbols that i made not not high power but i made specifically dual emitter quad emitter quintuple emitter um there's a shotgun transistor with double emitter triple emitter uh there's another triple emitter there's a pnp um so anyway i made this double emitter thing so i can put that here i'm going to rotate it okay now i'm going to grab a resistor and do that uh so this i said was q3 right q3 and this was r1 value value uh not value q1 okay uh we've got a wire that goes to a pin r91 and another one that's r92 and we've got some protective diodes which i assure you are there i usually like small diodes where's d small and then i usually go into uh editing and make the value invisible there's a second one here i guess i'll it's designator one key okay and now i'll stick a ground here so ground and here i know what ground looks like so i don't need to show the value okay and vcc there's that wire just going off somewhere all right well that's an AND gate as we've discovered but we're looking for an AND gate so let me save this and see where it goes okay so this is the connection that we are going to now trace goes off to here and it goes off to a transistor some of you may know what's coming so contact contact uh contact contact um this i'm going to label q4 so let me go all the way over here and grab my label copy paste q4 okay so um and it connects specifically to the base of q4 so let's pull up kind of and draw that i know annoying isn't it yes i used to doing it one way all right so let's pull up a power 474 npn great we know it connects to the base and this is four all right so that's how it looks so far so hey we're reverse engineering okay uh so we've got the emitter must go somewhere and the collector must go somewhere let's see if there's anything easy um anything easy that we can look at well it's not looking too hopeful let me draw the uh metal draw some of these wires in here this goes off to here here's a small section of metal anything else i think that's good enough okay so okay well here is the okay so here is the collector of q4 and it goes to the base of another transistor so let's just go ahead and label that one too q5 okay um so there's a base and this wire down here is actually vcc if i go across the chip we know that that's vcc oops there's this tiny little section that i forgot um metal and tiny little section here i think it's probably just going to look like this and let me connect both of those paths okay so this bottom bit is vcc sometimes what i'll do is i'll just you know label it just so i know but anyway so we've got q5 um it is a single emitter transistor um q4's collector connects to the base of q5 so let's just draw that out right now so we've got this q4's collector goes to the base of q5 um the base of q5 that's actually a resistor and it goes up to plus vcc and the collector is also connected to plus vcc as well plus vcc just vcc so let me just copy this and stick it here copy this and just put it over here so that's beginning to look a lot like an inverter uh the only thing we would be missing is is the ground connection over here so i guess i should label that resistor r2 so let me draw that in so this is now r2 great all right uh so we're interested in that emitter uh from q4 so so what is this emitter connected to let's take a look so it goes off here looks like another transistor let's draw the contacts on that contact here's one and here is one here is another one here's another one that's kind of a weird one here's one and here's one all right so we'll call that q6 okay uh so q6 has one emitter so let's go ahead and draw that in q6 okay so it's going to be down here somewhere q6 and what are the connections so okay well we see that a q5 emitter goes to q6 collector so q5 emitter goes to q6 collector okay q4 emitter goes to the base of q6 so q4 emitter goes to the base of q6 there's also this resistor over here let me grab that i'm going to call this one r3 let me draw the metal on that did i just connect to ground i think i'm going to end up drawing ground here i am going to end up drawing ground okay i know that this is ground because it's on the outside of the chip so i'm just going to sort of cut it off right there you know i'm just going to cut it off right here i can i can draw the rest of ground later but um in any case this is ground so pause button for live streams can you can you pause it i thought you could pause it and go back and and forth if not that's um i'm gonna have to have a serious talk with someone because um i definitely don't expect people to um to pay attention every minute of the live stream make this a little smaller uh a little smaller than that okay so that's ground right here all right so um so the emitter of r of uh what is this q6 goes to ground so the emitter goes to ground and so does r3 i didn't draw r3 r3 is on the base of q6 great so copy this um do this okay copy ground copy this we said was r3 okay zoom out a bit all right this is what we have now this uh this sort of structure made out of a resistor and then a transistor and then a resistor and then these two other transistors that is a typical input conditioner um it's basically an inverter um and this is kind of like a push-pull situation dealio thing so yeah so we've got an AND gate followed by an inverter um have i ever gone to all this effort only to then find documentation or have a company release it uh no actually um i have seen bits of the circuit so for example in the data sheet they're going to have a typical input section and a typical output section but the stuff in between i have never actually seen them document that um well maybe i have once but generally no i hope you would also reverse some of the hard to see 7490 right okay so um okay i could really quickly switch to that i mean you've seen you know you've seen this schematic we actually have a realistic schematic we know that it's a NAND gate and we know that that is exactly what you see in the in the uh block diagram let's take a look at the other one and we're going to see we're going to see if we could see the same structure for uh r91 and r92 so let's go ahead and open up this other guy okay here we are uh first thing we need to do find the ground or find pin one pin one would look different from all the other pins uh let's see i'm going around and oh well this must be ground right because it's connected to this big thick chunk of metal or not maybe it's this other one well luckily ground and vcc are separated by one two three four pins one two three four pads so yes this top one is one of the power pin power pads and this bottom one is the other power pad and since we know that the pads follow the same order as the pins we know that this must be vcc at the top vcc pin six pin seven pin eight pin nine ground is pin 10 so well that's really quickly label this as ground ground let's make it a little bigger than that here is vcc all right so we wanted to look at r9 um here let me hide the chat uh couldn't they be in clockwise order no because that wouldn't make any physical sense um if you think about it um the the chip has pins right the pins have to go around the die so of course it wouldn't make sense to to do anything else other than wire them wire the pads directly to the pins so they have to go in counterclockwise order exactly as the pins are uh now the the numbering of the pins by convention is counterclockwise uh so we were looking for r91 and r92 so we know that that's the next pin over from vcc so here's r9 what is it r91 so let's just copy that one call this r92 so those are the pins we want to take a look at well we can see that that's funny okay so um yeah so so this was made by a company called stewart warner uh they briefly got into the micro electronics um the micro electronics business um after having made like displays or scoreboards or something weird like that and for some reason in the late 60s i think they decided to get into micro electronics and make chips they didn't last very long um but uh i've been seeing a lot of stewart warner chips anyway this one was from 1971 uh so we can see that uh these two well very quickly draw the metal out because that's easy enough to do and yes i typically do make these sounds when i'm alone and there's another contact another one another one another one another one this is kind of like those visual tests that the doctor gives you that the eye doctor gives you are you colorblind can you see the number through these color dots yeah i guess if you're colorblind you're going to have a problem with reverse engineering these things um here's a big ol contact so big ol contact yeah because it's a number uh uh because it's a line instead of a rectangle the opacity is slightly different so uh what i'm going to do is select that select the line tool grab that from the selection and then delete this and then redraw it so now i have the correct paint settings or style settings here we go that's better um here's another big contact so check it out um this is ground right over here uh this is the protective diode so you can see the explicit ground connection which means that this is an emitter or an endoped region so i'm just going to do that and this is the base and the square around it is an isolation well so there's your diode right over there so you know the ground connection is really damn explicit over here um i don't know where the ground connection was on the other one it's got to be somewhere but i don't know where it is i've heard um somebody tell me that sometimes the protection diode is actually buried underneath the pad where you can't see it well not only where you can't see it but also where it doesn't take up space on the die base well that's pretty explicit right over there okay so those are the protection diodes um now okay let me draw the metal you're probably all jumping up and down in your seats because you know what the transistor is and what it's supposed to do okay um so this is a little piece of metal that just doesn't do anything uh why is that well because this is probably just a standard transistor and i'm sure we're going to see this exact shape elsewhere um they just happened to use it and you know there was the piece of metal waiting to be connected and they didn't connect it to anything they're allowed to do that i'll draw it in anyway paint settings metal bit okay another metal here's another bit of metal with a thin piece let's just draw that out okay um so what i'm hoping is that uh if you if you would watch the livestream from the beginning you saw that i briefly pulled up this chip and i said well you know because of the colors and everything you know it's kind of difficult to see all the lines i'm hoping that you know by watching me uh work on this other uh chip over here with very clear lines you know you you've sort of kind of trained yourself a little bit to see the shapes and now it should be a lot easier to see what we're looking for here uh what's a little more difficult is where are the emitters uh let me hide the metal okay can you see this really faint line it's a faint square also can you see this line going across the metal that's a clear indication that there was a doping region over here now if we look at the base you don't see that thin line well okay you see the base you see the baseline but you don't see anything inside there you see a line around here for the contact you see a line here for the base but you don't see this uh this other line like here that i'm showing so even though you can't see well the exact lines they're not really well defined they're there so let's draw them green there's nothing here here's a line so we know that we've got to have something here green again we can see a line around here but it's not inside a base so that is a um a low resistance connection to the collector um around here uh interestingly we don't see any line crossing the metal so whatever this connection would have been it probably would have been a base connection but it's not connected to anything so let's draw the base base base base base base it's got a little funny hook here that's just a small resistor base and let's zoom out the more different zoom out okay and around the whole thing is a collector collector collector square let's lower the opacity on that and the bases could stand a little lower opacity also oops i drew it on the wrong layer no i drew it on the right layer well okay whatever um yeah i don't know why my bases are looking so purpley oh because their opacity is incorrect um let me just redraw that really quickly so i'm going to grab this base which i like and then i'm going to choose those paint settings whoa what the hell just happened um and then the base all your base are belong to us now there we go okay um here's the collector now um in the schematic from the other ship we saw that we had the protective diodes we had the connections to the emitters so what we're looking for is a resistor that goes to plus uh from the base here's the base right here uh there is a connection up here let's just draw it i already did and then there is this long line up here that goes up to here but it also continues and it goes to here which is vcc excellent so it's no different it's exactly the same um save um interestingly though that's interesting so here's a segment of a resistor and then there's a connection in the middle of the resistor and then it continues on to vcc that's interesting i wonder why they did that well we're gonna put it in the schematic and find out that's really interesting why they do that um okay mafia glad you're so excited so when i've got um when i when i'm reverse engineering multiple chips i kind of that are the same um i kind of like to uh i kind of like to use the same uh component designators so where's the other one so uh the transistor for r9 one and two is q3 so i'm just gonna go ahead and label this q3 q3 so that way it's the same thing um q3 so there's this base resistor there's actually a lot of different segments well i i guess this resistor could be considered a continuance of this resistor so this is all just one resistor so i'll just call this resistor well now i don't have an exact correspondence do i hell with it i'll just call it resistor one a i can always do that i'm allowed and this is resistor one b so in the schematic basically what i'm saying is that this resistor is actually divided into two so what i'm gonna do is um okay what just happened i hate when this happens stop it what okay um i'm just gonna take this and copy it copy you're wrong i'm kai cutting wrong okay so now normally what i would do is i would have a completely different schematic because this is effectively a different chip but you know just for the sakes of comparison i am going to put them on the same schematic so uh let me take this and move it over take this vcc and move it up copy this resistor and put it here this vcc here let me zoom in a little okay so now this is r1a value value no u r1a not ra or 1a and this is okay so that's what we have and we're going to have something going off here and something here well let's see where that goes to so q3's collector is supposed to go off to a base of another transistor and well here's q3's collector and there is the base of the other transistor let's draw it in emitter so here you can actually see the square for the emitter there's the square emitter base blue bases green emitters red diamonds oops you're stealing me lucky charms okay uh and we call that q4 okay so um the collector of q4 uh is connected between those two resistors so let's go ahead and draw that out so here is q4 i'll just connect that back up and the collector is actually going to here uh-huh so i suspect what's happening is that this r2 that's actually this so what they've done is they've basically just i guess i guess they could do that it's kind of an odd decision but okay i mean if that's what they want to do so i think that this r2 is actually over here so i'm just going to rename this r2 rename this r1 and that's what we've got so far so so whereas they had two separate uh resistors here uh here they've got um these two resistors over here i'm not quite sure why they did that i've never really seen that so here name this r1 and this is r2 oh let's see what time is it it's 210 on the left coast so should i continue well i guess i don't know i'll leave it up to you i mean obviously some of you are going to want me to continue and i would continue and continue but you know i'm getting a little bit tired but uh yeah maybe i'll just stop right over here we haven't fully reverse engineered the chip but you can see kind of you know how we're getting there we're getting to that point typically what you would do at this point is you would hit the books there are textbooks out there about ttl design and you would see what a typical standard ttl circuit would look like um place some zork uh so you know you would see that this kind of circuit is actually what you would find in typical ttl circuitry uh let me actually go ahead and look at ttl circuitry images and hey let's look at let's see where yeah i don't have any recommendations at all for ttl books everything that i've done is on the web oh hey look at this um here we go the basic ttl logic circuit is the nand gate well do some more risk v5 stuff i will um so we can see there's that input transistor um here's that diode it's called a a diode steering circuit because the current either flows this way or it flows this way um and if it flows this way then you're cutting off this transistor over here so we've seen this we've seen this resistor we've seen this one over here we've seen this resistor and this resistor we've seen well okay i mean it we didn't see the totem pole output per se um but at least we did see one transistor on top of another there's this diode over here that um appears on the output circuit and now i'm kind of wondering if that appears internally let's go ahead and really quickly take a look so what we're looking for is in this circuit um not there here between q5 and q6 is there a diode from the emitter of q5 let's look at q5 for a moment q5 is there a diode between the emitter of q5 and the collector of q6 no it doesn't look like it okay well i thought that you know maybe i would find one yeah if this were a diode then this would actually be a p region maybe it is uh it could be it could be a tiny little diode but uh i don't know i'm i'm not convinced i'm not convinced um usually you know with diodes they would be explicit i mean they would be really clear if they were diodes so anyway um so it's not there but that's okay well i guess that's about it let's uh zoom out and see what we've done so uh that's kind of cool um i'm probably going to spend the rest of the weekend working on this just so that i can finish it up when it is finished you will see it on project 54 74.org so um please take a look at that website if you're interested there is a lot more information than just images there is some reverse engineering tips and techniques and how to actually decap chips so check that site out check out the other videos on my channel and subscribe if you aren't already subscribed which i cannot believe that you're not check out my patreon page the link is down in the do believe do one of these things um not because i'm asking for patrons although that would be nice but there are nice articles that i've written about reverse engineering the chips uh so i think with that i am going to end the live stream um you should be able to view the entire live stream uh even if you've just picked up in the middle i'm pretty sure and with that i think i will say see you next time end streaming now end screaming now