adc not working on hardware but works on proteus

Home Forums Microcontrollers PIC Microcontroller adc not working on hardware but works on proteus

Tagged: , , , ,

This topic contains 5 replies, has 3 voices, and was last updated by  Linda11 1 month, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #15789


    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.

    Please assist


    Ligo George

    It is very difficult to analyse the problem with above details. Kindly attach a photo of your LCD and the program you are using.



    Find attached is my adc code and proteus simulation file.

    You must be logged in to view attached files.


    I’m struggling to send the proteus file.


    Participant 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.



    Thank the hardware is working. I had to modify the codes.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.