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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/29/08 01:59
Read: times


 
#154130 - rtc 307
Responding to: ???'s previous message
hi,
thanks for advice.
yh it is working in 24 hr mode.
i have set the osc bit 7 of 00h reg in the start of the progm, the thing i could not understand is, will the 6 th bit of 02h reg for 12 hr mode has to be set before the Osc bit of after this.As for the given program 12 hr mode is not working.
thanks
deep

code:

mov a,#1307wr ;(11010000)write bit
send_byte
ack byte

mov a,#00h ;starting reg
send_byte
ack byte

clr acc.7 ; 0- start Osc
send_byte
ack byte

mov a,#02h ; hour reg
send_byte
ack byte

setb acc.6 ; 12/24 hr bit
send_byte ; set to 12 hr mode
ack byte

set clock
read clock ; reading the clock regs
show clock


List of 8 messages in thread
TopicAuthorDate
RTC 1307            01/01/70 00:00      
   Changing the bit....            01/01/70 00:00      
      rtc 307            01/01/70 00:00      
         What does the data sheet say....            01/01/70 00:00      
         How to post source code            01/01/70 00:00      
            1307            01/01/70 00:00      
            THANKS            01/01/70 00:00      
      THANKS            01/01/70 00:00      

Back to Subject List