DS1302 real-time clock tutorial: the clock that doesn't forget the time!

  Переглядів 18,335

FriendlyWire

FriendlyWire

День тому

The DS1302 real-time clock keeps the time, even when the main power of the circuit is turned off. And today we will learn how to build a clock with it and the PIC16F1455 microcontroller!
More details and an up-to-date list of all components: www.friendlywire.com/tutorials...
Thanks for tuning in, and let me know in the comments if you have any questions!
Website: www.friendlywire.com
Twitter: / friendlywire
Reddit: / friendlywire
Facebook: / friendlywire
Instagram: / friendlywire
Timestamps:
00:00 Introduction
00:44 What you need
01:42 Schematic
03:28 How does the DS1302 work?
07:21 Programming the PIC16F1455
08:24 Flashing the PIC16F1455
09:42 Preparing the 7-segment LEDs
10:10 Building the circuit on the breadboard
14:49 Possible improvements

КОМЕНТАРІ: 50
@etce10avijitdey95
@etce10avijitdey95 7 місяців тому
Excellent work I really like how clean you make the circuit its really great
@FriendlyWire
@FriendlyWire 7 місяців тому
Thank you for your kind words, and I am glad you liked the video! :)
@piratsik7691
@piratsik7691 3 роки тому
Your channel is great, the content is helpful and enjoyable. I hope you get all the viewers!
@FriendlyWire
@FriendlyWire 3 роки тому
Thank you so much, that's very kind of you. Have a great day!
@jmans4928
@jmans4928 8 місяців тому
Excellent work, very well documented and a lot of attention to detail. Thanks for the video.
@FriendlyWire
@FriendlyWire 8 місяців тому
Thank you, glad you like it!
@jaimecosta2966
@jaimecosta2966 2 роки тому
Hi when I was young electronics was my hobby.. And since I decided to move to a different country other hobby came along... Now that I am mutch older I will starting electric hobby again.. I find your chanel amazing... Thank you for charing your information and keep up the good work.. Apologies for any spelling mistake it has been a while since I written English.. Wish you well
@FriendlyWire
@FriendlyWire 2 роки тому
Hello Jaime, thank you so much for your kind words. I am so happy to hear your story, and even more excited that you find my videos useful. Keep uo the great work, and best wishes from the US! :-)
@jerril42
@jerril42 3 роки тому
Thank you Jens. Very interesting, the access protocol was simpler to understand than I thought it would. Take care.
@FriendlyWire
@FriendlyWire 3 роки тому
Thanks, I am glad you like it! Yeah, the protocol looks confusing at first but it's actually not that bad. What had me confused was the rising-edge/falling-edge stuff... :)
@muhammadhayyan9914
@muhammadhayyan9914 3 роки тому
You are a great motivation for me 🙂. Thank you for your work
@FriendlyWire
@FriendlyWire 3 роки тому
Thank you, Muhammad, that means a lot! :-)
@lorenzo7046
@lorenzo7046 3 роки тому
Really nice project!
@FriendlyWire
@FriendlyWire 3 роки тому
Thanks so much, Lorenzo :)
@amrishhirani6096
@amrishhirani6096 8 місяців тому
Nice video thanks
@FriendlyWire
@FriendlyWire 8 місяців тому
Thank you, Amrish, I am glad you like it! :)
@jonathancrawford7106
@jonathancrawford7106 3 роки тому
Superb! Liked and subscribed! many thanks
@FriendlyWire
@FriendlyWire 3 роки тому
Thanks so much, glad you like it! :)
@konturgestalter
@konturgestalter 3 роки тому
excellent channel.....pleaaaase more
@FriendlyWire
@FriendlyWire 3 роки тому
Thanks! :-) I have no plans of stopping! Do you have anything you want to see when it comes to PIC microcontrollers? Always looking for new inspirations :)
@anokhautomation4453
@anokhautomation4453 Рік тому
Very nice project 👍
@FriendlyWire
@FriendlyWire Рік тому
Thank you for your kind words, I am glad you like it! :)
@kanishkawijayananda6957
@kanishkawijayananda6957 Рік тому
Great job thanks
@FriendlyWire
@FriendlyWire Рік тому
Thank you, glad you like the video!
@ezequielacevedo770
@ezequielacevedo770 3 роки тому
great video you have win a new loyal subscriber my friend! greetings!
@FriendlyWire
@FriendlyWire 3 роки тому
Ezequiel, thank you so much for your kind words, I am so happy you liked the video. Do you have any suggestions for future topics? Anything PIC-related you want to see? I am always looking for new ideas :)
@ezequielacevedo770
@ezequielacevedo770 3 роки тому
@@FriendlyWire you're welcome!! certaintly i am more an analog dude like 'a vacuum-tube-nixie head' so ...uControllers give me some allergies ...i scratch arduino and C but totally noob for PIC based projects (they're expensive in my country). Personally i'd rather enjoy these tipe of videos with explanations close to datasheets than simplist explanations. It will be great if you can make some freq counter or multiplexed 7 segment display. One of mine delayed projects is an 4026 controlled VFD display freq counter. Anyway whatever project with vfo's , LEDs or cd40xx i jump into it!! keep on rocking!!
@FriendlyWire
@FriendlyWire 3 роки тому
@@ezequielacevedo770 Thank you so much! Can I ask where you are located? I had no idea PIC controllers are expensive, I actually use them because they are so cheap! So this would be very helpful information :) I have more videos like this one planned, glad you like the style! Maybe I will do multiplexing in the future, it's a very useful tool to have. Thanks again for your kind words, and have a fantastic weekend!
@ezequielacevedo770
@ezequielacevedo770 3 роки тому
@FriendlyWire I am from Argentine, a small city, very far from the capital. It's the price's chain indeed. On a retailer The pickit + pic16 can cost around the equivalent of +25-35 U$s meanwhile a chinese clone of uno or stm32 cost a quarter or less!! offer & demand rules...it is still affordable but nowadays that 40xx are still available and no longer so popular, you can buy these for fewer money...yes i am a cheap bastard! always looking for bargains ha ha but anyways sooner or later i'll buy PIC, your webpage is really well documented for learning how to code so it worths a lot! really helpfull and quality resources. thumbs up!
@FriendlyWire
@FriendlyWire 3 роки тому
@@ezequielacevedo770 Thank you for explaining that to me, Ezequiel, this is a new perspective I did not think about before. Hmm... I always used to think that buying the PICkit3 is worth it after flashing a few microcontrollers (total cost per project will be lower the more you flash). Thank you also for your kind words, and best wishes to Argentine from the US :)
@user001sg9
@user001sg9 2 роки тому
Very nice video, thanks. One unclear issue for people who are not used to RTCs is - how to set the clock time initially?
@FriendlyWire
@FriendlyWire 2 роки тому
Thank you! Yeah, you make a good point! I explain the microcontroller source code in a lot of detail in the companion article: friendlywire.com/tutorials/ds1302/#ch3 There you can find these explanations, but you are right, it should have been mentioned in the video, too. I hope it's not too confusing. Thanks again, and have a great day!
@Alex-rv8gw
@Alex-rv8gw 3 роки тому
hi sir can you do a tutorial video about PIC microcontroller with practical and programming for beginner ???
@FriendlyWire
@FriendlyWire 3 роки тому
Of course! I have one of these already: ukposts.info/have/v-deo/nWSCZpqQjZuVsY0.html Is that what you have in mind?
@mayukhbanerjee8877
@mayukhbanerjee8877 3 роки тому
Hi Friendly wire. for my upcoming college project I have decided to built a alcohol sensor and display it on 3 seven segment display however the 8051 development board which I have brought already has a lcd.now I feel lazy and don't want to use the seven segment display can y pls tell what changes should I make
@FriendlyWire
@FriendlyWire 3 роки тому
Hi Mayukh, thanks for your question :) To use LED display you could use the TLC5916 driver, it is not so hard: ukposts.info/have/v-deo/faOGrI2GZ29nrWQ.html Let me know if it helps! :) But other than that I am not so sure. Do you want to learn how to drive an LCD?
@eastgoalstv7009
@eastgoalstv7009 3 роки тому
Bro can you help me please, I couldn't get PIC16F1455 and TLC5916 What else should I use instead??
@FriendlyWire
@FriendlyWire 3 роки тому
You can use basically any PIC microcontroller for this, in this project we don't use anything that is specific to the PIC16F1455. For the drivers you can use the CD4094 shift registers, if you have to, but they are not so ideal. For smaller displays they work OK, see this video here: ukposts.info/have/v-deo/gGKpZ5d4gWmb02Q.html
@dtadetayo
@dtadetayo 3 роки тому
Will the time be correct if the power is off after powering it On back?
@FriendlyWire
@FriendlyWire 3 роки тому
Yeah exactly! The clock keeps ticking as long as the small battery is connected. So even if you disconnect the main power and the LEDs go out, the time will be correct when you turn it back on :)
@Alex-rv8gw
@Alex-rv8gw Рік тому
May I know the DS1302 is using what protocol?
@FriendlyWire
@FriendlyWire Рік тому
I don't think it has a name, it is just a serial interface. The details are explained in the video, and there are more details in the companion article at www.friendlywire.com/tutorials/ds1302/ :)
@Sarahbuildsstepsequencers
@Sarahbuildsstepsequencers 2 роки тому
That’s one expensive clock! Nice, though!
@FriendlyWire
@FriendlyWire 2 роки тому
Thank you! I guess that's true, it's probably cheaper to buy one from somewhere else :) But I like the idea of constructing it on a breadboard because then you can disassemble it and build something else with the components!
@bah4dz
@bah4dz 3 роки тому
GET MORE VIEWERS !
@FriendlyWire
@FriendlyWire 3 роки тому
Ha, thanks I guess? :-)
@uss-usaf-atlantis
@uss-usaf-atlantis Рік тому
The clock is wrong it is earth time
@FriendlyWire
@FriendlyWire Рік тому
Ha, what do you mean? :)
CD4017 tutorial: the IC you can count on!
17:49
FriendlyWire
Переглядів 30 тис.
NE555 tutorial: three useful circuits
16:09
FriendlyWire
Переглядів 77 тис.
Не пей газировку у мамы в машине
00:28
Даша Боровик
Переглядів 1,6 млн
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Переглядів 33 млн
ШАХТАР - ДИНАМО. КОМЕНТУВАННЯ. УПЛ. 28 ТУР
4:04:31
Control LEDs with your computer using RS232!
16:09
FriendlyWire
Переглядів 56 тис.
8-Bit Adder built from 152 Transistors
12:25
Hyperspace Pirate
Переглядів 583 тис.
Raspberry Pi Pico Tutorial - DS1302 Real-time Clock
4:11
NerdCave
Переглядів 10 тис.
How to use WS2812 “NeoPixel” LEDs with a PIC microcontroller
12:35
FriendlyWire
Переглядів 13 тис.
Restoration - Antique Radium Clock
25:25
Satisfying Restoration
Переглядів 4,1 млн
Interfacing DS1302 Real Time Clock with Microchip PIC Controller
5:32
IEEE Projects Bengaluru
Переглядів 489
Hacking a weird TV censoring device
20:59
Ben Eater
Переглядів 2,9 млн
How a quartz watch works - its heart beats 32,768 times a second
17:35
Add USB To Your Electronics Projects! - The USB Protocol Explained
15:19
#5 Arduino compatible Real Time Clock modules (RTC) - DS1307 & DS3231
12:04
Не пей газировку у мамы в машине
00:28
Даша Боровик
Переглядів 1,6 млн