how to make digital clock and date using 89s51/52??

Status
Not open for further replies.

casamiro

Member level 1
Joined
Jan 3, 2010
Messages
34
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Pakistan
Activity points
1,465
plz help mr i m newbie i have project related to make digital clock and clander using 89c/89s/51/52 controller kindly help me regarding schematic and code:sad:
 

**broken link removed**
 
Reactions: jito79

    jito79

    Points: 2
    Helpful Answer Positive Rating
milaph.blogspot.com/2011/06/digital-clock-with-alarm-using-ds1307.html
 

but sir i have to use 7-segment for display and what is refresh rate and code u give me the programming in Assembly language??
 
Seven segment display has been under discussion on this forum please search, you will find useful information.
 

but sir i have to use 7-segment for display and what is refresh rate and code u give me the programming in Assembly language??

Try This is Clock 7segment 6 digitAccurate ...using 8951,DS1307 and max7219
good luck
 

Attachments

  • schema & code.rar
    8.3 KB · Views: 134
  • Video_simulasi.rar
    8.4 MB · Views: 187

in order to make nonvolatile clock+clander i have to use eeprom??or rct is enough for making it??to save date and time after disconnect with main power supply??
 

in order to make nonvolatile clock+clander i have to use eeprom??or rct is enough for making it??to save date and time after disconnect with main power supply??

my sample projects, already equipped with a DS 1307 RTC even though the power supply off the date and time are saved
 
just put a backup battery. I have a weather and datalogging device involving ds1307, three years has been passed and no problem at all.
 

INCLUDE 8051.mc
rs EQU p0.0
rw EQU p0.1
e EQU p0.2
MOV R3,#0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MOV A,#38h ; intializing 5*7 Matrix
call command
MOV A,#0eh ; cursor on
call command
MOV A,#01h ; clear desplay
call command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LCD code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; writing long words
start5:
MOV R7,#12h
start4:

start3:
MOV A,#0c2h
call command
MOV A,R7
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R7
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,#0c4h
call command
MOV A,#":"
call DATA
start2:
MOV R6,#00h
start1:
MOV R3,#0
start:
MOV A,#0c2h
call command
MOV A,R7
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R7
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,#":"
call DATA
MOV A,R6
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R6
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,#":"
call DATA
MOV A,R3
CJNE A,#60h,cont
MOV R3,#0
INC R6
CJNE R6,#5Ah,start1
MOV R6,#00
MOV A,R7
CJNE A,#12h,cont1
MOV R7,#1
MOV A,#0c2h
call command
MOV A,R7
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R7
ANL A,#0fh
ADD A,#30h
call DATA
JMP start4
cont1:
INC R7
JMP start3
START7:
JMP start
cont:
MOV A,#0c8h
call command
MOV A,R3
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R3
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R3
ADD A,#1
DA A
MOV R3,A
call delay
JNB P1.0,min
JMP start
;;;;;;;;;;;;;;;;;;;;;;;;;;
day:
call delay
JNB p1.0,month
call delay
JNB p1.2,dayinc
call delay
JMP day
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
month:
call delay
JNB p1.0,year
call delay
JNB p1.2,monthinc
call delay
JMP month
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
year:
call delay
JNB p1.0,START7
call delay
JNB p1.2,yearinc
call delay
JMP year
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
hour:
call delay
JNB P1.0,day
call delay
call delay
JNB P1.2,hourinc
CALL DELAY
JMP hour
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
min:
call delay
JNB P1.2,mininc
call delay
JNB P1.0,hour
JMP min
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
delay:
MOV R5,#255
aaa:
MOV R4,#255
bbb:
NOP
DJNZ R4,bbb
DJNZ R5,aaa
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dayinc:
MOV p2,#088h
call command
MOV A,R0
ADD A,#1
DA A
MOV R0,A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R0
ANL A,#0fh
ADD A,#30h
call DATA
CJNE R0,#30h,day
MOV R0,#0
JMP day
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
monthinc:
MOV p2,#o85
call command
MOV A,R1
ADD A,#1
DA A
MOV R1,A
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R1
ANL A,#0fh
ADD A,#30h
call DATA
CJNE R1,#12h,month
MOV R1,#0
JMP month
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
yearinc:
MOV A,#082h
call command
MOV A,R2
ADD A,#1
DA A
MOV R2,A
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R2
ANL A,#0fh
ADD A,#30h
call DATA
JMP year
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mininc:
MOV A,#0c5h
call command
MOV A,R6
ADD A ,#1
DA A
MOV R6,A
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R6
ANL A,#0fh
ADD A,#30h
call DATA
CJNE R6,#59h,min
MOV R6,#0
JMP min
;;;;;;;;;;;;;;;;;;;;;;;
hourinc:
MOV A,#0c2h
call command
CJNE R7,#12h,continue
MOV R7,#0
continue:
MOV A,R7
ADD A,#1
DA A
MOV R7,A
CJNE R7,#14h,cont7
MOV R7,#1
cont7:
MOV A,R7
SWAP A
ANL A,#0fh
ADD A,#30h
call DATA
MOV A,R7
ANL A,#0fh
ADD A,#30h
call DATA

JMP hour
;;;;;;;;;;;;;;;;;;;;
command:
MOV p2,A
CLR rs
CLR rw
SETB e
call delay
CLR e
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;
data:
MOV p2,A
SETB rs
CLR rw
SETB e
call delay
CLR e
RET
 

@ eng.zooma
according to my little knowledge the output of this clock displayed on LCD?
 

guys, do you ever use the RTC parallel ds12c887? how to program?
I need answers, help me
 

thank, I've replaced the 12C887 with DS1307, and I successfully created a digital clock and alarm.
thanks all.
 

how can i make this with 7 segment & ds12c887

- - - Updated - - -

How can i do this by 7 segment display
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…