code urgently needed for 8051 stopwatch using seven segment...

gaurav here...
assembly code urgently needed for 8051 stopwatch using seven segment.
plz send as soon as possible if u hav any related articles also will do. mail me at [email protected]

Comments

  • [b][red]This message was edited by gemini85 at 2006-10-14 23:50:11[/red][/b][hr]
    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