

#pragma config BOR = ON // Brown-out Reset Enable bit (Brown-out Reset enabled) #pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config OSCS = OFF // Oscillator System Clock Switch Enable bit (Oscillator system clock switch option is disabled (main oscillator is source))

#pragma config OSC = HS // Oscillator Selection bits (HS oscillator) Where does the difference lay? I suspect it has something to do with delay speed or so…Ĭode for main is as follows because its the thing that i change #include I am confused that configuration bits are as same for both MPLAB and MikroC. To my surprise, the Proteus as well as hardware worked as a charm. Then I ported the same code in MikroC – only made a slight change of replacing _delay_us and _delay_ms with available delay routines in MikroC. However, when I burned the program, the controller hardware refused to display anything.

I tested it in ISIS and it showed perfect output. I found a library and worked on it and MPLAB XC8 compiled it successfully. I have been trying to write a program for LCD on PIC18f452.
