Shop OBEX P1 Docs P2 Docs Learn Events
8 to 3 converter — Parallax Forums

8 to 3 converter

FranklinFranklin Posts: 4,747
edited 2007-04-28 19:28 in General Discussion
What is the name/number of a chip that takes 8 inputs and converts that to three(or four)·pins of binary

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-27 23:03
    one that goes the other way is a 3 to 8 decoder 74ls125.

    or, maybe you want a priority encoder.

    whats the application?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • FranklinFranklin Posts: 4,747
    edited 2007-04-27 23:28
    I have a Dallas 1-wire weather station and the circuits are breaking down (it's 15 years old) I was thinking if I just bypassed the 1-wire chips and hooked the eight reed switches to something like this I could get the position out without tying up 8 pins on the micro.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-28 00:28
    I believe the 74LS148 was a 8 to 3 Priority Encoder...Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • FranklinFranklin Posts: 4,747
    edited 2007-04-28 04:26
    Chris, that's what I was thinking of but it doesn't work the way I had thought it did. I guess I will go with a 2p40 stamp and use the extra pins. Thanks anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • kjennejohnkjennejohn Posts: 171
    edited 2007-04-28 06:32
    Stamptrol, the 74LS125 is a 4 signal, tristated buffer. You're thinking of the 74LS138.

    Franklin, the 74LS151 does what you want. The data sheet is at:
    rabbit.eng.miami.edu/info/datasheets/74LS151.pdf

    This chip has three selector pins, A, B, and C. These are the pins your processor is placing the input pin's value on.
    It has eight input pins that the user connects to the levels he wants to look at. Use the chart to see the relationship:

    Input value___Bits 0,1,2__Input No.
    __0_____________0,0,0_____1
    __1_____________0,0,1_____2
    __2_____________0,1,0_____3
    __3_____________0,1,1_____4
    __4_____________1,0,0_____5
    until we reach
    __7_____________1,1,1_____8

    Bits 0,1,2 are the the three processor pins to the A, B, and C pins on the '151. The eight switches go to inputs D0 thru D7 of the '151. The G pin just gets connected to ground, unless you want to tristate the output. The Y pin is the true output; the W pin is the inverted output. Take the appropriate output and feed it into a fourth processor pin.

    And that should do it. 'Luck!
    kenjj
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-04-28 07:08
    Stephen -

    Why can't you juust use a parallel to serial shift register (8->2) and read the status of the 8 switches with SHIFTIN? Data_In, Clock and Ground are your three connections, thus you only need to use 2 Stamp pin ports.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-28 12:49
    kenjj,

    You're right! Never trust a memory over 30 years old!

    Thanks for the correction.

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-28 15:08
    Here it is...

    74_151 -- 8-input multiplexer

    It's like a one-way "8PST" switch, one of the eight input signals is switched through to the Output by the select bits (%000 - %111).

    See attached dwg.

    (74HC, HCT, LS, etc.)
    489 x 469 - 19K
    151.JPG 18.7K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-28 16:01
    Another thing, I guess.·

    The '151 will switch digital signals (0,5V).·

    If you wanted to switch from/between analog signals, then something like the 4066 (CD4066 et al.) would be more appropriate.
  • kjennejohnkjennejohn Posts: 171
    edited 2007-04-28 18:43
    It occurs to me that the list of TTL chips I found with a brief description of the chip's function might be a good thing to have:
    rabbit.eng.miami.edu/info/datasheets/

    This is by no means an exhaustive list of all possible TTL ICs.
    Enjoy!
    kenjj
  • FranklinFranklin Posts: 4,747
    edited 2007-04-28 19:28
    Thanks everyone, Bruce, you asked "why can't you...." the answer is I can (and probably will) but I didn't think of it until you mentioned it. The 151 chip works on one input at a time and this vane may have two switches closed at once so I don't think that will work. The shift register looks like it will work just fine for the job I have.
    Thanks again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.