AT89S52 Basketball Timer Write for help

Updated on anime 2024-03-16
7 answers
  1. Anonymous users2024-02-06

    130 points, haha, give it to me, thank you!

  2. Anonymous users2024-02-05

    org 0000h

    jmp begin

    org 000bh

    ljmp t0isr

    org 0030h

    table: ;The common cathode digital tube shows **Table DB 3FH, 06H, 5BH, 4FH, 66H; 01234db 6dh,7dh,07h,7fh,6fh ;56789;--

    begin:

    mov tmod,#01h

    mov th0,#high(65536-50000)mov tl0,#low(65536-50000)setb tr0

    setb et0

    setb ea

    mov r2,#

    sjmp $

    t0isr:

    clr tr0

    mov th0,#high(65536-50000)mov tl0,#low(65536-50000)setb tr0

    mov dptr,#table

    mov a,r2

    movc a,@a+dptr

    mov p1,a

    inc r2

    cjne r2,#10,t0e

    mov r2,#

    t0e:retiend

  3. Anonymous users2024-02-04

    Hello! Is it C or a library? A schematic is required to know the line connection.

  4. Anonymous users2024-02-03

    Timer 0 16-bit count mode.

    #include

    void inittimer0(void)void main(void)

    void timer0interrupt(void) interrupt 1

    Timer 2 16-bit auto-reload mode.

    #include

    void inittimer2(void)void main(void)

    void timer2interrupt(void) interrupt 5

  5. Anonymous users2024-02-02

    tmod is a timer register, which is gate c t m1 m0 gate c t m1 m0 the upper four bits are the timer t1 control word, and the lower four bits are the timer t0 control word. Gate is the gating bit, and if it is 0, tr0 tr1=1 starts the timer. If the timer is 1, the timer can be started only when the external interrupt int0 int1=1 is interrupted.

    c t is the timing counting mode selection bit, the timing mode is 0, and the technical mode is 1. m1 m0 sets the bit for the working mode, and there are four working modes, most of which are using mode 1.

    th0 and tl0 are the upper eight and eight bits of the timer t0, respectively.

  6. Anonymous users2024-02-01

    tmod: timer register.

    th0: Timer 0 register bit.

    tl0: timer 0 register low.

    org 0000h

    sjmp sta

    org 000bh

    ljmp t0isr

    org 0050h

    sta:mov sp,#5fh

    mov tmod,#11h

    mov tl0,#low(65536-50000)mov th0,#high(65536-50000) ;The timer interrupts once every 50 milliseconds.

    mov r2,#60 ;60 * 50 = 3000 milliseconds, which is 3 seconds.

    setb tr0

    setb et0

    clr 00h

    setb ea

    loop:jnb 00h,loop

    clr 00h

    sjmp loop

    t0isr:

    push acc

    clr tr0

    mov tl0,#low(65536-50000)mov th0,#high(65536-50000)setb tr0

    dec r2

    mov a,r2

    jnz t0isre

    setb 00h ;3 seconds to set, set MOV R2,

    t0isre:

    pop acc

    retiend

  7. Anonymous users2024-01-31

    50 milliseconds first, then 1 second, then 1 minute, 1 hour, and finally 7 hours.

Related questions
5 answers2024-03-16

Sometimes the sensitivity is too high, just set it to 100.

19 answers2024-03-16

The Samsung GT-S7562i has a sense of line and texture from the outside light, and other parameters are similar. The system is also Android 4.Target. It depends on what you like.

4 answers2024-03-16

The meaning of 5s is: the abbreviation of the five words of tidying, tidying, sweeping, cleaning and literacy. It refers to the production factors such as personnel, machines, materials, and methods at the production site. >>>More

4 answers2024-03-16

iPhone 6 on the basis of iPhone 5S screen size, LED backlight, body thickness, screen resolution, screen material have been improved, so if iPhone 5S we just bought whether to change to iPhone 6, the following detailed comparative analysis, with a rational purchase. >>>More

14 answers2024-03-16

It doesn't cost fuel at all, and now many people drive BAIC Phantom S5, which is relatively fashionable in appearance, in line with the public's pursuit of aesthetics. In addition, the configuration of the interior of the car is also OK, and I prefer the function of keyless entry, which is a blessing for me, who is always looking for the key all day long.