• AVR Freaks

Helpful ReplyHot!dsPIC33 ADC always reads HIGH(1023)

Author
Mercury_
Starting Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/04/24 06:41:15
  • Location: 0
  • Status: offline
2019/05/14 08:38:49 (permalink)
0

dsPIC33 ADC always reads HIGH(1023)

I have the problem that my dsPIC33FJ128GP802 always returns 1023 when attempting to read the ADC and I wanted to ask if it could be that the ADC was damaged in some way during soldering?
 
First I was doubting my program and so I downloaded some code samples from the Microchip website all of which retuned 1023 no matter what I do. Then I used a multimeter to check the inputs and see if my sensors are maybe doing something weird and are actually pulling all the pins high but each pin is at a value that should not return 1023.
 
So my next guess was that the IC was damaged but this seems unreasonable since everything else is working fine, including but not limited to:
  • DMA works fully
  • ECAN works fully
  • CLOCK switching etc. works fully
 
So Im not sure if it really is a possibility that just the ADC got damaged or if I'm doing something else wrong?
#1
du00000001
Just Some Member
  • Total Posts : 2683
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: dsPIC33 ADC always reads HIGH(1023) 2019/05/14 11:14:10 (permalink) ☄ Helpfulby Mercury_ 2019/05/21 05:30:52
4 (1)
I somewhat doubt you damaged the ADC. More likely you didn't configure it properly - or forgot to select the channel and/or trigger the conversion.
Eventually provide your code.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#2
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: dsPIC33 ADC always reads HIGH(1023) 2019/05/14 13:21:44 (permalink)
0
Ahh yes, forgot to turn the ADC on around line#42 of the code.... ;)
 

Nearly there...
#3
Mercury_
Starting Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/04/24 06:41:15
  • Location: 0
  • Status: offline
Re: dsPIC33 ADC always reads HIGH(1023) 2019/05/21 05:38:31 (permalink)
0
Im sorry for not being active for so long after posting this, Once I got back to this project I created a simple program that just read directly from the ADC buffer to make sure that it wasn't the DMA messing up my results and I still got the same high reads, so I finally broke and replaced the IC (I really didn't think this would be the problem but I wanted to make sure XD). Turns out that the dsPIC actually had a broken ADC because as soon as I ran my program on the now PIC it ran perfectly giving me the correct readings. Im not sure if the IC broke while soldering or was already damaged but it anyone else seems to only get high readings from their ADC no matter what they do, it might actually be a broken ADC (unlikely but might).
#4
JPortici
Super Member
  • Total Posts : 680
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
Re: dsPIC33 ADC always reads HIGH(1023) 2019/05/21 05:58:32 (permalink)
4 (1)
Or maybe there was a problem with the soldering of the old part
#5
Jump to:
© 2019 APG vNext Commercial Version 4.5