Author | Stef Mientki, Copyright (c) 2002..2008, all rights reserved. |
Adapted-by | Sebastien Lelong. |
Compiler | >=2.4k |
library to handle ADC peripheral. - support both low and high resolution mode - support a large number of PICs, with - ADC pin configuration - channel selection - clock selection - support Vref How to use it ? See http://jallib.blogspot.com for details...
this is a heavy refactoring/rewriting of original library from Stef Mientki. The main changes are about ADC configuration, which are essentially handled in adc_channels.jal, adc_pindef.jal and adc_clock.jal The original library can be found: - Stef's: http://mientki.ruhosting.nl/pic-tools/jal/libs2/adc_hardware.jal - jallib issue tracker: http://code.google.com/p/jallib/issues/detail?id=7
_adc_init_acquisition_delay()
_adc_read_low_res(byte in adc_chan, byte out adc_byte)
_adc_init_justify()
var volatile byte _adcon0_shadow = 0
No documentation found
var byte adc_conversion_delay
No documentation found
adc_init()
Initializes the PIC AD-converter, by calling the correct routine according to the number of external references Settings are done according to the special ADC constants Sets all the analog pins to input Calculates aquisition time and determines if right or left justification is optimal
adc_read_bytes(byte in adc_chan, byte out adc_hbyte, byte out adc_lbyte)
Does an AD conversion on the selected channel returns the 10-bit result as 2 byte parameters It doesn't matter if ADC is set to low or high resolution
_adc_init_acquisition_delay()
No documentation found
_adc_read_low_res(byte in adc_chan, byte out adc_byte)
Does an AD conversion with low resolution (8 bit) on the selected channel
_adc_init_justify()
No documentation found
adc_read(byte in adc_chan) return word
Does an AD conversion on the selected channel returns the result as a 10-bits word It doesn't matter if ADC is set to low or high resolution
adc_read_low_res(byte in adc_chan) return byte
Returns Low Resolution ADC-value as the RESULT It doesn't matter if ADC is set to low or high resolution
12f683 | 12f683_pwm_adc.jal |
16f767 | 16f767_pwm_adc.jal |
16f77 | 16f77_adc_lowres.jal |
16f876a | 16f876a_adc.jal |
16f877 | 16f877_adc.jal |
16f88 | 16f88_adc_lowres.jal |
16f88 | 16f88_adc_highres.jal |
16f886 | 16f886_pwm_adc_res.jal |
16f886 | 16f886_pwm_adc_freq.jal |