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 4 replies, has 3 voices, and was last updated by  BaseMell 1 month ago.

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

    Linda11
    Participant

    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

    #15807

    Ligo George
    Keymaster

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

    #15850

    Linda11
    Participant

    Find attached is my adc code and proteus simulation file.

    Attachments:
    You must be logged in to view attached files.
    #15852

    Linda11
    Participant

    I’m struggling to send the proteus file.

    #15888

    BaseMell
    Participant

    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.

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

You must be logged in to reply to this topic.