clock_functions.c
void printdate(tempo mydate)
{
	horizontal_mode();
	/* To print date at bottom left
	x_position(40);
	y_bank(5);
	*/
	
	/* Print at top center*/
	x_position(21);
	y_bank(0);
	PORT_LCD |= (1<<DC);
	
	printnumber((mydate.date >> 4));
	printnumber((mydate.date & 0x0F));
	printseparator();
	printnumber((mydate.month >> 4));
	printnumber((mydate.month & 0x0F));
	printseparator();
	
	/* (DS1307) YEAR ranges only from last 2 digits, 0 - 99. Year 2K has to be hardcoded */
	printnumber(2);
	printnumber(0);
	printnumber((mydate.year >> 4));
	printnumber((mydate.year & 0x0F));
}
/* Prints the current date; format is dd/mm/yy */
Prints the current date; format is dd/mm/yy
Prints the current date ; format is dd / mm / yy
void printdate(tempo mydate)
{
	horizontal_mode();
	x_position(21);
	y_bank(0);
	PORT_LCD |= (1<<DC);
	printnumber((mydate.date >> 4));
	printnumber((mydate.date & 0x0F));
	printseparator();
	printnumber((mydate.month >> 4));
	printnumber((mydate.month & 0x0F));
	printseparator();
	printnumber(2);
	printnumber(0);
	printnumber((mydate.year >> 4));
	printnumber((mydate.year & 0x0F));
}
void printdate ( tempo mydate ) { horizontal_mode ( ) ; x_position ( 21 ) ; y_bank ( 0 ) ; PORT_LCD |= ( 1 << DC ) ; printnumber ( ( mydate . date >> 4 ) ) ; printnumber ( ( mydate . date & 0x0F ) ) ; printseparator ( ) ; printnumber ( ( mydate . month >> 4 ) ) ; printnumber ( ( mydate . month & 0x0F ) ) ; printseparator ( ) ; printnumber ( 2 ) ; printnumber ( 0 ) ; printnumber ( ( mydate . year >> 4 ) ) ; printnumber ( ( mydate . year & 0x0F ) ) ; }
Prints the current date; format is dd/mm/yy
Prints the current date ; format is dd / mm / yy
/* To print date at bottom left
	x_position(40);
	y_bank(5);
	*/ /* Print at top center*/ /* (DS1307) YEAR ranges only from last 2 digits, 0 - 99. Year 2K has to be hardcoded */