Most of the modern PIC CPU’sÂ like PIC16F87XA devices are built with many types of advanced features that are capable of performing additional special tasks and operations. These features increases the stability of the PIC and increases its functional reliability. It is also helpful for designers to decrease the entire cost of the designed circuit by the integration and replacement of external components and also by providing a lot of power saving protections. The general special features of a modern PIC chip are given below (basis of PIC6F877A).
â€¢ Oscillator Selection
– Power-on Reset (POR)
– Power-up Timer (PWRT)
– Oscillator Start-up Timer (OST)
– Brown-out Reset (BOR)
â€¢ Watchdog Timer (WDT)
â€¢ Code Protection
â€¢ ID Locations
â€¢ In-Circuit Serial Programming
â€¢ Low-Voltage In-Circuit Serial Programming
â€¢ In-Circuit Debugger
Oscillator Selection Function
The PIC16F8xx series basically supports different types of oscillators and also PIC16F87XA devices. It also has a Watchdog Timer which can be shut-off only through configuration bits. It runs off its own RC oscillator for added reliability (Configurations as compared to normal microcontrollers/processors). The different oscillator modes can be easily selected by the user. The user can program two configuration bits (foscillator1 and foscillator0) to selection of the basic four modes. The basic oscillator modes and the typical values used for these oscillators are given in the picture below.
â€¢ LP Low-Power Crystal
â€¢ XT Crystal/Resonator
â€¢ HS High-Speed Crystal/Resonator
â€¢ RC Resistor/Capacitor
Reset function is one of the most advanced features that is available on all modern microcontrollers. The PIC16F8xx series have various kinds of resets. The various kinds of reset options that are available on PIC 16F877 series are given below.
â€¢ Power-on Reset (POR).
â€¢ MCLR Reset during normal operation.
â€¢ MCLR Reset during Sleep.
â€¢ WDT Reset (during normal operation).
â€¢ WDT Wake-up (during Sleep).
â€¢ Brown-out Reset (BOR).
A simplified block diagram of the on-chip Reset circuit is shown in the figure below.
MCLR is an advanced reset path that helps to filter the unwanted noise. This filter helps to detect unwanted clock pulses and other noise signals and filter such pulses. It should be noted that a WDT Reset does not drive MCLR pin low. The behaviour of the ESD protection on the MCLR pin differs from previous devices of this family. Voltages applied to the pin that exceed its specification can result in both Resets and current consumption outside of device specification during the Reset event. For this reason, Microchip recommends that the MCLR pin no longer be tied directly to VDD.
Power-on Reset (POR)
The power â€“on-reset signals are generated by on-chip when VDD rise is detected. In the normal conditions, the VDD rise is in the range of 1.2v to1.7v. To take the advantage of POR, connect the MCLR pin to VDD by the resistor capacitor (RC) network. Before the device is set to start for its normal operation, the different operating parameters such as frequency, voltage, temperature, and so on must be checked to see if they are normal or proper. If not, the chip/circuit must be held in reset until the operating conditions are proper or normal. Brown-out-reset function provides support for these operations.
Power-up Timer (PWRT)
The Power-up Timer provides a fixed 72 ms nominal time-out on power-up only from the POR. The Power-up Timer operates on an internal RC oscillator. The chip is kept in Reset as long as the PWRT is active. The PWRTâ€™s time delay allows VDD to rise to an acceptable level. A configuration bit is provided to enable or disable the PWRT. The power-up time delay will vary from chip to chip due to VDD, temperature and process variation
Oscillator Start-up Timer (OST)
The Oscillator Start-up Timer (OST) provides a delay of 1024 oscillator cycles (from OSC1 input) after the PWRT delay is over (if PWRT is enabled). This helps to ensure that the crystal oscillator or resonator has started and stabilized. The OST time-out is invoked only for XT, LP and HS modes and only on Power-on Reset or wake-up from Sleep.
Brown-out Reset (BOR)
Brown-out-reset is a special resetting function in modern controllers. Once the brown-out occurs, the device will remain in Brown-out Reset until VDD rises above VBOR. The Power-up Timer then keeps the device in Reset for TPWRT. If VDD should fall below VBOR during TPWRT, the Brown-out Reset process will restart when VDD rises above VBOR with the Power-up Timer Reset. The Power-up Timer is always enabled when the Brown-out Reset circuit is enabled, regardless of the state of the PWRT configuration bit.
On power-up, the time-out sequence is as follows: the PWRT delay starts (if enabled) when a POR Reset occurs. Then, OST starts counting 1024 oscillator cycles when PWRT ends (LP, XT, and HS). When the OST ends, the device comes out of Reset. IfÂ MCLR is kept low long enough, the time-outs will expire. Bringing MCLR high will begin execution immediately. This is useful for testing purposes or to synchronize more than one PIC16F87XA device operating in parallel. Table shows the Reset conditions for the Status, PCON and PC registers, while Table shows the Reset conditions for all the registers.