TMOD |= 0x20; //0011 0000
SCON = 0x50; //0101,0000
TH1 = 0xFA;
TL1 = 0xFA;
TMOD = 0x01; //Should be changed to TMOD |= 0x01;
TH0 = 0x70;
TL0 = 0xc6;
ET0=1;
ES = 1; //
EA = 1; //
TR0 = 1;
TR1 = 1; //
}
The above is the serial port interrupt initialization and timer T0 initialization. At first glance, there is no problem.
But please note that when setting the TMOD of the timer, you should use TMOD |= 0x01,,, otherwise the serial port interrupt will not work,,,, these small problems are always very annoying~~~~~
Previous article:A simple method to convert ".hex" files to ".iic" files in Keiil
Next article:Convert digital string into digital number in MCU
- 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
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- CCS7.2 soft C28x chip software breakpoint setting method
- I learned C language from teacher Tan Haoqiang when I was in school, but I feel that the explanation is not comprehensive enough. Please recommend some tips for microcontroller programming.
- ADS8588S parallel byte mode read timing
- Design of intelligent remote control based on MSP430F413
- GT911 touch screen chip datasheet
- MCU reset types and faults
- Here's a wave of benefits for everyone. Pay 10 yuan for postage and get a brand new power meter that can measure the power consumption of home appliances. While stocks last.
- Qorvo's customizable PMIC simplifies power management system design
- Can the digital tube screen be driven by the same driving method as the segment code LCD screen?
- Creative digital electronic clock using ESP8266