Trouble with ADC!!!!

Thread Starter

paddy611

Joined Oct 9, 2012
25
Hi,
I am using MPLAB IDE version 8.60 and CCS compiler for programming of microcontroller PIC18F4520. I have working code which I am using since last 1 year. But suddenly I am facing a weird problem from couple of days. When I am reprogramming the micro controller it is not functioning as expected. The same hardware is working fine with earlier controller which were programmed couple of months back.
I am using pickit3 and MCD2 for programming micro-controller. Even changed the PC too. I really don't understand what is going wrong.

I have used MCP3208 ADC for reading 8 different values and display it on 7 segment display.
During testing I found that when I am putting fixed value (anything in between 0 to 4095) manually, everything seems working fine.
But when I am reading from actual ADC, it gives error in functioning.
I have never faced this problem before.
Please advice.
Thanks
 

tshuck

Joined Oct 18, 2012
3,534
We will need a bit more information regarding your setup before we can make any educated suggestions.

What is your hardware connected? Is your ADC returning random results? Last few bits changing rapidly? Not getting any data from ADC? What is your configuration and communication with the ADC?
 

crazypacov

Joined Jun 16, 2014
12
Hi,
I am using MPLAB IDE version 8.60 and CCS compiler for programming of microcontroller PIC18F4520. I have working code which I am using since last 1 year. But suddenly I am facing a weird problem from couple of days. When I am reprogramming the micro controller it is not functioning as expected. The same hardware is working fine with earlier controller which were programmed couple of months back.
I am using pickit3 and MCD2 for programming micro-controller. Even changed the PC too. I really don't understand what is going wrong.

I have used MCP3208 ADC for reading 8 different values and display it on 7 segment display.
During testing I found that when I am putting fixed value (anything in between 0 to 4095) manually, everything seems working fine.
But when I am reading from actual ADC, it gives error in functioning.
I have never faced this problem before.
Please advice.
Thanks
Use Mikrobasic and load ADC example for 18F4520.
If it still doesn't work, then it is a hardware problem.
 
Top