【SCM learning】Lesson 4: Know your development board (STC51)

[Ms. Zhu Course Summary] Invasion

This section of the course mainly includes: what are our development boards, precautions and preparations before power-on, how to download the program and run, run the official sample program.

In this lesson, we will be familiar with our development board, and how to implement it will be explained gradually in the next few lessons.

The first part, chapter list

1.4.1. Complete introduction of the development board

1.4.2. Introduction of development board main board and original onboard

1.4.3. Preparation before power-on

1.4.4. Learn to download and run programs to the microcontroller

1.4.5. Download and test the official sample program 1

1.4.6. Download and test the official sample program 2

1.4.7. Download and test the official sample program 3

1.4.8. Download and test the official sample program 4


    
Part Two, Classroom Records


1.4.1. Complete introduction of the development board


1.4.1.1, version
(1) Our course is based on Puzhong Technology STC89C51 development board kit V3.0 (high configuration), compatible with V2.2 (for details, please go to the first lesson to see)
(2) The code is V3. If you find any problems with V2.2, you can contact me.
(3) The price of a single development board is 168 yuan (V3.0 high configuration). If you need it, you can go to Taobao to buy it. There is no advertisement here.

Moreover, Puzhong Technology also has a development board supporting course at station B, which is the same as the development board used in this course.

Link: https://www.bilibili.com/video/av32132894/ The   response is not good.

1.4.1.2. Accessories
(1) A total of 12 pieces together with the development board main board are: 1 main board, 1 roll of DuPont cable , 1 package of crystal oscillator and jumper cap, 1 USB cable (Android mobile phone cable), and 1 stepper motor. One, 1 DC motor, 1 infrared remote control, 1 1602 screen, 1 12864 screen, 1 2.2/2.4 inch TFT touch screen, 1 STM32 core board, DS18B20 temperature sensor. The bold ones are for temporary use, and the rest can be omitted temporarily.

Unpacking video: Bilibili (not yet shot)

The overall picture of the development board:

Other Accessories:


(2) Development board supporting information: Baidu network disk    extraction code: 2020 
(3) There are many small parts, do not lose them (you have to buy if you lose them, although it is not expensive, but a waste of time)
(4) Don't random jumper caps Plug and boot on the board to avoid damaging the hardware.
(5) Unused parts are recommended to be stored in the cabinet and brought in the box. It is easy to damage.
(6 ) The STM32 core board will not be useful until the third season.


1.4.2. Introduction of development board main board and original onboard


1.4.2.1. Single-chip microcomputer
(1) First, be careful not to install it backwards (the single-chip microcomputer has a groove facing the rod is right), the worst result is directly burned out.
(2) Second, be careful not to remove and install the 51 chip when the power is on, don't take it down, and don't mess with it. (Although it is hot swappable now)

ps: I used to have a psychological shadow, because of the live plugging and unplugging, finally the switching power supply burned, and all the sockets burned.

The MCU in the real project is soldered on the board.


1.4.2.2. Peripheral circuit necessary for MCU work (necessary for MCU)

(See development board CD-ROM materials\Course supporting ARM3.0 development board CD-ROM materials\EM3_V3.0 development board schematic diagram 1)


(1) Crystal oscillator (crystal oscillator + power-on == keep synchronization, crystal oscillator is connected to the internal crystal oscillator circuit of the chip)
(2) Reset circuit (reset: can also be seen on the board)
(3) Power supply circuit (power module: 5V connection It can work as soon as it enters)
(4) USB automatic download circuit (just a little bit, no problem, no problem)

These circuits will be analyzed when we use them later, and the operation will be discussed first.
1.4.2.3, other peripheral equipment circuits
(1) digital tube (the control method is different into static digital tube (individual control) and dynamic digital tube (matrix control))
(2) dot matrix (16*16 LED)
(3) Independent buttons & matrix buttons
(4) introduced one by one (in class)

Let's talk about simple peripherals first, and then play with high-end peripherals, protocols...

There are no advanced peripherals, such as Bluetooth, Zigbee, and WIFI.


1.4.3. Preparation before power-on

You can use a power bank to power the microcontroller, and the circuit board requires very low current for startup.


1.4.3.1. Check whether the relevant jumper caps are OK
(1) The development board is compatible with 51 and STM32 (and AVR) through the jumper cap design: the jumper cap and DuPont cable should be checked in advance to determine which development board it is.
(2) The default setting is the 51 single-chip microcomputer at the time of delivery (no need to move it first)
(3) The document "How to use the development board.doc" in the root directory of the development board CD-ROM file is checked for 7 items 

1.4.3.2. Install the onboard CH340 chip driver
(1) The onboard CH340 chip is used to complete the USB to serial port to realize the program download and burn function
(2) "How to use the development board.doc" in the root directory of the development board CD-ROM data file CD Documents for driver installation
(3) It’s really not good, you can let the computer automatically search and install the driver or use the software such as Driver Master to install

Note: The USB cable is inserted into the USB hole on the computer forever in the future, do not move it casually.


1.4.4. Learn to download and run programs to the microcontroller


1.4.4.1, use PZ_ISPv1.48 to download
1.4.4.2, use PZ_ISPv1.72 to download
Summary: Puzhong's own download software is easier to use, power on the development board before downloading, and then the power supply of the development board does not need to be moved during the entire download and operation process. The program will run automatically after downloading, and the program can be downloaded again while it is running.

1.4.4.3. Use STC-ISP download program
(1) STC official download software is slightly more troublesome than PZISP download. PZISP is to download the software directly after power-on, while the STCISP software requires that the power is turned off first, then the software clicks the download button, and then the development board is powered on, the program can be downloaded, and it will run directly after downloading.
(2) If you want to download again, you must power off -> download button -> power on to download successfully.


1.4.5. Download and test the official sample program 1 (LED, buttons, buzzer)


(1) LED light
(2) independent button
(3) buzzer

Encountered problems: According to the correct operation of the document, but the download is not possible, the solution is:
1) Step by step back to the previous downloadable situation to see if it can be solved
2) Completely power off the entire development board (unplug the power supply USB cable) Power on again after 3 seconds


1.4.6. Download and test the official sample program 2 (digital tube, LED dot matrix, motor, clock)


(1) Static digital tube
(2) Dynamic digital tube
(3) LED dot matrix
(4) Stepping motor
(5) Real-time clock


1.4.7. Download and test the official sample program 3 (temperature sensor, remote control, AD)


(1) 18B20 temperature sensor
(2) infrared remote control
(3) AD

1.4.8. Download and test the official sample program 4 (color screen)


(1) Touch color screen


 

Guess you like

Origin blog.csdn.net/qq_27148893/article/details/109220807