hi welcome to nor doing a tutorial from Robojax. my name is Ahmed Shamshiri presenting this
tutorial from Canada. in this tutorial we're going to learn how we can use this
8 digit salmon segment display based on Mac 7 2 9 1 display driver chip you can get the
code folders by clicking on the link below the video in the description which will take you
to Robojax.com/learn/arduno. let's get started with this
let me explain the hardware when you purchase the module they will send a shepherd like this
with the two pin headers which you won you can connect a death sight and the other one on the
other side there isn't further idea that you can cascade it one to the other and you will
have 16 digits and you can have more as well it has four digits made of two four pieces of
seven segment display the type of connectivity doesn't matter if it is from an anode or common
cathode because a driver takes care of that for us it doesn't matter and this is the main chip
from Maxim integrated this is Mac seven to one nine that drives the LED if you segment LED or
it can be dotted but in this case you are using similar segments and this can be cascaded as you
can see there are different manufacturers one has some labels here their name and the other
one don't but we have clock we have load it's called load with max seven two one nine and
with the other one they call it data they call a CS chip select and this is the out ground VCC so
you will connect five volt here and then the ground and then the three pins and they have
labeled it on this side this is called DN c-- s clock so you will connect this side to your
Arduino and death side to the next device to pins for the voltage here V CC this can be connected
to five volts and then we have ground it will be connected to the ground and it can be programmed
with SPI q SPI and micro wire have D IP data input and then this is sometimes they call it load and
here they call it cable select or channel select CS and then we clock crk and pencil in here if you
want to cascaded with other devices and you can make almost virtually unlimited number of digits
I heard the datasheet of Mac seven-to-one 9 for Macs and integrated it digitally the
display driver and operating voltages four to five point five volts and there's a shutdown
feature if you shut it down it can few hundred and fifty micro ampere operating supply current
when the LED is not on 8 milliampere at the reset mode and all segments and the thermal
point on total will be 330 million / players can rate is between 500 to 1000 300 Hertz so
typically suggested at 800 Hertz or hate hundred times so chip select is used for
Mac 7 2 to 1 but Mac 7 to 1 9 is called a load data input pin and here if we connect
two modules with each other then that out from 1 will go for the data and on the other one and
the same way load will go to the first one and to the second one and Clark also will go first
in a second and the only pin that is different is that out data and the rest is exactly the
same I will not arrive they always put some plastic remove that so it is revealed better
let me explain the wiring on this site we have VCC this goes to 5 volts using this
orange wire the second pin is a ground ground is connected using red wire to
the ground now we have three pins left third fourth and fifth have been arranged
in the same order - pin 5 6 & 7 NS - five Cs thousand six and then clock is n seven
maybe now I fill in the code I will provide you the link to download the library from robotics
not common also from GitHub this is part of the library once you download the zip file you can
click on a sketch include library and then add dot zip library after that pointed to the zip
file that you have John just downloaded for example if this was the zip file the
library click on it and click open and I very well be installed then close your Arduino IDE
and reopen it because it will not allow you to view the examples then you go to file examples
and digital LED display digit seven segment demo this has a file that you will open I've
just added few elements in it this will be provided separately so it starts from here
include and then digit LED display dot HS part of the library and here I've defined
the pins di n has been 5 CSS 6 and clock at 7 and we are just passing those values to this
instance of the class that we have created and we it's called LD so this is a constructor that
gets these values and paths and initialize the display inside the setup we set the brightness
it can go between 0 to 15 it goes up to 16 so it has been set at 10 and number of digits limit 8
here is how you use it if you want to print this text on the screen just say LD dot print
digit and then put the value so this will go all the way it will fill up the screen
the amount you can go let's say if I put it like three thousand it will be displayed for
three second then you have to clear the screen before writing another value here LD dot Claire
so this method or function Claire's a screen and another number displayed on the screen and this
is another one each very quickly five hundred millisecond and this is now creating an integer
for starting from zero up to hundred this I means incrementing the four loops of the I changes and
Elda doctrine digit is 0 1 2 3 up to 100 and pay attention here when you do I this will
just print it but here plan digit I comma this food means goal and start from 4th digit if you
do not mention it start from 0 so simultaneously whatever is I we will see I as a 4th digit this is
what I am referring to and here and in here and in between these writings we are 50 millisecond and
this one now turns off the LED 450 millisecond and turns it on and 450 milliseconds so what
does it do to 10 times turning on and turning off for the value that has been written this is
writing up 200 it goes up to 99 remember I is smaller than hundred if I put equal sign then
it will be hundred so it goes up to 99 and 99 is on the screen we have not cleared that after this
loop so this will causes that screen to turn on and off and it will blink remember after 99 you
will see here this blank is due to this and then we clear and then this will print up to
100 sample up to 99 and that is here and this one goes from 0 to 20 and it prints different
values first it turns this this is a value from that and see this is the one that it does print
Table one of the digits at a position of five and then at the position of five it
changes to death these are the segments of seven segment display a b c d e f g h HS f
decimal point so this is the sun point if this is one that the similar point will be turned on
otherwise these are the other segments and this is a seven segment display a b c d e f and g and
decimal point is the H or the last element so in terms of a position they have been located
from this side that's that 1 2 3 4 5 6 7 bit and then the last one this is representing
a up to H to the last one which is a decimal point this is the G and also the seven point
and here I've turned off my light so you can feel better this is a full brightness I can
reduce the brightness let's say let's set it to 3 and upload it because it uploaded so this is the
3 we can put 1 let me change it to 1 it's now uploaded it's very them and if I make this 15
now you'll see it will be extremely bright yes so this fits the limit if we say five
digits let's say put it to six digits let's see what happens everything is
that we have one will be discarded these two digits will be turned off
whatever we have you will not see in here you see because we set the limit up to six
so any valued that comes to this site will be discarded just added
this assistant digit 2019 at the third digit so that's one two three from here
it will start and it will put 2019 pay attention now you will see it
2019 from third digit because this is zero one two three
you
thank you for watching this was how to use this 8 digit 7 segment display we're using Max 7 2
9 1 if you learn something and found it useful please thumb up as this will help my video in the
search algorithm of YouTube if you have comment our question posted a comment section below I
try to answer and reply and you may subscribe so you can get updates of my upcoming videos