Why is ds1302 in 51 microcontrollers, when used, why should the read minute and second display data

Updated on technology 2024-04-08
13 answers
  1. Anonymous users2024-02-07

    Because you have an error generated ::Hardware?

    Procedure?

  2. Anonymous users2024-02-06

    What do you use to display it? If it is 1602, it needs to be converted to ASCII code to display.

  3. Anonymous users2024-02-05

    The DS1302 stores data in hexadecimal and should be converted to decimal before you display it.

  4. Anonymous users2024-02-04

    How to solve it, share it.

  5. Anonymous users2024-02-03

    Check the crystal oscillator, I2C driver**, chip manual to see the read and write order, note the decimal and 24 conversions, and the display section. If it's OK and there is still a problem, either the chip is broken, or it is a very elementary problem, find someone who knows how to help you adjust it.

  6. Anonymous users2024-02-02

    Can't take it out of context, you should look at it in its entirety, and read a ** that you have completed yourself:

    for(i=0; i<8; i++)

    coutdata >>1;

    if(sda_1302 ==1)

    coutdata |=0x80;

    clk_1302 = 1;

    nop_()

    clk_1302 = 0;

    nop_()

    The chip began to output a low bit, and after reading 8 positive shots and delays, the right He Qi shifted 8 times, and it had to be the output bytes.

  7. Anonymous users2024-02-01

    Because the data of 1302 is serial.

  8. Anonymous users2024-01-31

    That's determined by the characteristics of the chip, just refer to the data sheet.

  9. Anonymous users2024-01-30

    There are good programs to go to the China Electronics Development Network ( to go and bask in the sun I've been diving there.

    I've been working on this program lately, so I've just taken a look at your program, and you're reading out the data from the ds1302 and sending it straight to the display, like this.

    write_datae(shu[read_ds(0x89)/10]);

    write_datae(shu[read_ds(0x89)%10]);

    I'm used to writing programs like this, and it's good, but it's a little complicated, but it works great.

  10. Anonymous users2024-01-29

    Can I tell you how to do it before, and how to do it now, so that the display speed is nearly ten times faster?

  11. Anonymous users2024-01-28

    When I used to make a temperature acquisition system, the display sometimes messed up, and I haven't found the reason yet, you have changed a lot of programs, but there may be some modules that have not been changed, pay attention to these modules, or just pay attention to the variables, especially the variables that are available in the interrupt and the main program.

  12. Anonymous users2024-01-27

    You first try to see if the display program of the direct digital tube is normal, that is, to directly assign the value to the digital tube to test.

    Then you use the tested digital tube to see what the data reads out, and the data directly read out by DS1302 looks like this. For example, if it reads 22, it should be 16 seconds.

    Why is this so? The conversion of decimal 22 to hexadecimal is 0x16, which is how DS1302 is expressed.

    For example, 0x59 is 59 So after you read out the data, you need to convert the hexadecimal 0x59 to 59 in decimal to display it correctly. As for how to convert, think for yourself.

  13. Anonymous users2024-01-26

    The connection between DS1302 and the single-chip microcomputer must be short, not higher than 5 cm, if you take the Dupont wire, it is very likely that there will be a problem, I have been in this pit before.

Related questions
5 answers2024-04-08

1. Confirm whether the network signal of the mobile phone is good, if the signal is poor, you can change the network environment to try. >>>More

6 answers2024-04-08

U.S. Area 51 is an area of about 155 square kilometers above sea level, 1,350 meters above sea level, it is part of the vast United States Air Force training facility (area of 12,139 square kilometers) and part of the Emitin Valley, Area 51 is bounded by the Groom Mountains to the north, the Papoose Mountains to the south, the Jumbled Hills to the east, and the Groom Dry (coordinates 37 degrees 16 minutes 05 seconds N, longitude 115 degrees 47 minutes 58 seconds W; Nicknamed the lake, it is a dry sandy area about 6 kilometers long and 5 kilometers wide, and a large air base is located in the southwest corner of the lake (coordinates 37 degrees 14 minutes north latitude, 115 degrees 49 minutes west longitude), and it has two concrete air force runways, one of which crosses the sand lake, the other is far from the sand lake, and two unprepared runways are built directly on the sand lake.

30 answers2024-04-08

You can use software like cpuz to identify, see how many memories are recognized by the memory option, if only one memory is recognized, it means that the memory may not be in contact with the slot, and the system does not recognize this memory. >>>More

14 answers2024-04-08

Definitely a matter of reset. After the development board is completely powered off for a period of time, can it work properly when it is powered on? I guess it should work. >>>More

6 answers2024-04-08

Fish, like humans, must breathe oxygen to survive, there is oxygen in the air and water, and the lungs of humans can separate the oxygen in the air but cannot absorb the oxygen in the water, so people can only live on land. >>>More