Introduction: Make Yourself a Homemade Clock With Thermometer Using ATMEGA128

Picture of Make Yourself a Homemade Clock With Thermometer Using ATMEGA128

In this step by step I wanna share my experiment with ATMEGA128 timer and interrupt using DS1307 and NTC to display homemade clock and thermometer.
It displays hour,minute,second, day of week, day of month, month, and year, and the temperature in celcius

Enjoy the project...

Step 1: Prepare All the Parts for This Project

Picture of Prepare All the Parts for This Project

This project will need these parts :
1. ATMEGA128 board
2. ATMEGA 128 chip
3. DS1307 module
4. USBASP for debugging
5. AVRStudio
6. NTC,

Please have a look on the photo

Step 2: Assemble All the Parts Together

Picture of Assemble All the Parts Together

After we prepare all the parts, we need to assemble them together,
Here are the ports I used for them :

#define lcd_data_pin PORTA

#define en PORT_D.b0
#define rs PORT_D.b1
#define rw PORT_D.b2

ADMUX=(1<<REFS0 | ADC_0);                  //Conversion on channel 0, thermistor input

Step 3: Define the Variable for DS1307

Picture of Define the Variable for DS1307

I defined a variable for DS1307 like this :
// DS1307 Register Address
// Second: ds1307_addr[0]
// Minute: ds1307_addr[1]
// Hour  : ds1307_addr[2]
// Day   : ds1307_addr[3]
// Date  : ds1307_addr[4]
// Month : ds1307_addr[5]
// Year  : ds1307_addr[6]

Connect SCL to PD0 and SCK to PD1 to retrieve / read data from DS1307

Step 4: Test and Enjoy Your New ATMEGA128 Clock and Thermometer

Picture of Test and Enjoy Your New ATMEGA128 Clock and Thermometer
Test and enjoy your new ATMEGA128 Clock and thermometer
Let's watch the video for this project in action


Thanks for reading and good luck for your project....;)

Comments

About This Instructable

5,082views

23favorites

License:

More by arick:2cm height 7 Segments 6 Digits AVR Clock  with 4 digits thermometer Speaking clock with AVRDIY Online Bulb Controller
Add instructable to: