send the sequence of 3bit binary to the 3to8 decoder thro atmega port.
(your title gives 5to32 decoder . and message is for 3 to 8 decoder . change them appropriately.)
You have to interface the 3 input pins of 3 to 8 decoder to 3 digital output pins of AVR. The you can write values from 0b000 to 0b111 (8 values) to the AVR port and based on the value written to the lower 3 pins of the PORT the decoder output changes.
send the sequence of 3bit binary to the 3to8 decoder thro atmega port.
(your title gives 5to32 decoder . and message is for 3 to 8 decoder . change them appropriately.)
If you simply want to light one led out of 32 LED a single AHC138 is enough.
On half as a 2 to 4 row decoder
The other as a 3 to 8 column decoder.
Then connect the LEDS in a 4 x 8 matrix. You need four current limiting resistors.
It may supply up to 8mA while keeping voltage levels, or max 25mA.
yeah you are rt, i want to light one led out of 32. but in ahc138 we just have 8 outputs. if i connect in 4x8 matrix fashion simply i need 12 outputs(4 for rows and 8 for columns) . still it is possible to then please tell me how to break decoder into two halves? thanks
If using a 1 of 8 and a 1 of 4 decoder to scan a matrix of 32 LED's, the outputs of the 1 of 4 decoder need to be inverted, so each scan position has one line high and one line low. Below is an example circuit.