Just in case this somehow helps. ADC values are represented in a 32bit bit field. But this bitfield actually has 3 fields inside of it. You can double check to make sure I'm remembering correctly. But the first 12 bits is the actual ADC value, the next 4 bits is the ADC identifier( channel ), and the last 16 bits is "reserved", meaning it's not used.
SO if your bit alignment has somehow gone out of alignment . . . this could very well explain high / bad raw values. On Tue, Feb 16, 2016 at 1:39 PM, William Hermans <[email protected]> wrote: > OK, so another possibility does come to mind. The values you're reading > are somehow becoming corrupt before you check them. So humor me here, and > honestly this is probably in your best interest anyhow. . . > > > 1. Reset your board, which is to say, reboot it, and make sure none of > your stuff for the ADC loads at boot. > 2. Follow my guide here, but keep in mind it is based on 4.x kernels. > So adjustments may have to be made > http://www.embeddedhobbyist.com/2015/10/beaglebone-black-ad > 3. Use the sysfs method of reading values out of the ADC, single shot > to double check raw values. > > So, again, my guide above is meant for kernels 4.x but should work for the > most part. File locations, and in where to echo to load capes is different, > and I'm not sure what else. The point is that you need an alternate way of > testing your ADC, and making sure it is not somehow your code. Let me know > if this fixes the values read out, and if it does, we'll have to pour > through your code. > > On Tue, Feb 16, 2016 at 12:53 PM, hllpc <[email protected]> wrote: > >> >> Higher like 40k, in the firt piat i wrote that the "translated" value is >> 11 volt. >> But it's variable, start from 0 and then invrease. Or somethime it's all >> zeroes, or only numbers repeated like 11 12 14 all over again >> Il giorno martedì 16 febbraio 2016 20:43:21 UTC+1, William Hermans ha >> scritto: >>> >>> OK, so define "way higher". Higher than 4095 ? >>> >>> On Tue, Feb 16, 2016 at 12:26 PM, hllpc <[email protected]> wrote: >>> >>>> Yes I know about the conversion raw values-> real values, two days ago >>>> the raw values where in the range0-2000 as they should have been, now they >>>> are way way higher >>>> >>>> -- >>>> For more options, visit http://beagleboard.org/discuss >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "BeagleBoard" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
