Digital Clock using Seven Segment Display and ATMega16
In this ATMega16 AVR project we will be designing and implementing a digital clock with the aid of a atmel AVR ATMega16 microcontroller and seven segment display. Before going through this digital clock AVR project it is recommended to complete the tutorial on Interfacing a Seven Segment Display with the AVR Microcontroller.
Note: Although this AVR project was designed around the ATMega16 the project could have utilized another microcontroller such as an ATMega32, ATMega8515, etc.
ATMega16 Digital Clock Operation
Our digital clock operates as follows. When the circuit is powered up the clock starts at “00:00:00” for “HH:MM:SS”. There are two push-button switches used to set the time. Switch SW1 is for setting the minutes, when this button is pressed the minutes in increase until it reaches 59 then reset and start counting from 0. Switch SW2 is for setting thehours.
One feature to note in that all seven segment displays are driven by the same port (PortB). The microcontroller through controls from PortC indicate which seven segment display each digit is displayed on. Note that these Seven Segment Displays are common cathode display. In order for our digital clock to work correctly the internal oscillator of the ATMega16 AVR microcontroller must be enabled and set to 4MHz
For more detail: Digital Clock using Seven Segment Display and ATMega16
Leave a Comment
You must be logged in to post a comment.