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
- 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
- Correctly understand the amplification region, saturation region, and cutoff region of the transistor
- [Analog Electronics Course Selection Test] + Operational Amplifier Type Application
- Detailed schematic of LTC2380-24 (preferably single-ended input to differential)
- What is the power-off mode? Generally, to save power, you just need to put it in standby mode. To exit the power-off mode, you can only do a hardware reset...
- CircuitPython 5.4.0 Beta 0 released
- Chip Manufacturing 1-Semiconductor Manufacturing Process
- ptpython A better Python REPL
- HPM6750 CAN and GPIO parallel data reading test, not implemented
- How to analyze this circuit
- Free application: the latest digital function generator, if you fail to apply, you can eat "chicken legs" and win gifts such as flexible ink screen