After you learn about AVR microcontroller i want to introduce you about your first project which is fun for beginning the programming . This is very conceptual and funny at the same time and easy to interface modules and understanding them .In this post i will detail how to control the 256 led and make a display which is very useful in different sectors . Whether you want to scroll any text for advertisement or you want to display temperature and time with in the display this project will be very useful to you .The main theme of this project will be how microcontroller switch its instruction and sends it in different wires to make things work , also this project will demonstrate how we can trick our eye ( which is our eye has certain limit of dectecting the object call persistance of eye )to display character in the display .Which is the main principle of the modern Display (any types of display wheter it is LED or LCD the principle remains same .
In this project you will need following components listed below in table
Now let us talk about them one by one
DOT MATRIX DISPLAY
It is almost impossible to connect 256 led to the microcontroller without trick.If we want to display something by using the LED then we need to glow individual LEDs independently .That is if we want to make a pattern in 256 LEDs we need 256 output pins in microcontroller .Which is not possible to make in that way so we introduce a simple trick connecting all LEDs in such a way that the 256 LED pins (that is 256 anode and 256 cathods total 512 pins ) will reduce to 32 pins (32 anode and 32 cathode ) . The simpler mathmatical trick is popularly known as LED matrix . In this project you can make your own LED matrix making connecting anodes and cathodes as shown in circuit diagram below or buy them from market (please go to my store to buy LED matrix modules ) . There are two types of LED matrix common cathode and common anode in this project we are making display using common cathode LED matrix circuit diagram of common cathode is as shown in figure below
the common anode display is almost similar to the common cathode LED matrix which is shown in figure below (note we are not using common anode display here but if you want to know how it look like ) you can find what is difference between these two modle of LED matrix display
Okay you got me now ? i am glad you got it , i dont think you are making your own LED matrix . it is difficuilt but not impossible as i said .If you have any problem please let us know .
We need this IC because we only have 40 pins in ATmega-32 microcontroller and we want to send data serially to the MAX7219 IC and from IC data is parallelly send to LED matrix , This feature of integrated circuit is know as multiplexing technique .This Driver IC (max7219 ) is very useful in seven segment display as well .There are some register inside this ic and we need to program those register to obtain desire output , Another feature of this IC is we do not need more than 4 resistors to controll all leds , By applying 10 kilo ohm to the ISET and VCC pin we can display all leds and then we also can dim the leds to our desire intensity by setting some bits inside the intensity register , So search for MAX7219 ic data sheet and look out for the specfication of the IC .
now wire up your hardware as shown in circuit diagram and open your IDE and start writing code for the Display .
This is complete circut diagram , you dont need any extra component or any thing else just connect your hardware , there you will need probably too much jumper wires , but do not worry about other component , a bi pass capacitor is needed later i will explain about it
you have connected your hardware ! its time for programming !copy the following code without worrying and observe the result
now before i explain the code , you need to take some rest , its break time so have a fun with this song 😉