1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

while interfacing rtc with 8051 getting logic contentions in proteus

Discussion in '8051/8951' started by deexith hasan, Oct 23, 2014.

  1. deexith hasan

    deexith hasan New Member

    Joined:
    Sep 4, 2014
    Messages:
    5
    Likes:
    0
    i am getting an error logic contentions while stimulating 8051 with ds12887 rtc........how to solve this


    here is the code
    ORG 0H
    ACALL LCDINT

    MOV R0,#10
    MOV A,#20H
    MOVX @R0,A
    MOV R0,#11
    MOV A,#83H
    MOVX @R0,A
    MOV R0,#11
    MOV A,#03H
    MOVX @R0,A
    RPT:
    MOV R0,#0
    MOV R0,#07H
    MOV A,#0
    NOP
    MOVX A,@R0
    ACALL DISPLAY
    MOV R0,#0
    MOV R0,#08H
    MOV A,#0
    NOP
    MOVX A,@R0
    ACALL DISPLAY
    MOV R0,#0
    MOV R0,#09H
    MOV A,#0
    NOP
    MOVX A,@R0
    ACALL DISPLAY
    ACALL CLEAR
    SJMP RPT

    LCDINT:MOV P1,#38H
    ACALL CMDWR
    MOV P1,#0EH
    ACALL CMDWR
    CLEAR: MOV P1,#01
    ACALL CMDWR
    RET

    CMDWR:
    CLR P3.0
    CLR P3.1
    SETB P3.2
    ACALL DELAY
    CLR P3.2
    RET

    DISPLAY:MOV B,A
    SWAP A
    ANL A,#0FH
    ORL A,#30H
    ACALL DTWR
    MOV A,B
    ANL A,#0FH
    ORL A,#30H
    ACALL DTWR
    RET

    DTWR:
    MOV P1,A
    SETB P3.0
    CLR P3.1
    SETB P3.2
    ACALL DELAY
    CLR P3.2
    RET

    DELAY:MOV TMOD,#00000001B
    MOV TH0,#00H
    MOV TL0,#00H
    SETB TR0
    AGN: JNB TF0,AGN
    CLR TR0
    CLR TF0
    RET

    READY:SETB P1.7
    CLR P3.0
    SETB P3.1
    BACK: CLR P3.2
    ACALL DELAY
    SETB P3.2
    JB P1.7,BACK
    RET
    END
     

    Attached Files:

    • rtc.JPG
      rtc.JPG
      File size:
      136.1 KB
      Views:
      1,034
  2. vinnnie

    vinnnie New Member

    Joined:
    Jun 20, 2009
    Messages:
    1
    Likes:
    1
    we need more details about this, for example, we need to know the error print messages or how you know you have error logic contentions???
     
    • Like Like x 1
  3. deexith hasan

    deexith hasan New Member

    Joined:
    Sep 4, 2014
    Messages:
    5
    Likes:
    0
    i programmed 8051 to display hours ,min,sec but i am getting seconds alone displayed on lcd with an error logic contentions
     

    Attached Files:

    • rtc.JPG
      rtc.JPG
      File size:
      170.7 KB
      Views:
      869
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,169
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE

    DO NOT DOUBLE POST!!

    I had seen your query and was responding as I'm sure several other members were... Having several identical posts is very confusing.....

    I have simulated this on ISIS and it seems like an internal read error... Writing to the RTC chip is fine.. Reading the first byte is fine.... The problem is reading the second, third etc... I have tried to instigate a delay between reads but the 8051 doesn't have the correct timing on the RD pin... I know this is the issue because bumping it into Motorola mode there are less errors. I suspect either ISIS has an issue with the simulator or the chip isn't compatible with the micro controller... I will try again tonight and see if I can get an answer..
     
    • Like Like x 1
    • Agree Agree x 1
  6. deexith hasan

    deexith hasan New Member

    Joined:
    Sep 4, 2014
    Messages:
    5
    Likes:
    0
    sorry for double posting...thanq u for u r response.......i want to do a digital clock using 8051 and 7 seg display........i simulated in proteus on lcd getting the same error
     
  7. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,169
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    I know!! I have even tried to interface manually but it doesn't sim. Sorry but you may have to post it on the labcenter forum..
     
    • Like Like x 1
  8. xainnasir

    xainnasir New Member

    Joined:
    Jan 7, 2012
    Messages:
    19
    Likes:
    0
    Location:
    Lahore Pakistan
    Commercial link deleted - moderator
     
    Last edited by a moderator: Feb 1, 2016
  9. vanan

    vanan New Member

    Joined:
    Jun 14, 2016
    Messages:
    8
    Likes:
    0
    Location:
    Chennai
    Hi,
    SJMP RPT the SJMP will only for -128 to +128 is the code is with in this
     

Share This Page