Shop OBEX P1 Docs P2 Docs Learn Events
is Stamp necessary in this case — Parallax Forums

is Stamp necessary in this case

TbagTbag Posts: 31
edited 2005-08-22 21:55 in General Discussion
Folks I need a component that will gate-enable three seperate gates in a cyclical repetitive order - Gate 1 the Gate 2 then Gate 3 - at seperate but equal intervals of 1 microsecond. After that is done, it restarts. Thats all I need. Is a PIC really necessary like a Stamp or can a less expensive discreet component work?

Comments

  • Lee HarkerLee Harker Posts: 104
    edited 2005-08-19 04:20
    Tbag,
    Actually no it is not necessary to use a processor for that. I really hate it when I say that. You can get that job done with a few dollars in parts. Just set up a 4 bit counter (only 2 are needed but they usually come in minimum 4 bits). Set it to reset after count 3. Hook the counter ouputs to a 2-4 bit encoder and use encoder outputs 0 through 2 as your gates 1 to 3. The counter just needs a 1MHZ clock source and it's a go.
    I didn't specify parts because of bad memory and to tell you this. There is a great old book that is perfect for solving problems such as this. It's the "TTL Cookbook". You don't have to use TTL gates but the book is a must have for logic gate solutions. I bought a copy in tech school and it stays within arms length of my workbench 20 years later.

    Lee Harker
  • TbagTbag Posts: 31
    edited 2005-08-19 05:08
    Thanks so much.

    Tbag
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-19 11:40
    In general, I agree with Lee, a BS would be an "overkill" for this application - I also agree concerning the TTL Cookbook, I own one since many, many years.

    On the other hand, you might consider using an SX controller. For example, I needed to stretch two pulses (see the projects section of this forum: http://forums.parallax.com/showthread.php?p=541621. I could have done this with two NE555s, for example, with the additional passive components required around the 555. Using an SX28 with its built-in 4 MHz clock (not very stable and precise, but good enough for my need), the external parts count was zero.

    So "tailoring" your own logic with a micro controller is an interesting alternative to discrete components, even price-wise.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • YanroyYanroy Posts: 96
    edited 2005-08-19 12:21
    This strikes me as an application better suited to a shift register than a counter and decoder (you did mean decoder, right?· I believe encoder goes from 1-hot to binary, but maybe summer vacation has reversed this in my brain).· Apply the 1MHz clock to the shift register, which should be hard-wired to always shift in one direction.· Take the parallel outputs to your gates.· To get the whole thing started, a 3-input nor gate that is fed off the first 3 parallel outputs and its own output is connected to the serial input of the shift register should work (you need a way of getting a single 1 into the shift register at the very beginning and whenever there's a 1 on the 4th output).

    I don't think there's any glaring logic errors in this design... and I suspect it's cheaper.
  • TbagTbag Posts: 31
    edited 2005-08-19 14:49
    Gentleman, these all sound like great ideas. I understand Geunther's position that if you need a microcontroller anyway, why not use its native clock speed as a clock. If I decide to use a microcontroller for this, this may not be a bad idea. As it stands, first and thrid solution is most appropriate as I really don't need a PIC. Between the first and third, I understand the first (counter decoder) approach and like it but I don't know much about shift registers. I am not necessarily sure I should exclude that approach based on ignorance. I did order the TTL book from Amazon and I'll take a look.

    This site introduced me to counters and decoders after AI read the first post and made it very understandable - check it out!

    http://www.kpsec.freeuk.com/counting.htm


    -T.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-19 21:14
    Tbag,

    you are right, having a micro controller, like the SX "on board" gives you a good chance using it for other purposes besides generating the pulse sequence you need. Actually, an SX would feel "bored" running just this task smile.gif .

    Blease get me right on the "zero external components" approach. It can only be taken when the precision of timing is not that critical as the SX internal RC clock is not very stable. Changes in ambient temperature, supply voltage and other factors have an impact on it. For applications requiring a better timing, you will need to spend the extra pennies for a resonator. Nevertheless, this will still end up in a cost-effective solution.

    Instead of soldering, you would have to do some programming. I assume that you are familiar with BASIC Stamps, so using the SX/B compiler for the SX should not be too difficult for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • TbagTbag Posts: 31
    edited 2005-08-22 21:55
    I am reposting a new question in a new post. I don't know how dead this link is.
Sign In or Register to comment.