Today's electronic equipment is almost inseparable from microcontrollers. There are microcontrollers that have been studied for so long in college. So how to use a microcontroller to design a product? Let’s discuss it with you today.
1
Develop requirements
First of all, you need to know what kind of product you want to make, what functions does this product contain, and what signals do you want to collect? What devices do you want to control? What communication protocols should be used? What interface does the communication protocol use? Do you want to display the interface? Do you want audible and visual prompts? Do you want low power consumption? Once you understand these requirements, you can make your selection.
For example, if I want to make a microcontroller password lock, the requirements are:
1. There is a 4-digit digital tube display;
2. Control a relay;
3. Control a buzzer;
4. Control five LED lights;
5. Two button input;
2
Chip selection
Determine the selected chip model based on your needs. For example, in the first part of the functional requirements, these five requirements only require the use of the IO port of the microcontroller and do not use on-chip resources, so as long as the IO port is sufficient, it is enough.
1. 4-digit digital tube: In order to facilitate everyone's learning, 74HC595 is used to drive it (click here to drive the 74HC595 digital tube). The chip only needs 3 IO ports to connect to the microcontroller;
2. Control a relay; this place mainly considers the coil voltage. The microcontroller is powered by 5V, so a 5V relay is selected (click here for the method of controlling a relay using a microcontroller), which occupies 1 IO port;
3. Control the buzzer: Use an active buzzer, that is, the electric buzzer will sound as long as it is supplied (click here to drive the buzzer using a microcontroller), occupying 1 IO port;
4. Control 5 LED lights: use current sinking method (click here for what is the current sinking method), occupying 5 IO ports;
5. Two button input: using pull-up resistors (what are pull-up and pull-down resistors click here), pressing low level to achieve, occupying 2 IO ports;
A total of 3+1+1+5+2=12 IO ports are used; for the convenience of beginners, let’s choose STC’s 51 microcontroller to complete this design. The selected model is STC89C51, and the packaging form is DIP40. I believe you all When I was learning microcontrollers in college, the teachers probably used this one to teach them.
3
Hardware principle design
After the chip selection is completed and you have a design idea, let’s quickly draw the circuit diagram. What software do you use to draw circuit diagrams? There are many such EDA tools, such as Protel99se, DXP, Altium Designer, etc. These are all software produced by one company, as well as Cadence, PowerPcb, etc. I use AD09. What is the content of schematic design? The content of the design includes the minimum system of the microcontroller and its expanded functions.
If you are interested, I will show you the process of drawing the schematic diagram tomorrow and the day after tomorrow.
4
Hardware PCB design
When the schematic drawing is completed and there are no errors, start drawing the PCB.
5
Sample welding
What is pattern welding? It is to solder electronic components to the pcb board. If the package is simple and the number of samples is small, then you can do the soldering by yourself. By the way, you can also exercise your soldering skills. For a person who is engaged in electricity, he usually comes from soldering circuit boards. If you do electricity but don't know how to weld, others will laugh at you.
6
Debugger
How to write a program? What tool do you use to write? Different microcontrollers have different programming environments. For example, PIC microcontrollers use the MPLAB programming environment, MSP430 microcontrollers use the IAR Embedded Workbench programming environment, and DSPs use the CCS programming environment. The programming environment highlighted here is Keil. Keil is the most useful of all programming environments currently and also supports the most chips. It can be said that Keil is the most mainstream programming environment at present. I use Keil's programming environment, Keil's C51 version and MDK version are both in use.
7
Program burning
Program burning means downloading the written program to the microcontroller, so that the microcontroller can execute naming and implement functions according to the program written by the user. How can the program be programmed into the microcontroller? Each microcontroller has its own program burning interface
.
★
After completing the above 7 steps, the electrical part of this product is completed, but this is not the end. Why? Because a product runs through many design links, such as structural design, electrical design, prototype testing, etc. Therefore, in the process of electrical development, you need to cooperate and discuss more with the people who make the structure, and you also need to discuss more with the product manager, and repeatedly modify the requirements, so that you can create a beautiful, practical, and popular product.
Previous article:The bottom-level essence of the microcontroller serial port
Next article:Selection of microcontroller, a few steps that have to be mentioned
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- MBUS front-end protection
- KiCad Simplified Chinese Manual
- Automotive electronics technology - hardware, software, system integration and project management
- When the pull-up and pull-down resistors are not turned on, it is in floating mode. What is the principle that may cause high power consumption?
- Vicor Power Solutions to Maximize Performance for AI, HPC and Data Computing
- Battery Management Chip BQ28Z610 Problem Collection
- From simulation to realization
- 【DFRobot motor driver】+ unboxing and testing
- EEWORLD University ---- Analog Electronic Circuits
- 【GD32450I-EVAL】+ 07 Camera full screen display test