I would like to add 32 indicator LEDs to my mega and control them individually using 4 common data lines and 8 latch lines.
Thinking of using a 74LS75 IC.
This is my basic block circuit.
Please suggest improvements, etc.
You need to look at the data sheet.
The 74LS75 is not designed to source much current, it's much better at sinking current (out high source is rated at 3.5V, 400µa. while the out low sinking is rated at 0.2V, 16mA)
So, to use that, you should connect the LED cathodes to +5V and the resistor to the latch output.
You then turn on the LED with the output latched low.
I think the best way to go about it s you download proteus 8 professional EDA and draw the circuit where simulation will be factored in and more improvements can be done easily. If you dont know how to use proteus you can learn it here https://www.theengineeringprojects.com/category/proteus
You need to look at the data sheet.
The 74LS75 is not designed to source much current, it's much better at sinking current (out high source is rated at 3.5V, 400µa. while the out low sinking is rated at 0.2V, 16mA)
So, to use that, you should connect the LED cathodes to +5V and the resistor to the latch output.
You then turn on the LED with the output latched low.
I think the best way to go about it s you download proteus 8 professional EDA and draw the circuit where simulation will be factored in and more improvements can be done easily. If you dont know how to use proteus you can learn it here https://www.theengineeringprojects.com/category/proteus
You can drive them via bit-banging the clock (SHCP) and data (DS) inputs, or using an SPI port.
Shift 32 bits / four bytes in then pulse the load (STCP) input to transfer the data to the outputs.
Leave /OE tied to 0V/VSS to permanently enable all outputs.
The outputs can source or sink 6mA, plenty for high brightness LEDs with appropriate resistors.
If you want high power outputs, you could use MIC5841 or MIC5891; they work in a similar way, but have rather higher current outputs, which can also work with higher voltages, up to 50V or so.
If using the Arduino could not be simpler with simple direct control using the library for the MCP23017 ; the data sheet quotes a large sink source ability of 25ma per pin with a total chip load of over 100ma.
The PCA9685 also drives at 25ma per led and can handle a total load of 400ma, but it also allows you to dim each led to whatever level you want. See the Adafruit library as mentioned in this link.
Can you tell us why you want to control 32 LEDs?
A 4 by 8 matrix would require the same number of pins and no external components - except LEDs and resistors.
Modern LEDs are very bright with just 5mA so your Mega can easily do this.
Mike.
Edit, would probably need 4 npn transistors as well.