Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Digital calendar using ds1307 0r ds12887

Status
Not open for further replies.

rashidali

Newbie level 1
Joined
Oct 8, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
1,290
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
 

vipul

Junior Member level 2
Joined
Jul 4, 2008
Messages
24
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,283
Location
Ahemdabad,India
Activity points
1,448
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...
 

sharang

Junior Member level 1
Joined
Jun 2, 2009
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,405
#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
 

Noman Yousaf

Full Member level 4
Joined
Nov 19, 2003
Messages
210
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Lahore Pakistan
Activity points
1,774
hi rashid
i think u r muslim
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
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top