8-bit TTL computer: Problem with cascading 74HC193 chips synchronously

Discussion in 'The Projects Forum' started by m4ch1n314ngu4g3, Aug 20, 2013.

  1. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    For the past year or two, I've been designing an 8-bit computer mainly consisting of TTL and CMOS 74HC and 74LS series chips. It's called the SCHM8BF001 computer architecture and my current stage is at the construction of the SCHM8B1001 CPU. And no, I'm not building it all from NAND gates and please don't go into the impracticalities of building such a device as it has been quite a help in testing my problem solving skills for developing various speed applications in hardware for the device.

    I already understand that I will be needing some pull-up resistors for the 74LS outputs (perhaps suggest a good value I could use? I currently have a bunch of 10K Ohm 1/4 Watt resistors which might be sufficient.

    Anyways, I have 21 breadboards stuck onto a wooden panel and most of the spaces have been filled with the chips I will be needing. Some of the chips are being removed, replaced or rewired as I encounter problems or come up with improvements.

    My design includes an Instruction Register (implemented with a CY7C130 DIP dual port SRAM), a program PC and an 8 bit adder (two 74LS83s) connected to the output (keeps the second address ahead by one at all times (necessary for instruction set output and running cycle)), including the necessary circuitry for a 1 clock per instruction cycle (running at 8 MHz with an auxiliary 16 MHz clock attached to a 4-bit binary counter as a frequency divider).

    Other aspects include a decoder which I am currently developing to accommodate the second version of my instruction set. Along with a D Register (data), AD Register (address data), CD Register (control data), and a C Buffer (control opcode expansion buffer), the device is outfitted with a 32-bit shift register (high speed long multiplication operations with 8 to 16 bit signs including overflow and underflow registers for quick 32 to 64 bit sequential cascading, *implemented with 8 74HC194 4-bit bidirectional shift registers), PC1 and PC2 24-bit address program counters (uses 6 bidirectional 74HC193 4-bit counters), and a 32-bit Incrementer/Decrementer (used to increment and decrement variables. Will gain the ability to be separated into two separate 16-bit counters. Uses 8 74HC193s). Other devices include the ALU with it's A, B and C registers whose functions are implemented using two cascaded 74181 4-bit ALUs, carry register for quick multi-signed cascading, and finally, the CLU (conditional logic unit) which interprets the output of the ALU to produce a Boolean result based on A == B, A != B, A < B, A > B, A <= B, A >= B, whose signals are perceived when setting the ALU to A minus B minus 1 (no carry input).

    Now, the main problem is with the Incrementer/Decrementer which no matter what, must be able to increment and decrement it's values. The PC1 and PC2 were supposed to be up/down counters but they can remain as up counters using the 74HC161 binary counter. The advantage with the 74HC161 is that it has count enable pins which are necessary in synchronous cascading where all the chips are connected to the same clock. That way, you can synchronously cascade them with no additional chips except the output enabling 74HC541 buffers.

    The problem with the 74HC193 up/down counter is that it doesn't have a count enable pin and can only be cascaded using ripple carry. If it was two counters alone, then I would have the problem with the delay as we only have the delays of the first and second chip. The same goes with two 74HC161 chips, synchronous or not. But after that with the addition of more chips, the counter using 74HC161s in synchronous cascading will have a maximum delay of two chips. 8 74HC193s using asynchronous cascading would simply take two long as it only has 125 ns (within an 8 MHz cycle) to produce a result and there is also the delay of the decoder itself.

    I do have a way to synchronously cascade these chips using the !PL pin and through regulating whether the chip's output goes back to it's own input (if the load enable is activated, it will load it's own value, thus retaining it's value until the load enable is deactivated (like a count enable)). For the first counter, the !TCU and !TCD (terminal up and down count pins) are attached to a 74HC00 NAND gate and it's output to the !PL pin of the next most significant chip. A buffer will be included to disable it's signal when the machine code program is loading a byte into the counter. But for various reasons, there were a huge number of things wrong with the edit I came up with concerning the conflicting isolation and connection between pins.

    E.g. in one instruction, the !PL pins/count enables of the binary counters need to be separate so that the binary counter can function, but in another, each pair of chips need their !PL pins connected in order to load a byte.

    Then we have the connection from the output enable buffer back to the input. The outputs of those buffers are all connected together and so are the inputs of the counter and I didn't realize this (I will include a schematic when I have time and if it is needed). I have a solution that uses additional buffer, but that will require 8 more 20 pin chips for the Incrementer/Decrementer alone. Hence, I will be leaving the PC1 and PC2 only as a single direction counter with the 74HC161s cascaded synchronously.

    So if anyone has any ideas on how to cascade 8 74HC193s together synchronously without adding too many chips or maybe even none, please share as this has been stunting my work for a while and I intend on executing it's first instruction before the end of the summer break.

    I will post the schematics if necessary.
     
  2. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    I understand your desire to keep everything pure 74LS/74HC logic, but you may wish to consider replacing this one particular aspect of the circuit with a programmable logic device. This will at least get you to your first instruction (by the end of summer), and then you can rebuild later with pure logic to ultimately fulfill your dream.
     
  3. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    Well, I've basically completed the majority of the circuit and have an instruction set that I can work with. Right now, I already know what I want to do. It's just a matter of whether there is an easier way to cascade this binary counter so that I can retain certain functions. I'm the kind of person who doesn't stop until I've achieved the main goal.

    What do you mean by a programmable logic device. The problem with doing that, though, is that it would basically create a whole new project which requires brand new plans which won't really save me any time. Or do you mean making an FPGA counter? Wouldn't that be a bit like creating a new integrated circuit?
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,692
    2,756
    Here are some example parts on Digikey:

    http://www.digikey.com/product-sear...-plds-programmable-logic-device/2556353?k=pld

    You program them with your desired logic, then plug them in just like any other IC. So, you could use a small one to "emulate" your own version of a synchronous up/down counter with synchronous cascading. Or, you could get a larger one and integrate most or all of your bits on one chip. Up to you.

    PLDs are similar to FPGAs except that PLDs are generally *much* smaller and less expensive, and have far less overall capability (for instance, you could design you whole computer in 1 FPGA, most likely, with room to spare).

    Also, PLDs generally use flash to store the "program". FPGAs are volatile (in all cases?), and require an external memory to load from upon power-on.
     
  5. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
  6. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    @joeyd999

    Ok, thanks. I may consider using these devices in the future. But as of the present, I find that my current limits concerning the integration of my circuits would be to make a PCB that holds 16 4-megabit Flash memories including SMD 74HC series chips to act as a decoder. If my plans to keep only the INC/DEC as an up/down counter works, then everything should be fine for my designs. I've got all week to finish my circuit.

    @ScottWang

    Yes, I know about this site. Anyways, my general approach at design is self propagation of ideas, application and verification and acknowledgement upon the views of other designs,
     
    Last edited: Aug 20, 2013
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I may not do everything as you did, but I'm thinking about to build a small controller, the parts as 74181, or using 89C2051 to simulate the function of 74181, and using 6264, eeprom, some I/O chip etc...

    Using the basic TTL or CMOS ic to build a CPU or small computer is a big engineering, but it can be learning many things which never known before.

    As I knew someone who wrote the software of multi tasking for 8051, that is squeezed the all ability of uC.
     
  8. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    The problem is that I don't know what to do with all the chips I will be replacing as I have a bunch of unused once what may be used in the future. I pretty much have to get 12 more 74HC161 counters and re-wire the PC1 and PC2. Anyways, I believe I will be using the 12 74HC193 chips I would have discarded as the binary counters for the flash memory and SRAM memory PCBs I will be making in the future.
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    If you drawing a block diagram to show how the structure of computer, it will be more easier to understand what's the picture in your mind.
     
  10. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    I attached the main schematics for the processor to this reply. Just rotate it clockwise. It isn't finalized though and I have done a few edits to it in my own notebook. For example, the IR features two 4 bit shift registers as the main instruction cycle propagating device. I have made changes to this so that it runs at one instruction per clock. I also included a general machine description of the instruction set (Unfinished).

    I didn't fill in some of the part numbers.
    *IR SRAM: CY7C130-55PC (55 ns propagation delay)
    D Type Flip/Flop: 74HC74
    AND Gate Hub: 74HC08
    OR Gate HUB: 74HC32
    XOR Gate HUB: 74HC86
    XNOR Gate HUB: 74HC86 attached to 74HC540 Octal inverter buffer hub.
    Constant output enable.
    4-bit binary counter: 74HC161
     
    Last edited: Aug 20, 2013
  11. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    If you want to use SCHM8B1001, why you still have 74181?
     
  12. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    I apologize if I made "SCHM8B1001" seem to be an existing IC chip. It's just that I developed a special part numbering scheme for the SCHM architecture circuits I built. 1000 stands for 8-bit CPUs. F000 stands for entire Personal Computers containing parts like the SCHM8B4084, which is a Flash Memory (4000 series) that has 8 divisions (individual Atmel Type Flash Memory Chips), each being 4 megabits in size. The system is in hexadecimal and based upon how it is read, the BIOS can identify a device number and know it's maximum parameters.

    Else, I simply forgot to state that I used 2 74181s in ripple carry cascading to make an 8-bit adder along with 15 other arithmetic and 16 other logic functions which makes the instruction set, in the case of ALU control, a lot more flexible. And as a fully TTL/CMOS device, I consider the 74181 to be the most useful in that it greatly reduces the number of chips I need to incorporate various functions being a processor in it's own self.

    And yes, I do have access to all of the chips in the list as there are two large electronics stores (one is a warehouse where I found the 74181s, I took 13 out of 18 to use for future projects) close by, except for the 4 megabit SRAMs and Flash memories which I can get on digikey.
     
  13. m4ch1n314ngu4g3

    Thread Starter New Member

    Aug 20, 2013
    27
    0
    Good news everyone!

    Thanks to futurlec and the catalog descriptions it gave for it's 74HC chips, I had no idea that the 74HC191 "pressetable synchronous counter" was an Up/Down counter with a counter enable! The only difference is that there is no clear enable. But I can easily incorporate 8 pull down resistors on the bus and utilize the already incorporated common load connections to load zero to all of them. But it's pretty sad that all of my 193s have come to a waste.
     
Loading...