40 binary inputs to 6-bit output binary coded number

digital-logic

I'm new at digital electronics. I want to find circuit unit that can convert 40 binary input to 6-bit binary number but I cannot find any circuit that can do it. I think must do using encoder, mux but I stacked. Can anyone help me?

Best Answer

Probably one of the cheapest and certainly one of the fastest options would be to use a CPLD such as this Xilinx one. The 64 pin package should just do, but I suggest the 100 pin package to leave some room. As good as 5ns response pin-to-pin, single chip solution and only $2.86 quantity 1. You can decide what output function (count the 1's, count the 0's, priority encoder, inverted-input priority encoder or whatever) at any time and reprogram it.

Unlike most FPGAs, these CPLD parts contain internal non-volatile flash memory, so you don't need an external program storage component.

Unfortunately, the learning curve is a bit steep for the require 7G bytes (or whatever) of (free) software, the HDL (Verilog or VHDL) or schematic method you'd use to describe the functionality, and you need a JTAG-USB programmer (cheap clones are available), but once you learn it, you'll probably find many other applications.

enter image description here