I’m doing ADC with PIC 18F46K22, 16×2 lcd, LM3 temperature sensor, 20 MHz oscillator, MPLAB XC8 and PicKit3 programmer. I can do the generate the hex file and simulate it on Proteus and it works fine, but on hardware it doesn’t work. The LCD is switched on, but doesn’t display the analog value.
I wrote a small program to switch the led on off with delay and write something on the LCD on off with delay and this works on Proteus and hardware.
Hi..in my case I found that the microcontroller is powered by +5V. I had to change the Power Rail Voltage to +3.3V. I changed the voltage from the “Design->Configure Power rails” menu entry. From the drop down list, I picked VCC/VDD and changed the voltage from 5 to 3.3. Now it works correctly.