* 1. Project function introduction
Based on the clock of Renesas chip, it is a replica of the official open source project. It is displayed through four digital tubes and has the functions of displaying time, temperature and humidity, etc. Four buttons adjust the time, and one touch button adjusts the display temperature and humidity. Press P1 for 10 seconds to control the adjustment time or minutes, and P2 and P3 control addition and subtraction. Lead out the serial port download port and the SWD download port,
*2. Project properties
replicating the open source project of LiChuang
* 3. Open source protocol
Public Domain
*4. Hardware part

This is the first time I solder a chip with many small pins. After the first soldering, I couldn’t connect to the computer when I burned it with J-Link, and then I tried to use the serial port. After connecting the serial power supply, I touched the chip after a while and found that it was very hot, so I quickly turned off the power. At this time, I estimated that the chip might have burned out, and then I soldered the next board and used a multimeter to measure the short circuit. It took several hours to successfully download the program. I was very happy.

1. The power input circuit
directly introduces 5V power supply with the type-c port, and LED1 is red. 2. According to the chip manual,

the SWD download interface
leads to SWCLK and SWDIO ports for easy downloading.

3.
According to the chip manual, the serial port download interface leads to RXD and TXD ports for easy serial port downloading.

4.
The driving capability of the microcontroller pin is limited, and the buzzer has high power. Here, an NPN transistor is added for driving. R9 is a current limiting resistor. When the pin is high, the transistor is turned on and the buzzer sounds. Otherwise, the transistor is disconnected and the buzzer does not sound. R10 is a pull-down resistor. When there is no buzzer, the pin port is guaranteed to be 0 to prevent misoperation caused by uncertain power-on level.

The power pin and data pin can be led out by checking the DHT11 manual.

6. The common cathode digital tube
uses the same digital tube pin as in the video tutorial. Here, the pin selection chip only needs to be able to output high and low levels.

The button circuit is relatively simple. A hardware debounce is added to prevent instability. Software debounce should also be added.

8. For the chip,
you need to read the chip manual here and add crystal oscillator capacitors according to the above introduction to enable the chip to run. This Renesas chip has a built-in touch function. Reading the manual, you can find out the ports of the touch pins and the necessary capacitors.

Add hardware debounce and connect the chip reset pin.

10. The BOOT button
is needed in serial port download. In serial port download, you need to press the BOOT button and the reset button at the same time to download successfully. If it is inconvenient here, you can change it to a jumper cap or directly solder two wires to connect them.

11. Touch pin
Renesas official website has a detailed design guide for touch buttons, which has mileage, circuit diagrams, etc., which is very convenient.

Use P-channel field effect transistors to divide the power supply of type-c and the power supply of the battery, and use a battery charging chip to complete the battery charging function.
The hardware is basically like this. It is mainly to read the introduction in the chip manual, and then to solder the chip, add a little solder paste and then add flux and drag repeatedly, patiently.
*5. For the software part,
the training camp provides a video technical consultant of Renesas staff Xiao Gong. The video is very complete. I succeeded after following it. It should be noted that e2 can be used, and keil can also be used. The software part can be completed by watching the training camp video.
*6. BOM list

* 7. Video demonstration