Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/01/04 11:20
Read: times


 
#67757 - RE: testing dallas rtc & 8052
Responding to: ???'s previous message
First, i think, that's easy and correct for you to tie RD and WR of the RTC to RD and WR pins on Port3 of 8052. Second, write two routines for reading and writing the RTC:

read_rtc:
clr CS_RTC ;select RTC, infact you always do
movx a,@r0 ;mov in Acc data from the RTC
setb CS_RTC
ret

write_rtc:
movx @r0,A
ret

,where when you read something from the RTC, you will first put the adress you needto read (e.g 02h for minutes, 04h for hours, etc) in r0, then you call read_rtc.

When you want to write something to address og RTC's RAM you put data in the Acc, put the address you want to write to in r0, and call write_rtc.

then when you have saved somewhere in your MCU minutes, hours, years, etc., display it on the LCD (which is HD44780) and easy to deal it.


List of 27 messages in thread
TopicAuthorDate
testing dallas rtc & 8052            01/01/70 00:00      
   RE: testing dallas rtc & 8052            01/01/70 00:00      
   RE: testing dallas rtc & 8052            01/01/70 00:00      
      RE: testing dallas rtc & 8052            01/01/70 00:00      
         RE: testing dallas rtc & 8052            01/01/70 00:00      
            RE: testing dallas rtc & 8052            01/01/70 00:00      
               RE: testing dallas rtc & 8052            01/01/70 00:00      
                  RE: testing dallas rtc & 8052            01/01/70 00:00      
                     RE: testing dallas rtc & 8052            01/01/70 00:00      
                        RE: testing dallas rtc & 8052            01/01/70 00:00      
                     RE: testing dallas rtc & 8052            01/01/70 00:00      
   RE: testing dallas rtc & 8052            01/01/70 00:00      
      RE: testing dallas rtc & 8052            01/01/70 00:00      
         RE: testing dallas rtc & 8052            01/01/70 00:00      
         RE: testing dallas rtc & 8052            01/01/70 00:00      
            RE: testing dallas rtc & 8052            01/01/70 00:00      
               RE: testing dallas rtc & 8052            01/01/70 00:00      
                  RE: testing dallas rtc & 8052            01/01/70 00:00      
                  RE: testing dallas rtc & 8052            01/01/70 00:00      
                     RE: testing dallas rtc & 8052            01/01/70 00:00      
                     RE: testing dallas rtc & 8052            01/01/70 00:00      
                        RE: testing dallas rtc & 8052            01/01/70 00:00      
                           RE: testing dallas rtc & 8052            01/01/70 00:00      
                           RE: testing dallas rtc & 8052            01/01/70 00:00      
                           RE: testing dallas rtc & 8052            01/01/70 00:00      
                              RE: testing dallas rtc & 8052            01/01/70 00:00      
   RE: testing dallas rtc & 8052            01/01/70 00:00      

Back to Subject List