Author Topic: Is there a chip that does this simple function?  (Read 2421 times)

0 Members and 1 Guest are viewing this topic.

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3439
  • Country: us
Is there a chip that does this simple function?
« on: July 24, 2013, 11:08:07 pm »
Folks, if you can again be generous with sharing your experience, I can use some help:

I am looking for a chip that do this simple function, but I am having a hard time describing it in a way to Google successfully.

I have a few (5) lines that only one can be ON at a time.  It can be represents a number 0 to 5.
(0=none,1=first line, 2=second line, 3=third line, 4=forth line,5= fifth line).
Is there a chip that can take the 5 input and convert it to binary?
So if the second line is on the chip outputs a 010; when the third input line is on output would be 011, forth would be 100, fifth would be 101.  It would be ideal if the chip takes up to 7 lines and convert it to 3 bits from 0-7.  If it takes 4 input, that would do since I can cascade it.

This is a simple function that a few AND/NAND OR XOR can do.  But this is such a simple function I suspect there may be a chip that does it already.

Do you know of a chip that does this?  And, is there one that does the reverse?

Thanks,
Rick
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is there a chip that does this simple function?
« Reply #1 on: July 24, 2013, 11:18:14 pm »
It sounds like you are describing a "priority encoder."  The 74HC147 and 74HC148 are examples.

The opposite is called a decoder or demultiplexer.  The 74HC238, for example.
 

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3439
  • Country: us
Re: Is there a chip that does this simple function?
« Reply #2 on: July 24, 2013, 11:31:55 pm »
It sounds like you are describing a "priority encoder."  The 74HC147 and 74HC148 are examples.

The opposite is called a decoder or demultiplexer.  The 74HC238, for example.

Thanks!   I looked up the two you said and they do exactly what I am looking for.

I was searching for "binary to digital" and I got more junk from Google than I could handle.  Thanks for your help.   Now I know what term to search for to find the one best fit my need.

Rick
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Is there a chip that does this simple function?
« Reply #3 on: July 25, 2013, 12:01:39 am »
I don't know a whole lot about 74xxx logic but what about a 74HC595? (I'm more-so asking people who know than the OP)
The larger the government, the smaller the citizen.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is there a chip that does this simple function?
« Reply #4 on: July 25, 2013, 12:32:02 am »
I don't know how you would get the functionality the OP wants from a shift register. 

The 74HC595 is a great part to have around though.  They're the go-to part when you need to add more outputs to a microcontroller.  You can control 8 or more outputs with just two or three microcontroller pins.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf