| Author |
Message |
rashidali
Joined: 08 Oct 2009 Posts: 1 Location: Pakistan
|
08 Oct 2009 6:17 Digital calendar using ds1307 0r ds12887 |
|
|
|
|
Hi:
I am using ds1307 and ds12887 as digital calendar. I have developed code for displaying the today's day, date month and year. The problem is that I want to make a calender which is displayed on lcd and then I can select any day from it, just like in nokia 1208 mobile, which displays calendar and i can select any date or even change year by scrolling down.
I shall be very thankful to you for your support.
Thanks
|
|
| Back to top |
|
 |
vipul
Joined: 04 Jul 2008 Posts: 24 Helped: 1 Location: Ahemdabad,India
|
08 Oct 2009 9:17 Digital calendar using ds1307 0r ds12887 |
|
|
|
|
Hi rashidali..
U have developed code for calender using RTC... so now u have to just take data from user using keys...and as per the data entered by user u have to set parameter in RTC...
read RTC continuously and print on LCD...
|
|
| Back to top |
|
 |
Google AdSense

|
08 Oct 2009 9:17 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
sharang
Joined: 02 Jun 2009 Posts: 18
|
07 Nov 2009 7:27 Digital calendar using ds1307 0r ds12887 |
|
|
|
|
#include<reg51.h>
#include<absacc.h>
sbit RS=P1^2;
sbit RW=P1^3;
sbit E=P1^4;
void put(unsigned char ch,bit rs);
void delay(unsigned int t);
void init(void);
void main()
{
int i=0x00;
delay(500);
//P0=0xFF; //Input Port
init();
put('R',1);
put('T',1);
put('C',1);
put(0xC0,0);
delay(2);
XBYTE[10]=0x20;
XBYTE[11]=0x83;
XBYTE[11]=0x03;
XBYTE[0]=41;
//XBYTE[11]=0x03;
while(1)
{
put(0xC0,0);
for(i=0x00;i<0x0A;i++)
{
// XBYTE[0]++;
put((XBYTE[0]<<0x0F)+0x30,1);
delay(500);
put(0x94,0);
put((XBYTE[10]<<0x0F)+0x30,1);
}
/*if(XBYTE[0]>=0x39)
XBYTE[0]=0x30;
*/
}
}
void init(void)
{
put(0x3C,0); //Set interface length
put(0x01,0); //Clear the display
put(0x06,0); //Set cursor move direction
put(0x0E,0); //Enable display cursor
return;
}
void put(unsigned char ch,bit rs)
{
E=1;
RW=0;
P2=ch;
RS=rs;
delay(1);
E=0;
delay(1);
RW=1;
return;
}
void delay(unsigned int t)
{ unsigned int k,l;
for(l=0;l<t;l++)
for(k=0;k<900;k++);
return;
}
PLEASE HELP
|
|
| Back to top |
|
 |
Noman Yousaf
Joined: 19 Nov 2003 Posts: 110 Helped: 1
|
09 Nov 2009 15:26 Digital calendar using ds1307 0r ds12887 |
|
|
|
|
hi rashid
i think u r ------
any how your problem is not as easy dear.
rtc runs the time and calender but searching is not possible.
you want to search the date and month day wise?
simply u have to use memory for this. first save all the dates and months in mem then use it for searching
you use 3 bytes for date as, 1 byte for date (1-31), 1 byte for month (1-12) then 1 bhye for year (00-99).
now memory size could be, 3(bytes per day) x 365 (days per year) = 1095 bytes for 1 year i think u got it. if not then tell me i will tell you more.
bye
|
|
| Back to top |
|
 |