Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interface atmega32 with 5 to 32 decoder

Status
Not open for further replies.

shashidhar1990

Junior Member level 1
Joined
Aug 25, 2015
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
120
i want to interface 3 to 8 decoder to atmega32 microcontroller to make on the particular LED ? how can it be programmed?:-D
 

shall i get 5 to 32 decoder ic? if , then please update the part number of the IC.
 

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.)
 

Read this about 3 to 8 decoder.

**broken link removed**

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.)

thanks, actually i need 5 to 32 decoder . i am not getting a dedicated ic for this, so i am combining 3 to 8 decoder to form 5 to 32 decoder.
 

Here is an example of a 5 to 32 bit decoder made from four 74138 type, 3 to 8 decoders taken from a TTL databook.


138_32.jpg
 
Hi,

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.

Klaus
 

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
 

Hi,

Sorry, my mistake. I accidentally thought there are two 3 to 8 decoders in one IC.

So either you use one ahc138 as column driver and 4 extra row lines, making a total of 7 lines.

Or you use two ahc138, one for column one for row. And need a total of 5 lines for 32 LEDS (6 lines for 64 LEDS max).

Klaus
 
If you have 12 available pins on the ATmega32, you could scan a 4 x 8 matrix without using any decoders.
 

Hi,

if you don´t have enough pins you could use a HC595 on SPI (additionally).

Klaus
 

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.



138_matrix.jpg
 

Hi,

Don't forget the current limiting resistors for the LEDs.
Instead of the inverter you could use P ch FETs, like the FDV304P. More driving power.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top