Hi guys,
I've made a quick fix in order to close issue 31 (
http://code.google.com/p/jallib/issues/detail?id=31). Since those PICs don't
have ADRESL and ADRESH registers, but only one ADRES, I've done the
following:
- sanity check: if high resolution is requested, but PIC don't have
ADRESH, pragma error
- in procedure _adc_read_low_res, a simple
"""
if defined(ADRESH) == true then
adc_byte = ADRESH
else
adc_byte = ADRES
end if
"""
does the trick. Not the most elegant, I agree...
(Note in low resolution, result is left justified in the lib, so stored in
ADRESH, not in ADRESL)
You can see the whole lib in SVN, as of revision 732. Any comments
appreciated !
I've also created and committed a sample for 16f77 (original PIC report
talks about). I've contacted Patrick, who reported this isssue, and sent him
a zip with the fix, so he can perform the test (I don't have any 16f77).
Hope we'll get news from him soon !
Cheers,
Seb
--
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---