Hello All,
In my application I'm using PIC16f1936 MCU. While programming (in debug mode) it is giving the following error message. Please help me to solve this!
Thank you!
Kirangkr
"Programming...
Failed to get Device Id.
Programming failed
Low voltage programming requires the low-voltage programming
configuration bit to be set. If this bit has been disabled
it may explain why programming has failed."
Also please see my code
#include <htc.h> //PIC hardware mapping
//#include <pic16f1936.h>
#include <xc.h>
// BEGIN CONFIG
#pragma config FOSC = INTOSC // Oscillator Selection bits (Internal oscillator)
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON // Master Enabled
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
#pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection ON)
#pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)
//END CONFIG
#define _XTAL_FREQ 2000000
#define FOSC 8000000
void main ()
{
TRISB0 = 0; //RB0 as Output PIN
while(1)
{
RB0 = 1; // LED ON
__delay_ms(1000); // 1 Second Delay
RB0 = 0; // LED OFF
__delay_ms(1000); // 1 Second Delay
}
}