1: Problems and solutions of PIC16C71 microcontroller
Question 1: After the chip enters the low-power sleep mode (SLEEP MODE), its oscillator pin will be in a floating state, which will increase the sleep power consumption of the chip, which is more than 10μA higher than the indicator in the original manual.
Countermeasure: Adding a 10MΩ resistor between the oscillator pin OSC1 and ground (GND) can prevent OSC1 from entering a floating state without affecting the normal oscillation of the microcontroller.
Question 2: The RA port direction register TRISA is currently only a 4-bit register, corresponding to RA0~RA3, and not an 8-bit register corresponding to RA0~RA4 as stated in the manual. That is, RA4 does not have a corresponding input/output direction control bit. It is an I/O pin with open-pole output and Schmitt input.
Countermeasure: Avoid using read-modify-write instructions (such as BCF RA, BSF RA) on port RA to avoid unintentional changes to the input/output state of RA4. For operations on port RA, register operations should be used (MOVWF RA).
Question 3: When the CPU is executing a read-modify-write instruction on the INTCON register, if an interrupt request occurs, the read interrupt routine will be executed twice. This is because the GIE bit in the INTCON register will be automatically cleared by the hardware (masking all interrupts) after the interrupt request occurs, and the program will enter the interrupt routine entry (0004H). When the GIE bit is cleared, if the CPU happens to be executing a read-modify-write instruction on INTCON (such as BSF INTCON, etc.), the GIE bit will be reset to 1 by the write-back operation, which will cause the CPU to enter the interrupt routine twice.
Countermeasure: If you need to modify an interrupt enable bit of INTCON in the program, you should set GIE=0 in advance.
, restore GIE=1 after the modification is completed. ………….. BCF INTCON, GIE BSF INTCON, ××× BSF INTCON, GIE ………….. |
Question 4: When the chip voltage VDD power-on rise time is greater than 100μs, the power-on reset circuit POR and the power-on delay circuit PWRT may not function normally, causing the chip reset to be abnormal (i.e. PC ≠ reset address). Generally, it is recommended not to use PWRT in this case.
Countermeasure: If the VDD rise time is very long, this chip generally requires a longer power-on delay. A reliable power-on delay method is shown in Figure 1, with an external reset circuit at the MCLR terminal.
Question 5: If RA3 is used as the reference voltage input in A/D conversion, the maximum full-scale error (NFS) is greater than the specification in the manual. The actual situation is shown in Table 1.
Table 1 A/D full scale error table
VREF source | Full scale error |
VDD | <±1 LSb |
RA3 | <±2.5LSb |
2. Problems and solutions of PIC16C84 microcontroller
Question 1: The E/W cycle of the internal E2PROM data memory of the PIC16C84 microcontroller occasionally exceeds the maximum value (10ms).
Countermeasure: In the program, the WR bit in the EECON1 register should be used to determine the completion of the write cycle, or the "write cycle complete interrupt" function should be enabled. These two methods can ensure that the write is completed.
Question 2: The relationship between VDD and oscillation frequency is shown in Table 2.
VDD | Oscillation mode | Maximum frequency |
2V-3V | RC, LP | 2MHZ, 200MHZ |
3V-6V | RC, XT, LP | 4MHZ, 200MHZ |
4.5V-5.5V | HS | 10MHZ |
Previous article:PS7219 PIC microcontroller interface program
Next article:Little Duck Herbal Cooker Controlled by PIC Microcontroller
- Popular Resources
- Popular amplifiers
- MCU Principles and Interface Technology C51 Programming (Edited by Zhang Yigang)
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Example interpretation of 51 single chip microcomputer complete learning and application
- Example interpretation of 51 single chip microcomputer complete learning and application
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- BOOST Circuit
- 【Portable Environmental Status Detector】Work Submission
- Are there any electromagnetic radiation issues with LED luminous characters?
- [Share] Solving the problem of operational amplifier instability caused by capacitive load
- What is 50HZ bandwidth and what is the function of bandwidth?
- Regarding the process of flashing bootloader for microchip ECU
- Development Background and Characteristics of 5G Industrial Gateway in the Internet of Things
- Smart antenna technology can effectively improve the transmission quality of wireless channels
- MSP430 FRAM Technology – How-tos and Best Practices
- ESP32-CAM Video Surveillance Robot