1 Overview
2. Source program
void TIMx_Config(void) {
//TIM_ITConfig(TIM2, TIM_IT_CC3, ENABLE);
}
Here only the output of timer 2 channel 3 used by the LCD is listed, and the output frequency is 150kHz. No interrupts are used. How is this frequency obtained? First, TIM2 uses APB1's 36M, and after pre-division, the division factor is (Prescaler+1)=3, and after 3 division, it is 12MHz. The counting cycle is 40, and the count to 40 matches the output compare register, triggering the output flip, and then the counter starts counting again. Therefore, the frequency of the output channel is 12MHz divided by 80, which is 150kHz.
2. Serial port configuration
It is not very convenient to input commands by keystrokes. Soon I will have to write a serial communication program to input commands through the serial port and control the development board. It is very convenient to use library functions for serial port configuration.
void UART_Config(void){
}
Previous article:Getting started with STM32
Next article:Analysis and arrangement of Zhilin STM32 program source code 03
- Popular Resources
- Popular amplifiers
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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- I need help from an expert. "When designing a microcontroller hardware circuit using STC89C51, should I design the EEPROM circuit part?"
- Claiming that software is open source when it is not is false advertising
- Zigbee 3.0 universal gateway coordinator based on CC2652R
- Ask a question about the LM35CZ temperature sensor
- MSP430FR2311 LaunchPad Development Kit
- What chips can use pwm to control the brightness of leds
- 【NUCLEO-L552ZE Review】- 6: After the summary, start again...
- A simple chopper circuit drawn by myself
- Functions of vent valve and drain valve of magnetic flap level gauge
- Some experience sharing on program debugging