Arduino and the MAX7.LED Display Driver ICUse the Maxim MAX7.LED display driver with Arduino in Chapter 5.Arduino Tutorials.The first chapter is here, the complete series is detailed here.Sooner or later Arduino enthusiasts and beginners alike will come across the MAX7.IC. And for good reason, its a simple and somewhat inexpensive method of controlling 6.LEDs in either matrix or numeric display form.Furthermore they can be chained together to control two or more units for even more LEDs.Overall theyre a lot of fun and can also be quite useful, so lets get started.Heres an example of a MAX7.IC which is a functional equivalent, the AS1.Austria Microsystems.You might not see the AS1.At first glance you may think that it takes a lot of real estate, but it saves some as well.As mentioned earlier, the MAX7.LEDs including maintaining equal brightness, and allowing you to adjust the brightness of the LEDs either with hardware or software or both.It can refresh the LEDs at around 8.Hz, so no more flickering, uneven LED displays.I used the Arduino UNO and linked it to the 1.S6D02A1 based display as follows UNO 5V to display pin 6 VCC and pin 7 BL UNO 0V GND to display pin 8 GND.Easily Learn about and create pic projects such as a Real Time Clock, an Ultrasonic rangefinder, a frequency counter, an 8x8 LED matrix driver, an RGB LED controller.JbNZBgaw/maxresdefault.jpg' alt='6 Digit 7 Segment Display Driver Ic' title='6 Digit 7 Segment Display Driver Ic' />You can even switch the display off for power saving mode, and still send it data while it is off.And another good thing when powered up, it keeps the LEDs off, so no wacky displays for the first seconds of operation.For more technical information, here is the data sheet MAX7.Now to put it to work for us well demonstrate using one or more 8 x 8 LED matrix displays, as well as 8 digits of 7 segment LED numbers.A simple seven7 segment counter circuit with an LED display.This counter circuit diagram is designed using IC CD 4033 as counter,555 Timer IC and seven segment LED.Before continuing, download and install the Led.Control Arduino library as it is essential for using the MAX7.First of all, lets examine the hardware side of things.Here is the pinout diagram for the MAX7.The MAX7. 21. 9 drives eight LEDs at a time, and by rapidly switching banks of eight your eyes dont see the changes.Wiring up a matrix is very simple if you have a common matrix with the following schematic connect the MAX7.DP, AF to the row pins respectively, and the MAX7.DIG07 to the column pins respectively.A total example circuit with the above matrix is as follows The circuit is quite straight forward, except we have a resistor between 5.V and MAX7. 21. 9 pin 1.The MAX7. 21. 9 is a constant current LED driver, and the value of the resistor is used to set the current flow to the LEDs.Have a look at table eleven on page eleven of the data sheet Youll need to know the voltage and forward current for your LED matrix or numeric display, then match the value on the table.E. g. if you have a 2.V 2. 0 m. A LED, your resistor value will be 2.Finally, the MAX7.Arduino digital pins which are specified in the sketch.Well get to that in the moment, but before that lets return to the matrix modules.In the last few months there has been a proliferation of inexpensive kits that contain a MAX7.LED matrix. These are great for experimenting with and can save you a lot of work some examples of which are shown below At the top is an example from tronixlabs.Well use these for our demonstrations as well.Now for the sketch.You need the following two lines at the beginning of the sketch.Led. Control. h. Led.Control lcLed. Control1.Led. Control. h Led.ControllcLed. Control1.The first pulls in the library, and the second line sets up an instance to control.The four parameters are as follows If you have more than one MAX7.DOUT data out pin of the first MAX7.However the CLK and LOAD pins are all connected in parallel and then back to the Arduino.Intensity0,8 lc. Intensity0,8 The first line above turns the LEDs connected to the MAX7.If you set TRUE, you can send data to the MAX7.LEDs will stay off.The second line adjusts the brightness of the LEDs in sixteen stages.For both of those functions and all others from the Led.Control the first parameter is the number of the MAX7.If you have one, the parameter is zero for two MAX7.Led0,col,row,true 1lc.Led0,col,row,true which turns on an LED positioned at col, row connected to MAX7.Change TRUE to FALSE to turn it off.These functions are demonstrated in the following sketch.Led. Control. h need the library.Led. Control lcLed.Control1. 2,1. 1,1.MAX7. 21. 9 pin 1.CLK pin 1. 3. pin 1.LOAD pin 1. 2. 1 as we are only using 1 MAX7.MAX7. 21. 9 number, it is zero for 1 chip.Intensity0,8 sets brightness 01.Display0 clear screen.Led0,col,row,true turns on LED at col, row.Led0,col,row,false turns off LED at col, row.Led. Control. h need the library.Led. ControllcLed.Control1. 2,1. 1,1.MAX7. 21. 9 pin 1 pin 1.CLK pin 1. 3 pin 1.LOAD pin 1. 2 1 as we are only using 1 MAX7.MAX7. 21. 9 number, it is zero for 1 chip lc.Intensity0,8 sets brightness 01.Display0 clear screenvoidloop forintrow0 rowlt 8 row forintcol0 collt 8 col lc.Led0,col,row,true turns on LED at col, row delay2.Led0,col,row,false turns off LED at col, row delay2.How about controlling two MAX7.Or more The hardware modifications are easy connect the serial data out pin from your first MAX7.LOAD and CLOCK pins from the first MAX7.You will of course still need the 5.V, GND, resistor, capacitors etc.MAX7. 21. 9. You will also need to make a few changes in your sketch.The first is to tell it how many MAX7.Led. Control lcLed.Control1. 2,1. 1,1.X 1. Led. ControllcLed.Control1. 2,1. 1,1.X by replacing X with the quantity.Then whenever youre using a MAX7.MAX7. 21. 9 you wish to address.They are numbered from zero upwards, with the MAX7.Arduino as unit zero, then one etc.To demonstrate this, we replicate the previous example but with two MAX7.Led. Control. h need the library.Led. Control lcLed.Control1. 2,1. 1,1.MAX7. 21. 9 pin 1.CLK pin 1. 3. pin 1.LOAD pin 1. 2. 1 as we are only using 1 MAX7.Intensity0,8 sets brightness 01.Display0 clear screen.Intensity1,8 sets brightness 01. Cadastro Clientes De Para Software Download . Display1 clear screen.Led0,col,row,true turns on LED at col, row.Led1,col,row,false turns on LED at col, row.Led0,col,row,false turns off LED at col, row.Led1,col,row,true turns on LED at col, row.Led. Control. h need the library.Led. ControllcLed.Control1. 2,1. 1,1.MAX7. 21. 9 pin 1 pin 1.CLK pin 1. 3 pin 1.LOAD pin 1. 2 1 as we are only using 1 MAX7.Intensity0,8 sets brightness 01.Display0 clear screen lc.Intensity1,8 sets brightness 01.Display1 clear screenvoidloop forintrow0 rowlt 8 row forintcol0 collt 8 col lc.Led0,col,row,true turns on LED at col, row lc.Led1,col,row,false turns on LED at col, row delay2.Led0,col,row,false turns off LED at col, row lc.Led1,col,row,true turns on LED at col, row delay2.Another fun use of the MAX7.LED matrices is to display scrolling text.For the case of simplicity well use the Led.Control library and the two LED matrix modules from the previous examples.First our example sketch it is quite long however most of this is due to defining the characters for each letter of the alphabet and so on.Well explain it at the other endArduino forum member danigom.Led. Control. h. Devices 2 number of MAX7.Delay 7. 5 adjust scrolling speed.Long 1. 4 0. Led.Control lcLed. Control1.Devices. proguchar scroll.Text PROGMEM. THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG 1.Devices x. lc. The MAX7.XX is in power saving mode on startup.Intensityx,8 Set the brightness to default value.Displayx and clear the display.Messagescroll. Text.Font. PROGMEM Numeric Font Matrix Arranged as 7x font data 1x kerning data.B0. 00. 00. 00. 0, Space Char 0x.B1. 00. 00. 00. 0, B1.B0. 10. 10. 00. 0, .B0. 01. 00. 00. 0, .B1. 10. 00. 00. 0, .B0. 11. 00. 00. 0, amp.B1. 10. 00. 00. 0, .B0. 01. 00. 00. 0, .B1. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .B0. 11. 10. 00. 0, 0.B0. 10. 00. 00. 0, 1.B0. 11. 10. 00. 0, 2.B1. 11. 11. 00. 0, 3.B0. 00. 10. 00. 0, 4.B1. 11. 11. 00. 0, 5.B0. 01. 10. 00. 0, 6.B1. 11. 11. 00. 0, 7.B0. 11. 10. 00. 0, 8.B0. 11. 10. 00. 0, 9.B0. 00. 00. 00. 0, .B0. 00. 00. 00. 0, .
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |