PLZ help for this assembly code...

gaurav here...
assembly code urgently needed for 8051 stopwatch using seven segment.
i am not able to completly apply my logic.
i hav to use 2 seven-segment.
plz send as soon as possible if u hav any related articles also will do. mail me at [email protected]

|||||GAURAV SAXENA |||||

Comments

  • heres the code where one 7segment is connected to port1 and other to port2.i hav used polling on pin 13(p3.3),to pause the display at a particular instant.I have used the concept of look-up table to store hex values of numbers to display.if U wanr circuit dig. then mail me at [email protected]


    org 0000h

    start: mov dptr,#300h
    mov r3,#0
    mov r2,#0
    mov a,#40h
    mov r5,#9
    mov p1,a
    mov p2,a
    setb p3.3
    acall timer

    port1: mov a,r2
    mov r4,a
    movc a,@a+dptr
    jnb p3.3,paused
    mov p1,a
    acall timer
    inc r2
    cjne a,#01h,port1

    port2: mov a,r3
    mov r5,a
    movc a,@a+dptr
    mov p2,a
    mov p1,#40h
    acall timer
    inc r3
    mov r2,#0
    cjne a,#01h,port1

    last: mov a,r2
    mov r4,a
    movc a,@a+dptr
    jnb p3.3,paused
    mov p1,a
    acall timer
    inc r2
    cjne a,#01h,last
    nop

    timer: mov tmod,#12h
    mov r0,#20
    setb tcon.4
    up: mov th1,4bh
    mov tl1,#0f0h
    setb tcon.6
    here: jnb tcon.7,here
    clr tcon.6
    clr tcon.7
    djnz r0,up
    clr tcon.4
    ret

    paused: mov a,r4
    movc a,@a+dptr
    mov p1,a
    mov a,r5
    movc a,@a+dptr
    mov p2,a
    nop

    org 300h
    table: db 73h,24h,21h,13h,09h,08h,63h,00h,01h,40h
    end


    |||||GAURAV SAXENA |||||

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion