[Ovmsdev] 12V A/D conversion
Michael Balzer
dexter at expeedo.de
Sat Feb 23 18:07:04 HKT 2013
Mark,
I got some 12V alerts during the last 3 days. Checking the 12V reading
after the alerts showed normal level, so I'm trying to figure out if
they were false alerts.
Last alert was about 2 hours ago, alerting about 11.0 V -- my check only
a few minutes later showed 12.1 V again...
I've read into the PIC18 doc on the A/D conversion (chapter 19). AFAIS
inputs_voltage() differs from the example in two ways:
1) the example does not turn off the converter after reading the result
(but I understand the ADRES register should keep the result)
2) the example step 3 says "wait for acquisition time if required", it
seems our function currently does not wait.
"To determine acquisition time, see Section 19.1 “A/D
Acquisition Requirements”. After this acquisition
time has elapsed, the A/D conversion can be started."
Section 19.1 contains an equation based on hardware parameters I don't
know. Can you please have a look and tell if missing that wait time
could lead to false measurements?
Thanks!
Michael
--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dexter.vcf
Type: text/x-vcard
Size: 216 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20130223/32b49112/attachment-0002.vcf>
More information about the OvmsDev
mailing list