Shop OBEX P1 Docs P2 Docs Learn Events
The Logical direction — Parallax Forums

The Logical direction

TCTC Posts: 1,019
edited 2014-01-28 09:38 in General Discussion
Hello all,

This thread is in reference to my wife’s coffee table, and me wanting to do logic gates to passably control the LED matrix. Here is the thread if you want to know more.

I have a question for the ones that have designed things using logic gates.

I don’t have much experience with part numbers, special functions, etc… It took me almost 3 hours to fully understand a “SN74LS163A” (4 bit counter). I knew this was going to be a extremely difficult task when I started.

I do understand the basic logic gates (AND, OR, NOT, NAND, NOR, etc..)

My question is, where would you start? I am trying to make a 8x16xRGB matrix. The matrix control does not have to do any computing(not yet, could change years from now). I just want it to read from RAM, and scan the matrix with no input from anything else.

I am not asking for anyone to design the matrix for me. I just don’t have experience with designing logic circuits. And I bet there are a few gurus on here that has.

Thanks
TC

Comments

  • rabaggettrabaggett Posts: 96
    edited 2014-01-27 05:30
    It COULD be done with logic and memories, if you really want to make it a logic problem instead of a microcontroller project, but 12X19X3=684 bits, it's going to get HUGE, and then with only 8 possible colors per pixel.

    If you're open to a microcontroller, a BS2 or a Propeller could VERY easily run a few of these: http://www.adafruit.com/products/738
    for 16 million colors per pixel!
  • TCTC Posts: 1,019
    edited 2014-01-27 06:40
    I have already started on the design for my wife's table. It is going to be 16x32, 8-bit per color.

    Just as a side project I want to use logic gates to control a 8x16, 8-bit per color matrix.

    I have always had an interest in logic gates. But never made something useful. That is why I am asking, what would be my best starting point?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-01-27 07:12
    Regarding the original direction, I was trying to assert that you should divide the project in to two halves.

    A. The display with logic directly involved in scaling up to the power drivers that drive all the LEDs. There are some good alternatives where logic chips - such as a counters - might free up more Propeller i/o and ram for the fancy stuff.


    B. A microcontroller section. I suggested that you have the ability to swap out a couple of Propeller boards as you are likely to want to try to improve the display over time. That is about as far afield as I would go.

    This could all be done with logic chips and if you are extremely motivated to do so ... it could all be done with just NAND gates or NOR gates if that is your heart's desire..

    But what is the point of hardwiring something in a big package when it can be done in programable firmware in a very tiny package? If you so desired, you could skip the chips and try to do it all with vacumn tubes or mechanical relays and have to provide new house wiring to operate it.

    There is a lot of history and you can step back into time and build nearly anything. But if you just want to learn, the Propeller is a very good platform to do at a very reasonable cost and in a very small package.


    ++++++++++++++
    If you want a good starting point for logic gates, an introductory university text on the subject would be your best bet.

    I have a copy of "Digital Fundamentals, 7th edition" by Thomas L. Floyd; Prentice Hall, Inc., 2000.

    That might be as good as any. Visit a university with an electronics engineering school near you and take a look at the texts in the campus bookstore and/or the library.

    +++
    To give you an idea of the problem of scale... To replicate 32K of ram, how many D latch flip-flop chips would you need. It gets rather absurd to wire and build. And there are other newer alternatives to replicate a CPU. The Propeller 2 is open-source and there are a group of people that have been developing code on devices that replicate its internal logic.

    In sum, reinventing the wheel just might have you living in the Stone Age..
  • Mark_TMark_T Posts: 1,981
    edited 2014-01-27 07:15
    I'd suggest for learning resources there must be many tutorials covering subjects such as:

    RS flip-flops, JK flip-flops, DQ flip-flops, transparent latches, ripple counters, synchronous counters, shift-registers,
    FIFOs, decoders, selectors and the like - these are the next level up from simple gates.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-01-27 07:30
    A good text book is far better than all the tutorials on the internet. Most of the stuff on the internet is recycled from one author to another without much thought of tying together the whole subject.
  • piguy101piguy101 Posts: 248
    edited 2014-01-27 07:38
    Try this: http://www.radioshack.com/graphics/uc/rsk/Support/ProductManuals/2800027_P2_PM_EN.pdf
    I
    learned all of my CMOS logic from this bad boy by Forrest Mims. The final project is fascinating; by using three digital ICs, an op amp, and a resistor network, the circuit converts light intensity from 0 to 9. On the Prop or BS2, the code would take five minutes to write and build, but without micros, it is much more fun.
  • TCTC Posts: 1,019
    edited 2014-01-27 07:45
    Regarding the original direction, I was trying to assert that you should divide the project in to two halves.

    A. The display with logic directly involved in scaling up to the power drivers that drive all the LEDs. There are some good alternatives where logic chips - such as a counters - might free up more Propeller i/o and ram for the fancy stuff.


    B. A microcontroller section. I suggested that you have the ability to swap out a couple of Propeller boards as you are likely to want to try to improve the display over time. That is about as far afield as I would go.

    I am going to do that for the table, I want to keep it simple.
    This could all be done with logic chips and if you are extremely motivated to do so ... it could all be done with just NAND gates or NOR gates if that is your heart's desire..

    I am not that motivated as of yet.

    But what is the point of hardwiring something in a big package when it can be done in programable firmware in a very tiny package? If you so desired, you could skip the chips and try to do it all with vacumn tubes or mechanical relays and have to provide new house wiring to operate it.

    More of just A learning experience, and because I personally think logic gates are cool.
    If you want a good starting point for logic gates, an introductory university text on the subject would be your best bet.

    I have a copy of "Digital Fundamentals, 7th edition" by Thomas L. Floyd; Prentice Hall, Inc., 2000.

    That might be as good as any. Visit a university with an electronics engineering school near you and take a look at the texts in the campus bookstore and/or the library.

    I never thought of that.
    To give you an idea of the problem of scale... To replicate 32K of ram, how many D latch flip-flop chips would you need. It gets rather absurd to wire and build. And there are other newer alternatives to replicate a CPU. The Propeller 2 is open-source and there are a group of people that have been developing code on devices that replicate its internal logic.

    Im not going that far, Wiring would be insane.
    In sum, reinventing the wheel just might have you living in the Stone Age..

    I am not trying to reinvent the wheel. That is not the point. I am just trying to use a dieing way of doing things in this world of microprocessors.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-01-27 07:47
    I still say that you can learn a lot more from a textbook from a good university bookstore, than buying a Forest Mims book in Radio Shack.

    I like Forrest Mims, but it is not a rigorous explanation of the subject. Neither is an Ardunio cookbook. And often, you can buy a used textbook for less.

    Just think. You can buy the text, skip the lectures and read at your own pace and save a huge amount on tuition.
  • TCTC Posts: 1,019
    edited 2014-01-27 07:49
    Mark_T wrote: »
    I'd suggest for learning resources there must be many tutorials covering subjects such as:

    RS flip-flops, JK flip-flops, DQ flip-flops, transparent latches, ripple counters, synchronous counters, shift-registers,
    FIFOs, decoders, selectors and the like - these are the next level up from simple gates.

    I thought of of that, but it is hard to fully understand them without experimenting with them.

    I would like to change my question if I may.
    What would be the best parts (part number, manufacture, etc..) to experiment with? I am getting lost with all the part numbers.
  • TCTC Posts: 1,019
    edited 2014-01-27 07:50
    piguy101 wrote: »
    Try this: http://www.radioshack.com/graphics/uc/rsk/Support/ProductManuals/2800027_P2_PM_EN.pdf
    I
    learned all of my CMOS logic from this bad boy by Forrest Mims. The final project is fascinating; by using three digital ICs, an op amp, and a resistor network, the circuit converts light intensity from 0 to 9. On the Prop or BS2, the code would take five minutes to write and build, but without micros, it is much more fun.

    WOW!! Thats some great info, thank you
  • TCTC Posts: 1,019
    edited 2014-01-27 07:51
    I still say that you can learn a lot more from a textbook from a good university bookstore, than buying a Forest Mims book in Radio Shack.

    I like Forrest Mims, but it is not a rigorous explanation of the subject. Neither is an Ardunio cookbook. And often, you can buy a used textbook for less.

    Just think. You can buy the text, skip the lectures and read at your own pace and save a huge amount on tuition.

    That is very true.
  • rabaggettrabaggett Posts: 96
    edited 2014-01-27 08:51
    Maybe start by learning how to write and read from an Sram. The smallest part I could find with a quick search was IDT6116SA15TPG. It's available from DigiKey in DIP package. It's about the easiest one to breadboard that's easily available. HINT. If you use 1K resistors, most LEDs will still light (Especially high brightness types) and most logic can drive tha much current without trouble.

    Then write in patterns, and use a couple of your counters in series to run through the addresses, and watch the LEDs change on the outputs.
  • ercoerco Posts: 20,256
    edited 2014-01-27 08:55
    I'd factor in how much time you want to put into this project, plus your wife's attention/frustration span. If she wants it now, pounce on it. 6 months or a year from may be too late. Do you want to make this your life's work and tax your marriage? :)

    If it were me I'd do what was mentioned in your other thread: slam a tv/monitor into a coffee table base with an old PC running a variety of interesting visual patterns. Windows Media Player alone had some pretty bitchin' visualizations.

    That way your electronics development is minimized and you can focus on doing some nice construction and woodwork. That would tide her over. And if it turns out fabulous, you can always make another one with all the RGB LED gewgaws previously discussed.
  • TCTC Posts: 1,019
    edited 2014-01-27 13:29
    rabaggett wrote: »
    Maybe start by learning how to write and read from an Sram. The smallest part I could find with a quick search was IDT6116SA15TPG. It's available from DigiKey in DIP package. It's about the easiest one to breadboard that's easily available. HINT. If you use 1K resistors, most LEDs will still light (Especially high brightness types) and most logic can drive tha much current without trouble.

    Then write in patterns, and use a couple of your counters in series to run through the addresses, and watch the LEDs change on the outputs.

    I am defiantly going to try that one out. I does not seam that hard to use.
  • TCTC Posts: 1,019
    edited 2014-01-27 13:39
    erco wrote: »
    I'd factor in how much time you want to put into this project, plus your wife's attention/frustration span. If she wants it now, pounce on it. 6 months or a year from may be too late. Do you want to make this your life's work and tax your marriage? :)

    If it were me I'd do what was mentioned in your other thread: slam a tv/monitor into a coffee table base with an old PC running a variety of interesting visual patterns. Windows Media Player alone had some pretty bitchin' visualizations.

    That way your electronics development is minimized and you can focus on doing some nice construction and woodwork. That would tide her over. And if it turns out fabulous, you can always make another one with all the RGB LED gewgaws previously discussed.

    This project does not involve my wife. This is not for her table. This is for my own enjoyment.

    As for
    Slam a tv/monitor into a coffee table base
    , My wife has allready expressed her thoughts. I posted about it in the other thread. I would spend the rest of eternity on the couch if I did not give her what she wants. She wants a LED table, that can do as many colors as it can. She is completely understanding that this will take some time to do.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-01-27 15:01
    What would be the best parts (part number, manufacture, etc..) to experiment with? I am getting lost with all the part numbers.

    It gets confusing!
    74xx series - the original ones, uses lots of power, don't use these
    74LS - lower power. Needs 5V.
    74HC - cmos version, uses less power again, and wider voltage range and can run at 3V3 or 5V. My favourite series.
    74F - fast series, useful if you are going to push the speed
    74HCT - similar to HC, ?faster, but only runs at 5V
    74LVC series - can handle 5V inputs when powered by 3V
    4000 series - wide range of voltages, some unique parts in this range

    Of these, I tend to stick to the HC and the 4000 series. And just to confuse things, the 4000 series have been merged into the 74HC series so there are some 74HC4xxx chips.
    I buy pretty much all my digital chips from the ones available on this single web page http://www.futurlec.com/IC74HC00Series.shtml

    It can be fun to get a breadboard, three AAA batteries and a few 74HC and 4000 chips and test out some of the examples in Forrest Mims' books.

    Then rip up the circuit, build a simple propeller circuit and get one RGB led working...
  • kwinnkwinn Posts: 8,697
    edited 2014-01-27 15:55
    TC wrote: »
    Hello all,

    This thread is in reference to my wife’s coffee table, and me wanting to do logic gates to passably control the LED matrix. Here is the thread if you want to know more.

    I have a question for the ones that have designed things using logic gates.

    I don’t have much experience with part numbers, special functions, etc… It took me almost 3 hours to fully understand a “SN74LS163A” (4 bit counter). I knew this was going to be a extremely difficult task when I started.

    I do understand the basic logic gates (AND, OR, NOT, NAND, NOR, etc..)

    My question is, where would you start? I am trying to make a 8x16xRGB matrix. The matrix control does not have to do any computing(not yet, could change years from now). I just want it to read from RAM, and scan the matrix with no input from anything else.

    I am not asking for anyone to design the matrix for me. I just don’t have experience with designing logic circuits. And I bet there are a few gurus on here that has.

    Thanks
    TC

    Reading from ram and outputting the data to an 8x16 array of leds is relatively simple and can be done with a reasonable number of chips. Early video terminals (glass teletype) did that. The hard part would be getting an image into the memory. There was a book I sent to someone on the forum that explained how to build such a terminal, but IIRC it was a character display.

    Would you settle for scanning an image stored in eeprom, eprom, or some other non volatile memory?

    Do you want to use the TLC chips for this?
  • TCTC Posts: 1,019
    edited 2014-01-27 16:43
    Dr_Acula wrote: »
    It gets confusing!
    74xx series - the original ones, uses lots of power, don't use these
    74LS - lower power. Needs 5V.
    74HC - cmos version, uses less power again, and wider voltage range and can run at 3V3 or 5V. My favourite series.
    74F - fast series, useful if you are going to push the speed
    74HCT - similar to HC, ?faster, but only runs at 5V
    74LVC series - can handle 5V inputs when powered by 3V
    4000 series - wide range of voltages, some unique parts in this range

    Of these, I tend to stick to the HC and the 4000 series. And just to confuse things, the 4000 series have been merged into the 74HC series so there are some 74HC4xxx chips.
    I buy pretty much all my digital chips from the ones available on this single web page http://www.futurlec.com/IC74HC00Series.shtml

    It can be fun to get a breadboard, three AAA batteries and a few 74HC and 4000 chips and test out some of the examples in Forrest Mims' books.

    Then rip up the circuit, build a simple propeller circuit and get one RGB led working...

    It is really confusing. But thank you very much for breaking it down for me, it makes better sense.
    And that site is perfect, I cant beleve that most of the chips are less than a dollar. That makes it hurt less when puff the blue dragon apears because I did something wrong. And trust me, I have seen him A LOT.
    I am going to use Forrest Mims' book, there is a lot of info in there.
  • TCTC Posts: 1,019
    edited 2014-01-27 16:46
    kwinn wrote: »
    Would you settle for scanning an image stored in eeprom, eprom, or some other non volatile memory?

    Do you want to use the TLC chips for this?

    I think I would settle for that. But I am going to find a small one, just so I can play with it.

    And yes, I plan on using the TLC chips. To me, I think it would be the easiest way. Just shift the data, latch in the data, then clock the GSCLK line 4096 times.
  • kwinnkwinn Posts: 8,697
    edited 2014-01-27 17:05
    Might be an idea to build the 3 TLC's on a perf board or lay out a board and get enough made for your experiment and the coffee table. That would be 3, or 5 if you need to do 1/8 PWM.
  • TCTC Posts: 1,019
    edited 2014-01-27 17:09
    kwinn wrote: »
    Might be an idea to build the 3 TLC's on a perf board or lay out a board and get enough made for your experiment and the coffee table. That would be 3, or 5 if you need to do 1/8 PWM.

    I totality agree, I am working on that now. should have it done for the weekend so I can play some more.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-01-28 05:38
    The confusion of all the generations of chips are clarified in "Digital Fundamentals" in about two pages. "The Art of Electronics" by Horowitz does something similar in a few more pages.

    If you want to get beyond Forrest Mims, here you go -- a 10th edition.

    http://www.amazon.com/Digital-Fundamentals-Edition-Thomas-Floyd/dp/0132359235

    If $104 USD is too much, try Abe Books to locate USED copies for less.
  • TCTC Posts: 1,019
    edited 2014-01-28 05:47
    The confusion of all the generations of chips are clarified in "Digital Fundamentals" in about two pages. "The Art of Electronics" by Horowitz does something similar in a few more pages.

    If you want to get beyond Forrest Mims, here you go -- a 10th edition.

    http://www.amazon.com/Digital-Fundamentals-Edition-Thomas-Floyd/dp/0132359235

    If $104 USD is too much, try Abe Books to locate USED copies for less.

    Awesome, Thank you. It will be after I am done with Mims book.
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-01-28 07:46
    If you want to get beyond Forrest Mims, here you go -- a 10th edition.

    http://www.amazon.com/Digital-Fundam.../dp/0132359235

    If $104 USD is too much, try Abe Books to locate USED copies for less.

    I picked up a copy of the 7th edition of that book a few years ago for less than $10 including shipping. It's an excellent textbook, highly recommended. I would imagine a newer version would be even better. The 7th edition was very much focused on 7400 series chips.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-01-28 08:50
    Abe Books has old editions for as little at 0.60 British Pounds + shipping. And they even have a reasonable price on a 10th edition/international edition.

    I have a 9th edition/international edition that I picked up cheaply at a local on campus book sale. Students are not fond of all English books. Mine is paperback and I have no problem with that.. seems to be holding up well.

    The international edition may be the same text, but priced cheaper for overseas markets. If they will ship it to you, it is worth the savings.

    Between 'Digitial Electronics' and 'The Art of Electronics', I seem to have a very good library for microcontrollers. These two books are just about all you will need.. though 'The Art of Electronics' is getting a bit outdated.. not much about 3.3v logic.
Sign In or Register to comment.