Setting Up a Mid-Range Pin for PIC Integrations

Mid-range pin tuning is very useful in setting the conditions under which the pic integration and programmer will work and the mode of operation, we can think of it as the mechanism that decides which device will work when the power comes into our integration, and this information is located in the "2007h" region of the program memory, it is not accessible here during normal operation, we can only intervene here during programming. Its placement is automatically assigned by the ICSP programmer, in this series we will show the settings from the application "mikroC" and "MPBLAB".

MPBLAB Settings

  • We continue with Project >> Edit Project in MikroC

At MPLAB, we can also change this information directly in code or with the "Configuration Bits tool".

  • Configure >> Configuration Bits

Meanings of Pins Set to Pic

Oscillator Selection Bits

The oscillator we use to determine the clock speed can be in 8 different modes;

Watchdog Scheduler (WDT)

Watchdog. Resets to the program at the end of the time set in the program. "Generally" PIC's are used when in Sleep mode. The PIC is put to sleep and WDT resets the program in it to run again after a certain period of time. The other purpose of WDT is to keep the program running. If you reset this timer at the correct key points while the program is running, you make sure that the program is working correctly. Otherwise, if the processor is plugged in due to an armed or software shortage, the WDT program resets and the system returns to the correct operating position.

POWER UP Timer (PWRT)

When the power up timer (PWRT) system is powered, pici keeps the PICi in the reset position for a certain period of time (72ms) because the voltage does not reach the VDD level immediately. This means that during this time, PICin is prevented from creating unwanted situations.

Brown-OUT Reset (BOR)

It is the case that the PIC throws RESET at itself to avoid undesirable situations as the supply voltage decreases.

Code & Data Protection

In these cases, it is used to ignore pic and activities such as data writing/read/processing