+ Post New Thread
Results 1 to 10 of 10
  1. #1
    Junior Member level 3
    Points: 1,315, Level: 8

    Join Date
    Nov 2006
    Posts
    31
    Helped
    0 / 0
    Points
    1,315
    Level
    8

    ht1380 example

    Dear All,
    Help rquired to interface the RTC HT1380 with Micro 89C51 in assembly coding only as i dont know C.

    Kindly help.

    Regards
    Mak

    Added after 4 hours 57 minutes:

    Any body help!!!!!!!

    Added after 39 seconds:

    Any body help!!!!!!!

    Added after 1 minutes:

    Any body help!!!!!!!

    •   Alt30th November 2006, 11:59

      advertising

        
       

  2. #2
    Full Member level 2
    Points: 1,843, Level: 9
    Achievements:
    7 years registered
    sci-3d's Avatar
    Join Date
    Aug 2006
    Location
    USA
    Posts
    125
    Helped
    8 / 8
    Points
    1,843
    Level
    9

    ht1380

    Here is example RTC interface 80c51 family. If your HT1380 is serial i2c RTC, this code is can be applied:

    http://mcu-programming.blogspot.com/...terfacing.html



  3. #3
    Advanced Member level 3
    Points: 10,724, Level: 24
    budhy's Avatar
    Join Date
    Oct 2006
    Location
    Indonesia
    Posts
    828
    Helped
    221 / 221
    Points
    10,724
    Level
    24

    interfacing rtc with controllers

    You can find C code HT1380 drive here:
    http://www.daxia.com/list_1243.shtml
    http://www.51eda.com/Article/embed_s...00309/132.html

    I translate that code to 8051 assembly format here :
    Code:
    SCLK     EQU    P1.0
    IO       EQU    P1.1
    REST     EQU    P1.2
    
    ht1380_out:
             MOV    R7,#8
    ShiftOut:       
             RRC    A
             MOV    IO,C
             SETB   SCLK
             CLR    SCLK
             DJNZ   R7,ShiftOut
             RET
    
    ht1380_in:
             SETB   IO
             MOV    R7,#8
    ShiftIn:           
             MOV    C,IO
             RRC    A
             SETB   SCLK
             CLR    SCLK
             DJNZ   R7,ShiftIn
             RET
    
    read_ht1380:
             CLR    SCLK
             CLR    REST
             SETB   REST
             ACALL  ht1380_out
             ACALL  ht1380_in
             CLR    REST
             SETB   SCLK
             RET
    
    write_ht1380:
             CLR    SCLK
             CLR    REST
             SETB   REST
             ACALL  ht1380_out
             MOV    A,B
             ACALL  ht1380_out
             CLR    REST
             SETB   SCLK
             RET
             
    ; ***********************************
    ;             Sample code
    ; ***********************************
    
    ; ***** unprotect
             MOV      A,#$8E
             MOV      B,#0
             ACALL    write_ht1380
             
    ; ***** start         
             MOV      A,#$80
             MOV      B,#0
             ACALL    write_ht1380
             
    ; ***** Protect         
             MOV      A,#$8E
             MOV      B,#$80
             ACALL    write_ht1380
             
             ...
             ...
             ...
    Good luck



    •   Alt1st December 2006, 05:24

      advertising

        
       

  4. #4
    Junior Member level 3
    Points: 1,315, Level: 8

    Join Date
    Nov 2006
    Posts
    31
    Helped
    0 / 0
    Points
    1,315
    Level
    8

    real-time clock rtc ht1380

    Thanks every body to help me and specially thanks to Mr. Budhy to give me the code in assembly language. I move further as per your guidence.

    Thanks
    Mak



    •   Alt1st December 2006, 08:42

      advertising

        
       

  5. #5
    Advanced Member level 3
    Points: 8,325, Level: 21

    Join Date
    Nov 2006
    Posts
    982
    Helped
    68 / 68
    Points
    8,325
    Level
    21

    interfacing ht1380 with 8051

    Can any one from you provide the datasheet of HT1380 .
    MY email id is
    tm1234@rediffmail.com



  6. #6
    Advanced Member level 3
    Points: 10,724, Level: 24
    budhy's Avatar
    Join Date
    Oct 2006
    Location
    Indonesia
    Posts
    828
    Helped
    221 / 221
    Points
    10,724
    Level
    24

    real time clock ht1380

    The datasheet you want



    •   Alt2nd December 2006, 01:09

      advertising

        
       

  7. #7
    Junior Member level 3
    Points: 1,315, Level: 8

    Join Date
    Nov 2006
    Posts
    31
    Helped
    0 / 0
    Points
    1,315
    Level
    8

    rtc ht1380

    Thanks Mr. Buddhy,
    My problem to read the RTC HT1380 solved by using your assembly codes.

    Really heartly thanks to you.

    Regards
    Mak



  8. #8
    Advanced Member level 3
    Points: 8,325, Level: 21

    Join Date
    Nov 2006
    Posts
    982
    Helped
    68 / 68
    Points
    8,325
    Level
    21

    how to interface 89c2051

    Code:
    Thanks Mr. Buddhy, 
    My problem to read the RTC HT1380 solved by using your assembly codes. 
    Really heartly thanks to you. .
    I ALSO THANKS Mr BUDDHY.
    NOW I GOT SOME IDEA AND CODE FOR ME WHICH IS FORCE ME DO SOMETHINK
    BASED ON HT1380 WHICH IS AVAILABE WITH FROM A 2 YEARS.
    THANKS FOR DATASHEET ALSO
    I ALSO THANK TO mak_goel WHO RECHARG ME ABOUT HT1380.



  9. #9
    Member level 1
    Points: 1,711, Level: 9

    Join Date
    Nov 2006
    Posts
    40
    Helped
    1 / 1
    Points
    1,711
    Level
    9

    rtc ht 1380

    hi all,

    but wat is RTC?!



  10. #10
    Advanced Member level 3
    Points: 8,325, Level: 21

    Join Date
    Nov 2006
    Posts
    982
    Helped
    68 / 68
    Points
    8,325
    Level
    21

    ht1380 c code

    real time clock



--[[ ]]--