Your teaching logic is very easy to follow and I now am able to understand and use such displays where I was confused following other teachers without the logic. Thanks again for a wonderful series. Subbed and liked.
@infinitemindsetnow
8 жыл бұрын
you know it never fail. always learn something new from Kristian. Thanks buddy
8 жыл бұрын
+David Arroyo Thanks very much for the kind words! And you are ofcourse welcome :)
@simonbancroft8579
7 жыл бұрын
Episodes 7, 8, 9, 21 and 22 are a wonderful series of tutorials starting at the LED beginning and working forward in stages, The clear, concise logical steps you use to create the code is exactly what i needed. I had also struggled to deal with the precise differences in programming anode/cathode, but now i feel i have an understanding of the basics. Thank you for your significant time and effort to help. Appreciating that you were moving home at the time of episode 22, the next logical step to using 2 x 595's and an 8 x 8 LED matrix would be excellent please.
7 жыл бұрын
Thank you for the episode idea :) I have quite a lot of 8x8 matrixes lying around that I am going to do something with, your suggestion was a good one, that I'll add to the list :)
@felixcat4346
7 жыл бұрын
I just got my 10 595 from aliexpress after 4 months of waiting. I will be following this excellent tutorial to get them to work. I already have the 4 didget 7 segment display and the arduino. Thanks.
7 жыл бұрын
Wow that was one loooong wait! :) Ive had a few of those aswell, when the stuff comes after months of waiting, and Ive given up on getting them a long time ago... Let me know of your progress!
@felixcat4346
7 жыл бұрын
I actually got a refund for these chip from the seller on aliexpress, after a protest. Your post here is the only one I could find regarding 4 didgit 7 segment displays, 2 595's and a arduino. I found an arduino tutorial with some code using the logic to wire these correctly.for common cathode. To use your tutoral here you need to put in alot of thinking to learn how the wiring is connected so its a bit of a struggle. I hope to build a clock using an arduino nano and an external crystal.
@mikeg4972
7 жыл бұрын
The TI TPIC6C595 is great too because not only is it a shift register but it has power outputs at 100 mA to drive relays, Led's, solenoids, etc.
@ChrisFredriksson
8 жыл бұрын
Önskar fler videos, har tittat på flera stycken redan och de är riktigt bra! =)
@scolic03
8 жыл бұрын
This seems like a very easy and simple way to make a 4 digit clock. All you would need is a crystal or some precision clock reference, like a DS3231 or something.
8 жыл бұрын
+scolic03 Sure... I havent worked that much with real time circuits yet. I have some lying around for some future project :) But yes, that would work... If you make it, share what you did :)
@shivakumar-lv6wr
8 жыл бұрын
i am currently working on making a digital clock using 4digit seven segment displays. I will definitely post the details of it once i figure it out
@steve8939123
8 жыл бұрын
Hello, your explanations are great, you should think about getting on Patreon I think a lot of people you contribute, my self included. Steve Tripoli
@rafwiel
2 жыл бұрын
I had a really hard time trying to make common cathode version based on your tutorial. You complicated it a lot at 15:10 assigning 256 to D2 and then shifting it right by 8 in shiftOut call. At first i couldnt understand it, and because D2 was 256, i thought that we treat 2 shift registers as one unit, and thats not true. I looked at other tutorials to find out that we have 2 shiftOut calls, because first call writes to 2nd register, and 2nd call writes to 1st register. So D2 value is 1, not 256. Of course, if you shift 256 right by 8, it becomes 1. But as i said before, its over complicated, especially for newbies like myself. Another thing is, i still dont understand why you shifted >> 8 both digit and value at 21:20? Its was really confusing at first. Later i found out that what you are actually doing is sending 1 on 2nd 595, which is correct to set value on digit 2, but adding that 64 value sidetracked me a lot I figured it out afterall, and im sure it would take a lot longer without your video, so thanks for it, not perfect but still very informative, good job :) If someone has common cathode display like me, here's sample code. Note that with CC we have to reset digit pin to LOW, not set HIGH like in this video. So in order to write digit 1 D1 has to be 0, and D2-D4 has to be 1 //pins #define LATCH_PIN 2 #define DATA_PIN 3 #define CLOCK_PIN 4 //digits #define D1 128 //bit 8 on 1st 595 #define D2 1 //bit 1 on 2nd 595 #define D3 2 //bit 2 on 2nd 595 #define D4 4 //bit 3 on 2nd 595 void setup() { pinMode(LATCH_PIN, OUTPUT); pinMode(DATA_PIN, OUTPUT); pinMode(CLOCK_PIN, OUTPUT); } void loop() { //NOTE: with common cathode we need to reset digit bit to LOW //digit 1 //reset d1, set d2, d3, d4 digitalWrite(LATCH_PIN, LOW); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D2 + D3 + D4); //write to 2nd 595 shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, !D1 + 6); //write to 1st 595 digitalWrite(LATCH_PIN, HIGH); delay(1); //digit 2 //reset d2, set d1, d3, d4 digitalWrite(LATCH_PIN, LOW); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, !D2 + D3 + D4); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D1 + 91); digitalWrite(LATCH_PIN, HIGH); delay(1); //digit 3 //reset d3, set d1, d2, d4 digitalWrite(LATCH_PIN, LOW); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D2 + !D3 + D4); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D1 + 79); digitalWrite(LATCH_PIN, HIGH); delay(1); //digit 4 //reset d4, set d1, d2, d3 digitalWrite(LATCH_PIN, LOW); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D2 + D3 + !D4); shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, D1 + 102); digitalWrite(LATCH_PIN, HIGH); delay(1); }
@Waylander131
7 жыл бұрын
Nice tutorial Kristian, very helpful! One question: I noticed you don't use any current limiting resistors while connecting the 7-segment to the 595. The power voltage of the breadboards is connected to the 5V bus to the arduino board. Is that safe for the LEDs or/and the registers? For long term operation? I'm considering you apply "low" level to the LED cathode and "high" level to the anode. That is 5V applied (approximately) directly to the LED.
7 жыл бұрын
Hello, No this is not "safe" for longterm operation for the LEDs... I was "lazy" and skipped the resistors... You should use LEDs if you plan to do a more lasting project.... Thanks for bringing it up.
@edwardmirador8497
10 ай бұрын
thank you
@reydaphee1649
7 жыл бұрын
nice tutorial Kristian, it interest me. i would like to do it also but i only have 2 digit seven segment (anode) and im lost to it. i would appreciate it if you will give me a feed back about it soon. thnkz
@tomhoma
3 жыл бұрын
i need 10 digits for year hour min sec , so how many 595 I need
@alextrezvy6889
7 жыл бұрын
What is the purpose of shifting the value of 64 by 8 bits right? 64 in decimal maps to 1000000 in binary. If you shift it 8 bit it becomes 0.
7 жыл бұрын
Yes, that is the purpose of shifting it 8 bits. To make all bits 0. That way you wont get any "artifacts" when you write the next number (eg led segments that light up when they shouldnt).
@alextrezvy6889
7 жыл бұрын
Kristian Blåsol what artifacts are you talking about? Let's consider the point 19:13: the expression "128 + 64>>8" is equal to "128". How the extra math prevents the undesirable register state?
7 жыл бұрын
Look at 17:17 for the artifacts I talk about. The easiest way to explain it is to try the sketch I made, and remove the lines where we >> shift the bits. That way you will see what happens... As I write, you can get stray bits moved to the other segments. I had the problem, maybe you dont have them. You could leave those lines of code out if you feel they are unnecessary...
@alextrezvy6889
7 жыл бұрын
Kristian Blåsol It is too tediously for me to setup this case. And I don't have enough components yet. But! I have enough programming experience to imaging what's going on even without a hardware. Here is why you have double "2" after "1". First you send value for "0" which is "128+64" in decimal or 11000000 in binary (b). Then (when send "1" which is 128+121=11111001b) you shift this value out to the second register. The most significant bits go first, so "0000" is the low bits of the second register. Then you send "2" (128+36=10100100b) and the low bits of the second register contain the portion of "1" which is 1001b (LSB). That is what activates the second digit. Then you send "3" (128+48=10110000b) which sets the LSB of the second register to 0100b. And that is what activates the last digit (when you see "3" the last digit is activated). Hope now you understand why the expression of "64>>8" has nothing to do with the eliminating of the artifacts.
@geoffroywogblo9002
4 жыл бұрын
Please how to control 2 4digits display ???
@gjwinder
3 жыл бұрын
Great article Kristian. However try as I might. I cannot get the decomal point to appear anywhere. I have common anode LED, pin 3 wired to Q3 on the 2nd 595 and added 2048 to my shiftout value. Nothing ever lights up the point. Any tested help would be apprciated.
3 жыл бұрын
The dot is the 8th bit/pin so make sure you actually wire that in aswell. I am not sure I wired in the dot in my example.
@gjwinder
3 жыл бұрын
@ Sorry Kristian. I am more confused now. You say the dot is the 8th bit/pin??? On the LED the Dot is Pin 3 and Pin 8 is D3. The 8th bit on my 1st 595 is 128 signaling D1. Do you mean use the 8th bit on the second 595? Dont see wht that would ne any different to me using the 4th bit on the 2nd 595 and setting 2048? Thankyou for your help.
@clarkso65
7 жыл бұрын
Could you please do a video on 7 segments and 595 with a 4x4 keypad as input?
@sailintheMoney
5 жыл бұрын
Dear sir how show industrial pressure sensor value 25 bar in 4 digit 7 segment display i2c i mean maximum 7219
@LUCKY007725
7 жыл бұрын
nice work as always could you please make a tutorial with existing by adding DHT sensor mean how to display temp and humidity values over 7 segment with 595
7 жыл бұрын
I'll add it to my ever expanding todolist... :)
@LUCKY007725
7 жыл бұрын
Thanks and waiting
@HobbyHomeWorkshop
5 жыл бұрын
If i want to use a common cathode display, i should change 64 with 63, 121 with 6, and so on?
@furrom152
6 жыл бұрын
Yeah, Digi003 ... I haven't seen that logo in ages!!
6 жыл бұрын
Yep. ProTools fan here. I still work with a digi002 and protools 8. :)
@arslanarshadakber
7 жыл бұрын
how can i modify it to manual.......? how can i make 2 digit manual counter using a button ,,,two seven segment and arduino
@jacquesfournier5822
6 жыл бұрын
Hi I need help to make a dart score board for my father with 1.8 inches segment i have tried to program the keypad and the segment and shift register and i dont get it do you think someone can help me Jacques
@driversteve9345
7 жыл бұрын
Thanks for your videos! You've saved me a lot of time! Question: I thought the LEDs had to have a resister on each segment or you'll burn out the LEDs? That's the way it was when I was a kid 30 years ago playing with LEDs. Has that changed?
7 жыл бұрын
No you are correct. Using current limiting resistors in the correct way to handle LEDs for them to last longer. I was "lazy" to speed things up, and did not use them. I have gotten a lot of comments about this, and have learned my lesson and will use them in the future ;)
@driversteve9345
7 жыл бұрын
Kristian Blåsol In my experience, LEDs would burn out very quickly without a resister. So fast you would see it light up very bright and quickly decrease in brightness and then you would get that burnt smell.
@MrSabifa
7 жыл бұрын
Hi, is there a way to shiftout multiple digits at the same time? For example an 12. The one on the first digit and the two on the second digit? I thought on something like this but I don´t think that this will work: digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 1792 + 1664 + 63 >> 8); //1792 is D1, 1664 is D2 shiftOut(dataPin, clockPin, MSBFIRST, 1792 + 63 + 1664 + 91); //+63 for the 1 on D1 and +91 for the 2 on D2 digitalWrite(latchPin, HIGH);
7 жыл бұрын
This video show a way to multiplex four digits, so basically you could just use this code but only connect and send data for two segments instead. If you mean with only one 595, you can do that also, I believe I disguss this shortly in the beginning of the video.
@MrSabifa
7 жыл бұрын
Thanks for you answer. I just solved my problem with another chip, the max7219. It's a pretty good chip for led matrix' and 7 segment displays. :)
@alextrezvy6889
7 жыл бұрын
It seems like 4 595s in series with 4 independant digits will be more MCU's cycles and code saving, which allows to consume less power and produce less errors (by sending 4 bytes occasionally as oppose to permanent clocking). Isn't it?
7 жыл бұрын
Yes, partly true. If you use one 595 for each digit you dont have to cycle through the bit-shifting all the time. One you throw the latch the 595s will keep their values and the digits will stay on, even if you turn off the microcontroller. However, you get higher hardware costs with four instead of just two 595s. Also the powerconsumtption could be impacted by the fact that the LEDs are on all the time, instead of pwm:ed (kind of) when they are constatly shifted. But yes. Using four 595 is a very nice solution aswell, I chose not to show that one, but might do it in another video if many have questions about it...
@vyshnavkrishna9043
6 жыл бұрын
Sir, Will there be any difference if I use 74ls595 instead of 74hc595??
@morganbugler1732
8 жыл бұрын
where does the lcd pin 3 attach to, not on sheet?
@rolandblok
8 жыл бұрын
thanks for the video. Why are there no resistors on the led segments to control the current?
8 жыл бұрын
+Roland Blok Ah, that would be me being lazy... Sorry, I sometimes forget this. I have done it in previous videos, but forgot in this one...
@lolinger-ir4rr
8 жыл бұрын
How can I count from one to ten and also bigger numbers
@SpitFire-up4dw
2 жыл бұрын
Thanks for the great tutorial. I'd like to use the Decimal Dot too. Can someone tell me, where the cable on pin 3 on the 4Digit7Segment-Display goes on the 595's and which number I need to use in the code to trigger it? Thanks in advance.
2 жыл бұрын
I would add the dot-pin to pin 7 on the first 595 (the one where all the other led segments are connected), and then to light up the dot, you would just add 128 to whatever number from the table I refer to (from previous episode) to light up the led. It has to do with binary math that is discussed in a few videos before this one... Hope that helps.
2 жыл бұрын
Link to the table: www.duinos.net/files/2015/img_2379.jpg
@reginaldcaballo7490
8 жыл бұрын
hello...maybe if not to much to ask Kristian if you could help me with my project...a 5 inches tall 3 digits 7 segment LED display that can be controlled by 4 x 4 number keypad as input. thank you very much....
@ericohman
8 жыл бұрын
Bra videor! When you compare using one 595 per digit and you talk about flipping the latch to hold the number. Does that mean that because there is no multiplexing involved, I could disconnect the ”serial signal” and the previously latched number would still show indefinately, well, as long as there is power :)
8 жыл бұрын
+Eric Öhman Short answer (after reading your question four times): Yes. I believe this is the case. (If I understood your question). Once you "flip the latch" the 595 will hold the value even if you remove the serial signal.
@Minwah1959
7 жыл бұрын
Does multiplexing with a 595 mean that the digits are all on at the same time? As opposed to mutiplexing straight from the arduino (one digit at a time). Is that what the 595 latch is for? I've tried mutiplexing (no 595) with 9 digits and to get no flicker, I have to use a delay of 2ms which means the display is a bit dim. I'm wondering if the 595 method means the led's are on longer, apprearing brighter? Thanks for the videos, most helpful!
7 жыл бұрын
If you only want to work with ONE 7segment led display, then you should watch this video instead, which shows you how to work with one 595 for one display. This wont create any flicker at all, as it will stay on for as long as the latch pin is set. If you want to work with two or more, you could either 1. do as in episode 9 and connect the 595+led segments in series, where you get NO flicker. Or 2. do as in this video where multiplexing is used and you might get dimmer leds or a bit of flicker... but only uses 2 595's for four led displays... Hope it helps.
@shivakumar-lv6wr
8 жыл бұрын
If i want to make the second decimal point glow on the second digit how should i go about doing that? connecting pin 3 of the display to ground will light up all the decimals. since all the data bits are occupied in the first 595. how can i make the second decimal glow now without making much changes in the hardware?
8 жыл бұрын
If you add the decimal pin to the fourth pin on the second 595, then you can easily change the code and add 1024 when writing the digit you want a decimal point on. Try it out to add 1024 to just one of the digits, and then let me know how it worked.
@sorcerer33
8 жыл бұрын
what will be the code for comon catode ? when i put //0 digitalWrite(latchPin, HIGH); shiftOut(dataPin, clockPin, MSBFIRST, 128 + 63 >> 8); shiftOut(dataPin, clockPin, MSBFIRST, 128 + 63); digitalWrite(latchPin, LOW); delay(1000); //1 digitalWrite(latchPin, HIGH); shiftOut(dataPin, clockPin, MSBFIRST, 256 + 63 >> 8); shiftOut(dataPin, clockPin, MSBFIRST, 256 + 6); digitalWrite(latchPin, LOW); delay(1000); it --- --- --- | | | | | | the first digit not glow | | | | | | --- --- --- | | | the second digit not glow | | |
@sorcerer33
8 жыл бұрын
thank you fot help it will be //0 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST,1792+63 >> 8); shiftOut(dataPin, clockPin, MSBFIRST,1792+63); digitalWrite(latchPin, HIGH); delay(1); //1 digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, MSBFIRST, 1664 + 63 >> 8); shiftOut(dataPin, clockPin, MSBFIRST, 1664 + 6); digitalWrite(latchPin, HIGH); delay(1);
@anitechz1821
7 жыл бұрын
Thank you for these tutorials. My one request please. Can you make all of these topics with AVR Microcontroller in atmel studio. Cause I'm learning on it. Please reply me.
@cl2422
6 жыл бұрын
Does it matter what number gets shifted out? ie. could you have "0 >> 8"? Is it just to clear the register?
6 жыл бұрын
I believe it is to clear the register yes. Someone pointed out that it wasn’t needed at all because we send in new values all the time. I can’t really say as I haven’t tried. Try different values and see what happens. Nothing will break. ;)
@JavierRomeroo
8 жыл бұрын
Hey Man, thank you so much for your videos! I was looking for a manual binary entry on the 74HC595 just as you showed. What I want to do is basically to expand outputs and inputs in the arduino. I know you already took the time to do this and I don't want to bother you anymore, but.... Do you have a video explaining how to read from a 74HC165? What I want to do is read 8 bits and depending the state in each one of them (flip flops) change them with 16 bits connected each to a 2N2222. So then I can close VCC or Ground and change the state. That being said I want to read in the 74HC165 for example: 01110001 which will mean that the 2, 3, 4 and 8th flip flops are on. Then suppose I want to change 2 & 4 (turn them off) send: 00010001 000000000 where: First flip flop 0 [Ground] 0 [VCC] Second flip flop 0 [Ground] 1 [VCC] Third flip flop 0 [Ground] 0 [VCC] Fourth flip flop 0 [Ground] 1 [VCC] etc... Which basically would be: 128 + 17, 256 + 0 right? But I still have to develop the "reading part" which changes with time. (In my configuration Ground turns on and VCC turns off), If you could help that would be awesome (You already did so don't feel obligued to) Thank you so much!
8 жыл бұрын
+Javier Romero Short answer: no, I dont have that video yet... But I want to!!! :) It is definitely on my todo list. As for your binary question I dont quite follow what you are asking, I understand what you want to do, and think your on the right track...
@melchorlaspinas5063
8 жыл бұрын
sir kristian will you please teach me on how to use 74hc595 shift register to 2 digits seven segment cathode? what is the wiring in it. for my thesis proposal which scoreboard..
8 жыл бұрын
+Melchor Laspinas Listen to what I describe here: kzitem.info/news/bejne/u32wyHWaZnOaq5g And also take aloot at episode 9 and you should be able to figure out how to do the wiring. Basically you parallel connect all the LED pins on both displays and then you multiplex between the two ground pins, alternating HIGH and LOW on the ground pins and sending a data, then switch ground pin and send data for second number. Do this fast enough as in this video with the four pins and it will look like two numbers. Take your time and really understand this video and episode 9 and you should have no problem implementing it into your project with only two digits.
@melchorlaspinas5063
8 жыл бұрын
+Kristian Blåsol my scoreboard is for basketball having incr and decr buttons would you please give me the code in it and the circuit diagram ? Please??
@Faddi81
7 жыл бұрын
Great job, your videos helped me a lot! For my DIY-carrera project I want a "2 digit-7-segment display" for counting rounds and a "1 digit-7-segment display" for displaying the driver´s position. I´ve connected these displays to two 74HC595 shift registers (without the dots, I don´t need them). The 2 digit-display works fine and counts from 00 to 99, but I´ve connected both common cathode pins directly to the arduino to switch them on and off. --> Do you think it´s possible to save these two pins on the arduino by connecting the common cathodes to the last pin of the 1st shift register and another pin on the 2nd shift register? --> The "1 digit-7-segment display" is connected to the 2nd shift register. I want it to run seperately, but the bits from the 1st shift register let it show the same numbers (or a mixed type) of the 2 digit-display. For now I see only one way, to take 2x3 pins at the arduino to run both displays complete seperately plus 2 more pins to switch the two digits on off. Is that right or do you see a smart trick to run all this with only 3 pins on the arduino?
@Faddi81
7 жыл бұрын
I managed it for myself, running the "1 digit-" and "2 digit-" 7 segment displays with two shift registers and only 3 pins on the arduino. My programming knowledge is not good - it´s more like try and error ;-) But maybe this sketch can help anybody else: int shiftPin = 8; //Pin verbunden mit SRCLK des 74HC595 int storePin = 9; //Pin verbunden mit RCLK des 74HC595 int dataPin = 10; //Pin verbunden mit SER des 74HC595 // 0 1 2 3 4 5 6 7 8 9 byte zahl[10] = {0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101, 0b00000111, 0b01111111, 0b01101111}; byte zehner[10] = {0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101, 0b00000111, 0b01111111, 0b01101111}; byte Position[9] ={0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101, 0b00000111, 0b01111111}; byte DIG_zehner = 0b10000000; int j = -1; void setup() { pinMode(storePin, OUTPUT); // Pins 8,9,10 auf Ausgabe stellen pinMode(shiftPin, OUTPUT); pinMode(dataPin, OUTPUT); } void loop () { for (int i=0;i9){j=0;} digitalWrite(storePin, LOW); shiftOut(dataPin, shiftPin, MSBFIRST, DIG_zehner); shiftOut(dataPin, shiftPin, MSBFIRST, zahl[i]); //Einerstelle Runden digitalWrite(storePin, HIGH); delay(100); digitalWrite(storePin, LOW); shiftOut(dataPin, shiftPin, MSBFIRST, Position[1]); //Positionsanzeige bitWrite(zehner[j],7,1); shiftOut(dataPin, shiftPin, MSBFIRST, zehner[j]); //Zehnerstelle Runden digitalWrite(storePin, HIGH); delay(100); } }
@MrSabifa
7 жыл бұрын
hey, meinst du es ist möglich auch 2x 4digit 7segment an den beiden 595er zu nutzen ohne einen dritten zu benötigen?
@Faddi81
7 жыл бұрын
Hi MrSafiba, ich denke schon, dass das möglich ist. Du müsstest an das eine Schiftregister die 8 Segmente von beiden Anzeigen anschließen und an das andere Schieberegister die Anschlüsse für die jeweilige Anzeige (2x4). Die Schieberegister in Reihe schalten, damit dann die 8 Segmente nacheinander von der einen auf der anderen Anzeige angezeigt werden können. Bei mir funktioniert das so, dass ich ein bestimmtes Bit ausgeschaltet habe, was gerade NICHT angezeigt werden sollte. Beachte: Es ist natürlich ein Unterschied, ob die Segmentanzeigen eine gemeinsame Anode oder Kathode besitzen. Je nachdem ändert sich die Bitschreibweise (Nullen und Einsen tauschen!). Bin kein Programmierer und hoffe, dass ich jetzt keinen Quatsch erzählt habe. Bei mir hat´s jedenfalls so funktioniert! Viel Erfolg! ;-)
@infinitemindsetnow
8 жыл бұрын
After watching you vids I am now very well informed of shift registers. I do still have one question that I cannot seem to find the answer. I was wondering if you can use these registers to turn on specific led versus back to back. For instance press button1 turn on led1. Press button2, led1 stays on led2 turns on, press button3 led1 stays on led2 turns off led3 turns on. Is this achievable with a register.
8 жыл бұрын
+David Arroyo Of course. You would just have to add this to the logic of the sketch, check your say 8 buttons, and assign each button to the value of one bit in the register eg. Button1=1, Button2=2, Button3=4, Button4=8, Button5=16, Button6=32, Button7=64, and Button8=128. Then if you check and find that button 1 and 4 is pressed you send 9 to the Shift register, and LED 1 and 4 will light up. Hope that is the question you are looking for... Otherwise, ask again ;)
@infinitemindsetnow
8 жыл бұрын
+Kristian, wooooooooooooooow, light just went on in my head. You are the man. Let me play wit this and see what I come up with. Thanks for your prompt reply.
@ChrisBurns3D
8 жыл бұрын
I built this in 123D circuits, works exactly like how you showed but both 595's are getting damaged as it runs, almost like they are getting too much voltage. I tried resisting the 5volts with a 220 ohm resistor, but this just dimmed the display...
8 жыл бұрын
Interesting. I am not sure why this is. Does the program give any indication on why this is happening? It really should be able to withstand the few mA of 5V from the Arduino...
@ChrisBurns3D
8 жыл бұрын
Kristian Blåsol Thanks for the reply! I'm not sure, I would be keen to build it in real life and just see if the 595's get warm. Here is the link to the project: circuits.io/circuits/2697681-4-digit-7-segment-led
8 жыл бұрын
Well it says that it cant handle 5v on on of the inputs of the 595, limit is 1.95V? Sound strange as it should be able to handle 5V. Many have built this without issues, so I dont think it will be a problem... At most youll blow a 595 trying it out....
@HASIBSTECHS
7 жыл бұрын
fucking awsome tutorial, you are genius
@johnisjohn-co6zl
5 жыл бұрын
Hello my dear friend ... I am from Greece and I am electonic too ... I would like to tell you to give the help .. I have a board with the atmega328p 74hc595 and ulm 2803 has both infrared and contol to brave the display prices ... I want you to tell me if you tell me to give me your own code for atmega328p and how much will it cost me ... thank you very much and I expect yours ......
5 жыл бұрын
Sure. The code is linked in the description, free of charge ;) Here is a direct link to it: duinos.net/show/?id=255
@hornos27hotmailcom
7 жыл бұрын
Thanks for your contributions, I need four 74hc595 with each digit (four) independent and the possibility of a button that makes the "8888" test thanks.
@TheJavaSync
3 жыл бұрын
+ds2321 = diy clock :)
@matthewfelgate
7 жыл бұрын
Why does it need 2 shift registers?
7 жыл бұрын
Sorry, the last reply was for another video _:) , so a simple answer is that with only three pins on the Arduino you can control all four segments... You could do this with only one 595 and choose segments with another four pins on the arduino, but the way this video does it you only need the three pins and thats it. Therefor two 595s... Hope that helps (even more than the other answer)... :)
@LUCKY007725
7 жыл бұрын
nice tutorial as always I need some guidelines regarding use of 595 with my temperature Controller. how to switch high or low the outputs of 595 with respect to temperature. Waiting for reply Thanks
7 жыл бұрын
Do you mean to add a minus sign to the LED-display? The 595 as such doesnt support negative numbers. Maybe a bit more information what you are trying to accomplish would help :)
@LUCKY007725
7 жыл бұрын
Kristian Blåsol Thanks for the reply I want to control I/O pins of 595 with arduino I have connected dht22 and lots of relays. I/O are limited in arduino uno, I want to extend them by adding 595 but I don't have idea how to switch the i/o of 595 with condition of temperature or humidity
@DupczacyBawol
7 жыл бұрын
write it - the digit select - in binary and they will understand easily. Why talking "binary" while writing decimal numbers? It is not clear. You shouild say that ShiftOut() function on Arduino, only shists away 8 bits at a time, and integer numbers there are 16-bit numbers. The binary number is backwards in put backwards into the 595 so that pin Q7 always stores the most significant (highest) bit of the byte.
@Su67377s
4 жыл бұрын
can we make 6 digit 7 segment display. have you made video on it?
4 жыл бұрын
Yes you can. Follow the instructions of this video but use 6pins for the 6 common pins instead of the four used in my sketch. Of course change the program accordingly. I haven’t done a specific video on a six digit display as the principle would be the same as with this one.
@Su67377s
4 жыл бұрын
@ ok thanks alott. Can we use only 1 ic of 74HC595 by connecting all the segment pins to 595 and all (6) digit select pins to main arduino controller.??
4 жыл бұрын
Sumit Wankhede yes that works. As long as you have 6 pins free on the arduino.
@Su67377s
4 жыл бұрын
@ is it necessory to use ULN2803 IC if we use 74HC595?
@jerkel32
8 жыл бұрын
hi. im trying to use two 595s, but when i send data eg #1, the first LED on both 595 turns on, same if i send #2, the 2nd LED on both 595 turns on.... anyone else have this problem
8 жыл бұрын
+jerkel32 It is explained a bit in this video. You need to serial connect the two 595's. Probably what you have done is you have connected both 595s to the same Arduino pin (Parallell connection).
@jerkel32
8 жыл бұрын
thanks for the reply, I checked my wiring and code and I forgot to put in the code "shiftOut(dataPin, clockPin, MSBFIRST, 128+64 >>8);" which works for two registers but not for three.... any suggestions
8 жыл бұрын
You need to add the value for the third LED in that case. And also write >>16 to push 16 zeroes ahead... (I think)... Try that and get back to me...
@darkgxk
6 жыл бұрын
with me it has the opposite effect if i do + 128 it lights up the three others and not the one i want XD
6 жыл бұрын
Then you have a common cathode and need to use the other column in the table I show in the video. Hope that helps.
@LisnicVitalie
5 жыл бұрын
no code :(
@emrullahyener4356
7 жыл бұрын
Hi . where is the code and schematic??
7 жыл бұрын
Hi, there is a link in the description but here it is again: duinos.net/show/?id=254. Also all the information is in the video ;)
@emrullahyener4356
7 жыл бұрын
Thank you :)
@MrGuideMaster
2 жыл бұрын
Jos to gonegt next 7 seg
@loskrperz2068
8 жыл бұрын
Hola Kristian, buscando que hacer con esto, two 74HC595 drive.google.com/folderview?id=0ByS7EaOsNlzSV3dVQ29wM1J4ZG8 encontre su video, y aun me pregunto. what can i do with this
8 жыл бұрын
Looks like you have two 595s there... Find out what pins to use to control the 595 and you should be able to use this. I guess you have to trace the routes on the pcb to find which cable goes to the specific pins on the 595s. Then just send some serial data. I would send 1 2 4 8 16 32 64 128 256 512 1024.... to see which led segment each of the bits turn on. Good luck! :)
@loskrperz2068
8 жыл бұрын
Hola Kristian. Gracias por responder, Si tiene dos (2) 595, y cinco cables, supongo +5v, Gnd y datos. Gracias.
8 жыл бұрын
Probably 5V, gnd, and then clock, latch, and data
@loskrperz2068
8 жыл бұрын
yes it is true
@brigosx
5 жыл бұрын
Indeed very nice tutorial. Thanks a lot man. Your idea became an easy to use library at github: github.com/brigosx/SevenSeg4D.git I hope every one enjoy it.
5 жыл бұрын
Wow nice work! Thanks for making it even easier to use led segments! 👍
Пікірлер: 117