This way it will be easy to use them during programming. You can fall back to the above mentioned tutorials if you want to know how the header files work.īefore getting into the main program, we have to define the pins that we have used with more meaningful name. Further below I am just explaining the main c file as small snippets.
#Set up eon timer and ds clock zip file#
The complete code with header files can be downloaded from the ZIP file here and can be opened using MPLABX after extracting. This project also requires three libraries for using LCD, I2C and RTC with PIC. The complete PIC program for this Alarm Clock project can be found at the bottom of this page. You can also solder the whole circuit to a perf board if you are looking to make more robust project. Also I have to use two breadboards to keep the circuit clean. I have used a breadboard module and 12V adapter to power the module. My hardware set-up looked something like this below once I was done with the connections Since there are couple of dozen wires to connect so just have patience and make sure the connections are correct. The complete circuit can be build over a breadboard. Learn more about using DS3231 RTC module with PIC here. A LCD display is attached to the PORTD of the PIC which is used to display the current time and set time. The current time is always kept in track by the DS3231 RTC module from which the PIC receives the data through I2C bus, so the SCL and SDA pins of the RTC module is connected to SCL and SDA pin of the PIC controller. The Buzzer will act as an output and will give us a beep when the alarm gets triggered and is connected to the PORT S pin. So one end of all the push buttons are connected to ground and the other ends are connected to PORTB pin, internal pull-up resistor will be used on these pins to avoid the pins floating. The five push buttons will act as an input for setting the alarm for the required time. The will also be used for simulation further in this project. The circuit diagram for this PIC based Alarm Clock Project is shown below, which was created using the proteus software.
#Set up eon timer and ds clock how to#
So it is better to learn how to use these modules beforehand. We will use GPIOs, LCD display and RTC module for this project. This project requires you know few basics about the PIC microcontroller and how to program it. So it is recommended to read through that tutorial, we will be skipping most of the information covered in that tutorial. We have already learnt about the RTC module and how to interface it with PIC. The current time will be kept in track using the DS3231 RTC module and we will use IIC communication to get these values from the RTC module. We will use few push buttons to set the alarm time whenever required. This alarm clock will have an 16x2 LCD display which will display the current time and set time. Alarm Clock using ATmega32 Microcontroller.Raspberry Pi Alarm Clock using RTC Module DS1307.We have previously built alarm clock with other Microcontrollers: Thinking of all these it is really exciting to program our own stuff that could do simple yet useful tasks, like the Alarm Clock that we are going to build in this project with PIC Microcontroller. Starting from the alarm clock that wakes you up and the toaster that serves you breakfast, everything is a contribution from digital electronics. Since the growth of digital electronics has been exponential, today it is almost impossible for a person to resist using any electronic equipment. The digital Revolution started in 1950 changes all the existing mechanical and analog electronic structures into digital computers.