To show you how simple things become when you use a microcontroller, check out this digital clock that uses only two components, Arduino and display.
To show you how simple things become when you use a microcontroller, check out this digital clock circuit: It's an Arduino UNO with 4 wires connected to a 7-segment display. Then you need some code to get it to show the time. More or less something like this: void loop() { // Increment seconds and update minutes and hours seconds++; if (seconds == 60) { seconds = 0; minutes++; if (minutes == 60) { minutes = 0; hours++; if (hours == 24) { hours = 0; } } } // Show the time on the display displayTime(); // Wait one second before updating the time again delay(1000); } That's it! It doesn't get much simpler than that. I could put this together in less than five minutes. If on the other hand, you want to do this without a microcontroller, everything becomes more complex. You need to: - Generate a 1Hz clock signal (ex by using a 32.768 kHz watch crystal alongside a CD4060, a CD4518, and a CD4013 IC.
- Chain additional CD4518 ICs to keep count of seconds, minutes, and hours.
- Add logic to reset seconds and minutes after 60, and hours after 12 or 24.
- Connect the outputs of the CD4518 registers to CD4511 ICs to display each digit on a 7-segment display.
I have to admit that, to me, this sounds like a lot of fun =) But it would probably take days or weeks to finish, because of all the connections and components needed. So if you just need a function quickly, like a clock, then knowing how to use microcontrollers is an extremely useful skill. Keep On Soldering! Oyvind @ build-electronic-circuits.com PS! Want to learn microcontrollers? We have several beginner courses that include different types of microcontrollers over at Ohmify. It's so easy to get started that you might even want to get your kids or grandkids involved =) Click here to learn more about Ohmify >> |
Comments
Post a Comment