Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 18 submissions in the queue.
posted by janrinok on Sunday November 29 2015, @06:11AM   Printer-friendly
from the how-some-of-us-started dept.

This is about my homebuilt TTL computer processor. TTL stands for "transistor-transistor logic" and refers to a set of first-generation integrated circuits (I.C.'s) that contain simple logic gates, buffers, a binary adder, flip-flops, registers, decoders, multiplexors etc. These series 7400 I.C.'s are carefully designed so they can be connected together in patterns to make larger logic circuits. I built a computer central processing unit (CPU) of my own design out of these I.C.s.

I am not an engineer or computer scientist. I am a computer hobbyist. My first computer was a Sinclair ZX-80. I learned BASIC, and later Z-80 assembly language. Using the BASIC PEEK and POKE statements I wrote simple assembly language programs on this little machine. Later, I wrote some simple video games on a [Tandy] TRS-80.

I was interested in how these machines worked on the electronic level, so I bought a Radio Shack Digital Logic Learning Lab, a kit with a single 7400 I.C. (four NAND gates) and various light-emitting diodes, resistors and capacitors. I got a good feel for how a digital I.C. works with this inexpensive kit. I read some books about building your own 8-bit computer, and tried it using a Z-80 processor. My first attempt was a complete failure because I did not have the ability to test the system. I built it, it didn't work, and that was that. Next time, I made sure that I designed and built the computer in such a way that I would know why it did not work. One must expect that after making several hundred connections, one will get some wrong, and one must be able to correct one's mistakes.


Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 4, Insightful) by mhajicek on Sunday November 29 2015, @06:21AM

    by mhajicek (51) on Sunday November 29 2015, @06:21AM (#269365)

    Probably the only guy on the planet with a completely secure computer.

    --
    The spacelike surfaces of time foliations can have a cusp at the surface of discontinuity. - P. Hajicek
    • (Score: 2) by DNied on Sunday November 29 2015, @11:48AM

      by DNied (3409) on Sunday November 29 2015, @11:48AM (#269414)

      <tinfoil>With Chinese transistors? Gimme a break!</tinfoil>

      • (Score: 0) by Anonymous Coward on Monday November 30 2015, @02:12AM

        by Anonymous Coward on Monday November 30 2015, @02:12AM (#269570)

        American transistors would have me more worried.

  • (Score: -1, Offtopic) by Anonymous Coward on Sunday November 29 2015, @06:32AM

    by Anonymous Coward on Sunday November 29 2015, @06:32AM (#269367)

    Hans Reiser did not one thing wrong. Not one thing.
    The Mountain Man in Colorado did not do anything wrong either?
    They both faithfully executed a commandment in Deuteronomy for their God.

    Hans Reiser killed the adulterous woman, as explicitly commanded to do.
    Mountain Man of Colorado killed 2 people who entice others to follow another god/ruler/judge other than that of Deuteronomy.

    They were just doing what they were told by their religion.

    Mountain man from Colorado and Hans Reiser did nothing wrong.

                                    >In the United States, as late as the 1880s most States set the minimum age at 10-12, (in Delaware it was 7 in 1895).[8] Inspired by the "Maiden Tribute" female reformers in the US initiated their own campaign[9] which petitioned legislators to raise the legal minimum age to at least 16, with the ultimate goal to raise the age to 18. The campaign was successful, with almost all states raising the minimum age to 16-18 years by 1920.

                                    Even though Deuteronomy allows it (Deuteronomy 22 28-29, hebrew)

    • (Score: 0) by Anonymous Coward on Sunday November 29 2015, @10:01AM

      by Anonymous Coward on Sunday November 29 2015, @10:01AM (#269395)

      Thankfully things have moved on in the last couple of thousand years.

  • (Score: 4, Interesting) by MichaelDavidCrawford on Sunday November 29 2015, @06:57AM

    by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Sunday November 29 2015, @06:57AM (#269372) Homepage Journal

    I wanted an Apple II but they were way out of my price range. Many years later I bought my parents a Macintosh for Christmas; they were completely overwhelmed as they had been convinced that personal computers would be far, far beyond their reach.

    I attended UC Davis over the summer between my Junior and Senior years of high school. I enrolled in Introduction to Computer Architecture with the expectation that I would learn how to build a computer with a soldering iron. What we actually did was write LSI-11 device drivers in hand-assembled octal, then entered into the Octal Debugging Technique (ODT) with a keypad.

    That class had me totally snowed but a EE grad student took interest in a high school student taking what he himself regarded as a difficult class and so he offered to be my lab partner. One of only two Cs during high school I figured that would keep me out of a good University but no I was accepted to Caltech to major in Astronomy. Nowadays I figure the admissions committee looked favorably on my even attempting such a damn-fool ignorant ill-advised class, Caltech is heavily into that kind of thing.

    I never did build my own computer all on my own but at UCSC I took an analog and a digital electronic course, taught by the physics department with the aim of teaching us to build our own experimental apparatus. There I wired up a simple Z-80 computer with binary input toggle switches, along with a pushbutton to store the binary in memory. What was really cool is that the Z-80 has static registers so one can single step the clock, or use a variable square wave source then dial the speed up and down.

    We hand-assembled to binary the code for a simple counter then I would make it count faster and slower by turning a dial. That roxored my boxors. I got the second best grade in the class.

    --
    Yes I Have No Bananas. [gofundme.com]
    • (Score: 2, Touché) by anubi on Sunday November 29 2015, @09:22AM

      by anubi (2828) on Sunday November 29 2015, @09:22AM (#269391) Journal

      About messing with the CPU clock... that sure was a powerful trick when you are trying to phaselock your CPU to some external signal stream...

      Remember that old video cookbook by Don Lancaster regarding using the old 6502 chip to create video? That trick could be used to genlock the CPU to the pre-existing video stream - using vertical and horizontal sync from the video signal to genlock to, as well as the vertical and horizontal sync the 6502 was generating, then using analog VCO techniques, phaselock the 6502 clock so that the syncs would line up. Then the 6502 cheap video generator would place text over existing images.

      I later used the same trick to get a 6502 to lock onto a high speed manchester encoded signal ( homemade disk drive for an IMSAI ) with far simpler electronics than if I had to do all that decoding in hard logic. ( No, I was not compatible with anybody.... Although I could use standard eight inch disks, I was the only one that could write or read that particular format... at that time, there were very few people to be compatible with anyway, and I had no idea how they did it anyway. I was just fortunate enough to get a couple of tossed CALCOMP drives that the mechanical stuff still worked on... the rest was all handwired vectorboard. I had no idea how its original circuit worked. ). For what its worth, it was a very simple program storage - I had something like eighty tracks I could put a program on, and my simple little reader/writer, when invoked from IMSAI's eprom with the track number, would just wait for the index hole to pass then read/write 4K of whatever starting at a given address in RAM. So, to invoke from eprom, the command "L 20 4 (CR)" would load track 20 to the 4'th 4K static RAM board in the IMSAI.

      I was writing and reading directly to the magnetic head of that device ( uA733 and 8T20 for read, and a pair of 8T97 outputs for write ) and had to drive the track stepper motor from power transistors driven from a parallel port.

      It was up to me to keep track of what went where in a little notebook.... So primitive it was fun. I never did get around to re-doing the thing with a FD1771 chip...

      I like stories like yours... reminds me of how much fun I had.

      When I felt I was blazing a new path, not just trying to stay in a rut someone else blazed before me.

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
  • (Score: 2, Interesting) by tftp on Sunday November 29 2015, @08:48AM

    by tftp (806) on Sunday November 29 2015, @08:48AM (#269386) Homepage
    When I was in University I worked part time servicing IBM 360 (and some 370) stuff. My field was peripherals, but I could deal with the CPU and the I/O channel if necessary. I had lots of fun troubleshooting those TTL circuits; they tended to have issues with 10 kV that was the anode voltage of the CRT :-) I can understand building a 360 processor in an FPGA and booting the OS/360 on it... but building it in logic is not desirable. A good processor requires a lot of those gates and simple registers; and why to build a bad one?
    • (Score: 1) by anubi on Sunday November 29 2015, @09:44AM

      by anubi (2828) on Sunday November 29 2015, @09:44AM (#269394) Journal

      I saw this old Data General machine which I think was mostly TTL. So many circuit boards I figure it was a wonder it worked at all before some bad connection somewhere would crash it. Even saw ( but could not use - as it would not work ) an old Bunker Ramo 330 that was made with ... uh... Germanium transistors!. Yes. Germanium. Type 2N123 (PNP) and 2N167(NPN). Uh..huh.. I thought I might be able to fix the thing. Only thing I could make work was its power indicator. So much for a newly minted bachelor of electronic engineering, eh?

      I ended up waiting for the big boys to get the processor into a standard package ( 8080, 6502, and later, the 68000 ) before I could "make" my own machine.

      And, even then I cheated and bought an IMSAI kit.

      Like you say, a CPU is a humongous thing to try to implement with glue logic.

      About that 10KV on the CRT... just what was it with those green IBM monitors anyway? They seemed so well made, yet I noted HV issues with those things too. The way they were made, they seemed like they would last until the phosphor burned out on the screen...which I would not live long enough to see. I took several apart, and was very impressed with the assembly quality of those monitors... All I could figure out is the high voltage transformer was arcing internally - but the way it was made, it was hard to see how that could happen.

      --
      "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
      • (Score: 1) by tftp on Tuesday December 01 2015, @02:09AM

        by tftp (806) on Tuesday December 01 2015, @02:09AM (#269990) Homepage

        I had as many of these [pc-history.com] as I could carry. I did my best. I had no shortage of those diodes and transistors from that point on :-) That board was from Minsk-22 [narod.ru].

        • (Score: 1) by anubi on Tuesday December 01 2015, @06:41AM

          by anubi (2828) on Tuesday December 01 2015, @06:41AM (#270055) Journal

          Those look almost exactly like what that Bunker-Ramo 330 was full of. Slightly different board dimension, but similar complexity and manufacturing technology.

          I still have some of those old boards... as the University junked it and I got a chance to have at it for a few minutes on its way to the scrapyard. One of the benefits of being one of the engineering lab techs, I suppose. I figure the mercury-wetted relay boards in it were the most useful things I got. The other boards were pilfered for transistors and other parts, as at the time I was building all sorts of little things ( and getting experience on how to let the magic smoke out of things ).

          --
          "Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
  • (Score: 4, Interesting) by shortscreen on Sunday November 29 2015, @10:34AM

    by shortscreen (2252) on Sunday November 29 2015, @10:34AM (#269399) Journal

    I've never had the inclination to build anything even slightly complex out of TTL. I remember hearing about a program that could take a schematic and turn it into data for an FPGA to use, which I thought was cool (verilog/vhdl didn't look very appealing to me) although I never got around to trying this. But, I've thought about what my instruction set might look like, were I to design my own CPU.

    Generally, the type of CPU that I would like to program on would be the more CISC-like ones like a 68K or an NEC V60. The downside is that the instruction encoding is more complex on these, which figures into how complex the CPU logic is and how well it can be optimized for performance (eg. pipelining). The opposite extreme (RISC style) would be a Hitachi SuperH, with fixed 16-bit instruction length, minimalist instruction set, and high instruction thoughput. ARM and the NEC V830 were not quite as minimalist.

    The 8086 instruction set by itself can be viewed as similar to a Z80 but improved. NEC's assembler used opcode and register names more similar to the Z80, so instead of BX,CX,DX,SI,DI they had BC,DE,HL,IX,IY (or something like that). Whereas the 386+ instruction set is messier, and you don't really gain any (general purpose) registers but the 8-bit ones become less useful.

    Not having instructions with immediate data is something that bugs me. One idea I've had to work around this while keeping the benefits of fixed 16-bit opcodes, would be having a "load immediate" opcode that would load 15 bits of data into a register. For instance, it could be a 16-bit opcode with the MSB set, with the lower 15 bits containing the data. So now the rest of the instruction set would have to fit in 15 bits, since I just used up 32,768 possible opcodes to implement "load immediate". But unlike a typical variable-length CISC instruction where the immediate data would follow the opcode, this way the data enters the CPU before an opcode that will make use of it.

    Another thing that bugs me: I don't like special purpose instructions that turn out to be slower than using more general instructions to do the same thing. Like spamming LDI on the Z80 instead of using LDIR.

    Unusual word sizes are interesting to think about. For instance, what if you took a 6502 and stretched the registers from 8 to 10 bits, and the address bus to 20 bits. Now you can access 10Mbits of RAM, and the zero page has 1024 words. I wonder how that would have fared in a mid '80s home computer or game console.

    • (Score: 1) by terryk30 on Sunday November 29 2015, @01:35PM

      by terryk30 (1753) on Sunday November 29 2015, @01:35PM (#269426)

      Not having instructions with immediate data is something that bugs me. One idea ... would be having a "load immediate" opcode that would load 15 bits of data into a register. ... But unlike a typical variable-length CISC instruction where the immediate data would follow the opcode, this way the data enters the CPU before an opcode that will make use of it.

      Unusual word sizes are interesting to think about. For instance, what if you took a 6502 and stretched the registers from 8 to 10 bits, and the address bus to 20 bits. ...

      Although these aren't full-blown general-purpose CPUs, if you're fascinated with instruction set architecture check out the optimizations made for various 8-bit microcontroller families.

      You may as well name that immediate data intermediate register you've imagined above (say, "I"). Then your "load immediate" becomes LDI and some of the other arithmetic and logical instructions (which use a set of general-purpose registers) also refer to "I". Well, along with 14-bit opcodes in separate program memory (which have enough room to specify registers, bit numbers, or even 8-bit data), you've got the PIC 16 family (at least - that's the one I'm familiar with) - except "I" is named "W", "immediate" is referred to as "literal", etc.

      (You also get banks of registers and pages of codespace - with the extra bits specified in various ways - this is where the fun or madness begins...)

  • (Score: 1, Informative) by Anonymous Coward on Sunday November 29 2015, @03:13PM

    by Anonymous Coward on Sunday November 29 2015, @03:13PM (#269433)

    ya, lots of us have done that in the 70's and 80s. I have too. But i wouldn't do it again. This is 2015, not 1980. You can get the same learning experience ( about digital logic, not burning your fingers ) using a FPGA and the proper design tools. You could even skip the hardware and just emulate the FPGA if you wanted to...

    • (Score: 2) by tibman on Sunday November 29 2015, @08:33PM

      by tibman (134) Subscriber Badge on Sunday November 29 2015, @08:33PM (#269508)

      I don't think it would be the same experience. That FPGA will come on a dev board. You will not be making anything as far as hardware goes unless you integrate with some external stuff. You'll have zero reason to use any real test equipment. The entire learning experience will be about concepts and software. Then at the end they still won't know what a 7404 is and the project in this article will continue be a mystery to them. But! You are right that an FPGA is far better to learn (as far as getting a job goes) than 7400 series chips.

      If the finger burning comment is about soldering irons then i double down on it not being the same experience : P

      --
      SN won't survive on lurkers alone. Write comments.
  • (Score: 0) by Anonymous Coward on Sunday November 29 2015, @05:44PM

    by Anonymous Coward on Sunday November 29 2015, @05:44PM (#269463)

    My first home computer was a z-80 s100 bus machine, following spec's from Kilo-Baud magazine. 1977 time frame (sr high school). The board was all wirewrapped, with 4k of static ram. My mother wanted to know why I was doing it? I asked why she knitted?

    My college days, I was a test student of new class to be taught "micro processor design" by a number of assignments that in the end was to build a working 4 bit computer from about 50 TTL chips provided. I added a 555 timer to get a clock other than a switch push. We use 74154 for base decoding and 74181 ALU. Opcodes where based on ALU 4bit inpout, with 74154 and a few low-level logic gates (ands and ors reverse in low-level) to handle modification to ALU (had 4 op modes). Built a working machine with only 15 parts out the 50 we were given 5x 4inch punch boards. The fun was seeing other teams using 100's of chips, because the only thought in high-level logic. 74154 puts a low on one of 16 pins, when the it decodes, then Not it, so high, and/or it, not again and feed into ALU.

    I would hate to see their coding style if they only think in high-level logic.

  • (Score: 1, Interesting) by Anonymous Coward on Sunday November 29 2015, @05:54PM

    by Anonymous Coward on Sunday November 29 2015, @05:54PM (#269465)

    It's from 2004, and still has a webring!

    • (Score: 2) by joshuajon on Monday November 30 2015, @07:38PM

      by joshuajon (807) on Monday November 30 2015, @07:38PM (#269870)

      The webring is actually pretty interesting. I poked around for a while and didn't find a dead link. Seems these homebrew hobbyists still bother to support their own stuff :)

  • (Score: 3, Informative) by Dr Ippy on Sunday November 29 2015, @06:48PM

    by Dr Ippy (3973) on Sunday November 29 2015, @06:48PM (#269482)

    TTL wasn't the first generation of logic ICs. Before it came DTL (diode-transistor logic), and before that RTL (resistor-transistor logic). I remember buying an RTL chip -- which looked like a spider -- and using it analogue-wise to make a guitar fuzz box, of all things! It sounded great.

    I'm not sure where this fits in, but there was also ECL (emitter coupled logic), which was very fast because the transistors weren't allowed to saturate.

    TTL was fast (for the time), but it needed a bunch of ceramic decoupling capacitors to make sure the 5V supply didn't get spikes on it. I believe (but prove me wrong) that TTL was the first logic family to standardise on a single +5V rail, which of course is the de facto standard nowadays for just about everything, including USB.

    After the original 74 series came the 74S (Schottky) series, which was even faster.

    When CMOS logic came in, there was the 4000 series, which is still going strong, but competing with it, the 74C series, which was pin-compatible with the 74 and 74S families. It felt very familiar to logic designers, but it was slow, not so susceptible to interference glitches, and had very low power consumption.

    Ah, those were the days! But I wouldn't go back there for the world.

    --
    This signature intentionally left blank.
    • (Score: 2) by Snotnose on Monday November 30 2015, @12:56AM

      by Snotnose (1623) on Monday November 30 2015, @12:56AM (#269558)

      TTL was fast (for the time), but it needed a bunch of ceramic decoupling capacitors to make sure the 5V supply didn't get spikes on it.

      You also needed pullups on your address/data lines to get good speed out of them. I remember once we got a batch of boards where the fab accidently put caps instead of resistors in the appropriate tubes and we got a bunch of boards that flat out did not work. Funny as hell to look at the lines on an o'scope though, then call your co-worker over, then everyone is looking at it laughing.

      --
      When the dust settled America realized it was saved by a porn star.
  • (Score: 0) by Anonymous Coward on Sunday November 29 2015, @07:04PM

    by Anonymous Coward on Sunday November 29 2015, @07:04PM (#269491)

    Call me when you can run Quake on it.