51 single chip microcomputer. LED flickering issues.

Updated on technology 2024-04-05
9 answers
  1. Anonymous users2024-02-07

    This is normal, because the light on and off is driven by the low level of the single-chip microcomputer (as you can see from your program), and the high-low level load capacity given by the single-chip microcomputer is not very strong, that is to say, although it reaches the voltage, but the current is relatively small, and we write the same situation when we write programs. No problem, don't worry.

  2. Anonymous users2024-02-06

    The main function has been changed a bit, as follows:

    main()

    init();

    while(1) {

    if(a == 100) a = 0;

    if(a <= 50) p0 = 0x00;

    else p0 = 0xff;

  3. Anonymous users2024-02-05

    Rookie brother. I'm speechless! I'll write you one, on your basis, so that can achieve the flickering.

    #include

    #define uchar unsigned char#define uint unsigned intvoid init();

    uchar a=0;

    main()

    init();

    while(1)

    p0=0xff;

    if(a==50) //!!!50*50=2500ms.

    p0=0x00;P0 controls the LED, active at low level.

    init();Remove init() because it's already initialized, and that's more!

    p0=0xff;P0 goes from low to high and is just a command time. Equivalent to a dynamic display, of course faint!

    if(a==100)

    a=0;p0=~p0;}

    void init()

    tmod=0x01;

    th0=(65536-50000)/256;

    tl0=(65536-50000)%256;

    ea=1;tr0=1;

    et0=1;

    void timer0() interrupt 1th0=(65536-50000)/256;

    tl0=(65536-50000)%256;

    a++;

  4. Anonymous users2024-02-04

    Your problem should be that ls138 is not properly enabled;

    The logic enable requirements of E1 and E2 require that the levels are opposite and cannot be connected together.

    The changes are as follows: enled connects to E1, addr3 connects to E2 and E3 (that is, E2 and E3 are connected together);

  5. Anonymous users2024-02-03

    If the single-chip microcomputer has a program, it will definitely flash, and there is a chip in front of the lamp, if the input of the chip is uncertain, and the level of the input port has not been processed, if there is no up and down, the hand will also flash.

  6. Anonymous users2024-02-02

    1. There is no program or messy data in the single-chip microcomputer, and it may flicker, which is caused by the automatic reset of the single-chip microcomputer.

    2. The single-chip microcomputer has a program to control the LED flashing.

    3. a development board.

    There are problems, such as unstable power supply, other hardware problems, etc., flickering can also occur.

  7. Anonymous users2024-02-01

    There is a program in the microcontroller, and the program control light is flashing.

  8. Anonymous users2024-01-31

    Dynamic display, showing the call of the program, can not be conditional.

    It has to be called non-stop.

    Your display program, yesWhat conditions were metand only call once?

    That's a delay.

    When you display it, you first display the minutes, only a few milliseconds, and then the seconds.

    seconds, a few milliseconds are displayed, after which there is no blanking until the next call to the display program.

    So, seconds, the display is stable, minutes, a flash is gone.

  9. Anonymous users2024-01-30

    51. If the single-chip digital tube display keeps flashing, it may also be faulty, and you take it to the maintenance place to overhaul.

Related questions
16 answers2024-04-05

Scheduled interrupts, external interrupts?

5 answers2024-04-05

8086 belongs to the micro process unit (MPU) and is a microprocessor. >>>More

9 answers2024-04-05

16 and 7 are the number of bytes between the PC and the data ** at the time of the lookup command. >>>More

6 answers2024-04-05

In this case, it depends on sp, ret is equal to (sp) pch, sp-1 sp (sp) pcl, sp-1 sp >>>More

9 answers2024-04-05

The method of using two timers is to use the timer t0 to control the frequency and the timer t1 to control the duty cycle. The general programming idea is as follows: the t0 timer interrupt makes an i0 port output high, and starts the timer t1 in the interrupt of the timer t0, and this t1 makes the io port output low, so that changing the initial value of timer t0 can change the frequency, and changing the initial value of timer t1 can change the duty cycle. >>>More