Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Making clock with DS12c887 RTC

Status
Not open for further replies.

robinruet

Newbie level 4
Joined
Mar 25, 2010
Messages
7
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,325
HI,
I want to make a Digital Clock of 7 segment display with DS12c887 RTC.
Can you please help me with source code or with any other information.
 

As the DS12887 uses multiplexed Address/Data bus the easiest way to control it is with a microcontroller that has such a bus ..
One of good candidates for this job is 8051-based microcontroller such as for example the AT89S52 (AT89S2582) ..
Here is info on how to connect this RTC with 8051-core microcontroller:
**broken link removed**
**broken link removed**

Rgds,
IanP
:D
 
Thank you very much,,,,,,,
Can you please help me by providing the source code of bascom avr or c ?
 

I don't think there is an off-the-shelf code that'll cover your application ..
Start with this simple ASM code which is good for initial test of the 8051-DS12887 circuit ..
**broken link removed**

Rgds,
IanP
:D
 

I want sample copy bascom avr source code of bs12887 or ds1287 or ds12c887 projects(simple rtc clock)....Please help me...
 
$regfile = "m16def.dat"
$crystal = 800000


Declare Sub Get_time
Declare Sub Set_time
Declare Sub Call_time
'Declare Sub Demo

Dim Adress As Byte
Dim Data_in As Byte
Dim A As Byte
Dim H As Byte
Dim M As Byte
Dim S As Byte
Dim S1 As Byte
Dim Dat As Byte

Dat = 1

Config Porta = Output
'Config Porta.0 = Output
'Ddrc = &11111111
Portc = 12
Portd = &B00000000
Ddrd = &B00000000
'S1 = 0
'Do
'S1 = S1 + 1
'Call Demo
'If S1 = 10 Then
'S1 = 0
'End If
'Waitms 1
'Loop
Adress = 4
Do

Call Set_time
Adress = Adress - 2
Loop Until Adress = 0
Do
Call Call_time
Wait 1

Loop



Sub Call_time
Adress = 4
Call Get_time
H = Data_in
Adress = 2
Call Get_time
M = Data_in
Adress = 0
Call Get_time
S = Data_in
'Locate 1 , 1
'Lcd Makedec(h) ; ":" ; Makedec(m) ; ":" ; Makedec(s)

S1 = Makedec(s)
'If S1 > 9 Then
'S1 = S1 - 8
'End If
'If S1 > 20 Then
'S1 = S1 - 18
'End If
'If S1 > 30 Then
'S1 = S1 - 28
'End If
'If S1 > 40 Then
'S1 = S1 - 38
'End If
'If S1 > 50 Then
'S1 = S1 - 48
'End If




Select Case S1
Case 0 : Porta = &B01111110
Case 1 : Porta = &B00110000
Case 2 : Porta = &B01101101
Case 3 : Porta = &B01111001
Case 4 : Porta = &B00110011
Case 5 : Porta = &B01011011
Case 6 : Porta = &B00011111
Case 7 : Porta = &B01110000
Case 8 : Porta = &B01111111
Case 9 : Porta = &B01110011
End Select



End Sub

Sub Set_time
Ddrd = &B11111111
Ddrc = &B11111111
Portc = &B00001101
Waitms 5
Portc = &B00001111
Portd = Adress
Portc = &B00001100
Waitms 5
Portc = &B00001000
Portd = &B00000001
Portc = &B00001000
Waitms 5
Portc = &B00001100
Waitms 5
Portc = &B00001111
End Sub

Sub Get_time
Ddrc = &B11111111
Ddrd = &B11111111
Waitms 5
Portc = &B00001101
Waitms 5
Portc = &B00001111
Waitms 5
Portd = Adress
Waitms 5
Portc = &B00001110
Waitms 5
Portc = &B00001100
Waitms 5
Portc = &B00000100
Portd = &B00000000
Ddrd = &B00000000
Data_in = Pind
Waitms 5
Portc = &B00001100
Waitms 5
Portc = &B00001111
End Sub







I'm
working on it.......Please find me the problem
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top