Sign In

I2c With RTC (ds1307) Dispaly On Lcd

khaled eng.khaledzein@yahoo.com Egypt

Hardware: ATMEGA32 At 8 MHZ Wired On Pcp Software: C Project Atmelstudio

lcd dosnot work with RTC

Images

Program

#define F_CPU 8000000UL
#include <utildelay.h>
#include <avr/io.h>
//#include "DIO.h"
#include "RTC.h"
#include "LCD.h"

void Enable_PortPullUp(uint8 portnumber)
{
	DIO_SetPort(portnumber,0xff);
	return ;
}


int main(void)
{
	//RTC_inti();
	Enable_PortPullUp(2);
	LCD_Void_init();
	lcd_move_cursor(1,1);
	//LCD_WriteData('I');
	
	//uint8 strr[]="NUM OF INTR: : ";
	//LCD_WriteString(strr);
	
	uint8 i,j,k ;
	
	 /*(0x19,0x45,0x30);  // 19:45:30    (hh:mm:ss)
	RTC_Set_Date(0x09,0x01,0x10);  // 09:01:10    (yy:mm:dd)
	RTC_Get_Time(&i,&j,&k);
	//lcd_write_number(i);
	//lcd_write_number(j);
	//lcd_write_number(k);
	
	RTC_Get_Date(&i,&j,&k);
	unsigned short m =1234;*/
	//lcd_move_cursor(1,2);
	//lcd_write_number(m);
	//lcd_write_number(2);
	//lcd_write_number(3);
	uint8 z;
	for(z=0;z<10;z++)
	{
		//SSD_WriteData(i);
		lcd_write_number(z);
		
	}
	
    while(1)
    {
		
	   
	}
		
}

Replies

R Avinash Gupta
2016-09-21 07:34:26
post photoes

Post a reply to khaled

Think you can help khaled ? Then post your thoughts that might help khaled. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.