Author: sebastien.lelong
Date: Sun May 3 01:39:00 2009
New Revision: 969
Added:
trunk/include/peripheral/adc/adc_pindef.jal
Log:
ADC pin definition, ADC groups ala MCC18 (it starts to look like this...)
Added: trunk/include/peripheral/adc/adc_pindef.jal
==============================================================================
--- (empty file)
+++ trunk/include/peripheral/adc/adc_pindef.jal Sun May 3 01:39:00 2009
@@ -0,0 +1,1041 @@
+-- Title: ADC pin definitions, arbitrarily grouped according to ADC pins
+-- Author: Sébastien Lelong, Copyright (C) 2009, all rights reserved.
+-- Adapted-by:
+-- Compiler: >=2.4k
+--
+-- This file is part of jallib (http://jallib.googlecode.com)
+-- Released under the ZLIB license
(http://www.opensource.org/licenses/zlib-license.html)
+--
+-- Description: this library acts as a wrapper. When included, it'll
define some
+-- constants and aliases according to involved target chip.
+--
+--
+
+
+-- JALLIB_ADC_GRP 0
+-- Number of channels: 2
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+--
+if target_chip == PIC_10F222 | target_chip == PIC_10F220 then
+
+ const byte ADC_NCHANNEL = 2
+ const byte JALLIB_ADC_GRP = 0
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+
+end if
+
+
+-- JALLIB_ADC_GRP 1
+-- Number of channels: 3
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+--
+if target_chip == PIC_12F510 then
+
+ const byte ADC_NCHANNEL = 3
+ const byte JALLIB_ADC_GRP = 1
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+
+end if
+
+
+-- JALLIB_ADC_GRP 2
+-- Number of channels: 12
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN2
+-- RA5 <-> AN4
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+-- RF7 <-> AN5
+--
+if target_chip == PIC_18F65J11 | target_chip == PIC_18F84J11 | target_chip
== PIC_18F64J11 | target_chip == PIC_18F63J11 | target_chip == PIC_18F85J11
| target_chip == PIC_18F83J11 then
+
+ const byte ADC_NCHANNEL = 12
+ const byte JALLIB_ADC_GRP = 2
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN2 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_F7
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 3
+-- Number of channels: 4
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+--
+if target_chip == PIC_16F648A | target_chip == PIC_16F628 | target_chip ==
PIC_16F627 | target_chip == PIC_16F716 | target_chip == PIC_16F628A |
target_chip == PIC_16F627A then
+
+ const byte ADC_NCHANNEL = 4
+ const byte JALLIB_ADC_GRP = 3
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+
+end if
+
+
+-- JALLIB_ADC_GRP 4
+-- Number of channels: 5
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA4 <-> AN4
+--
+if target_chip == PIC_16F818 | target_chip == PIC_16F819 | target_chip ==
PIC_18F2331 | target_chip == PIC_18F2431 then
+
+ const byte ADC_NCHANNEL = 5
+ const byte JALLIB_ADC_GRP = 4
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A4
+
+end if
+
+
+-- JALLIB_ADC_GRP 5
+-- Number of channels: 9
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA4 <-> AN4
+-- RA5 <-> AN5
+-- RE0 <-> AN6
+-- RE1 <-> AN7
+-- RE2 <-> AN8
+--
+if target_chip == PIC_18F4431 | target_chip == PIC_18F4331 then
+
+ const byte ADC_NCHANNEL = 9
+ const byte JALLIB_ADC_GRP = 5
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A4
+ var volatile bit adc_pin_AN5 is pin_A5
+ var volatile bit adc_pin_AN6 is pin_E0
+ var volatile bit adc_pin_AN7 is pin_E1
+ var volatile bit adc_pin_AN8 is pin_E2
+
+end if
+
+
+-- JALLIB_ADC_GRP 6
+-- Number of channels: 7
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA4 <-> AN4
+-- RB6 <-> AN5
+-- RB7 <-> AN6
+--
+if target_chip == PIC_16F88 | target_chip == PIC_16F87 then
+
+ const byte ADC_NCHANNEL = 7
+ const byte JALLIB_ADC_GRP = 6
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A4
+ var volatile bit adc_pin_AN5 is pin_B6
+ var volatile bit adc_pin_AN6 is pin_B7
+
+end if
+
+
+-- JALLIB_ADC_GRP 7
+-- Number of channels: 5
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+--
+if target_chip == PIC_16F876A | target_chip == PIC_18F2539 | target_chip
== PIC_16F73 | target_chip == PIC_16F72 | target_chip == PIC_16F76 |
target_chip == PIC_18F252 | target_chip == PIC_18F258 | target_chip ==
PIC_16F876 | target_chip == PIC_16F870 | target_chip == PIC_16F872 |
target_chip == PIC_16F873 | target_chip == PIC_16F873A | target_chip ==
PIC_16F913 | target_chip == PIC_18F2439 | target_chip == PIC_18F242 |
target_chip == PIC_18F248 | target_chip == PIC_16F916 then
+
+ const byte ADC_NCHANNEL = 5
+ const byte JALLIB_ADC_GRP = 7
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+
+end if
+
+
+-- JALLIB_ADC_GRP 8
+-- Number of channels: 8
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN10
+-- RB1 <-> AN8
+-- RB4 <-> AN9
+--
+if target_chip == PIC_18F2480 | target_chip == PIC_18F2585 | target_chip
== PIC_18F2580 | target_chip == PIC_18F2682 | target_chip == PIC_18F2685 |
target_chip == PIC_18F2680 then
+
+ const byte ADC_NCHANNEL = 8
+ const byte JALLIB_ADC_GRP = 8
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN8 is pin_B1
+ var volatile bit adc_pin_AN9 is pin_B4
+
+end if
+
+
+-- JALLIB_ADC_GRP 9
+-- Number of channels: 11
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN10
+-- RB1 <-> AN8
+-- RB4 <-> AN9
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_18F4680 | target_chip == PIC_18F4682 | target_chip
== PIC_18F4480 | target_chip == PIC_18F4580 | target_chip == PIC_18F4585 |
target_chip == PIC_18F4685 then
+
+ const byte ADC_NCHANNEL = 11
+ const byte JALLIB_ADC_GRP = 9
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+ var volatile bit adc_pin_AN8 is pin_B1
+ var volatile bit adc_pin_AN9 is pin_B4
+
+end if
+
+
+-- JALLIB_ADC_GRP 10
+-- Number of channels: 10
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RB4 <-> AN11
+--
+if target_chip == PIC_18F2620 | target_chip == PIC_18LF24J10 | target_chip
== PIC_18F2420 | target_chip == PIC_18F2423 | target_chip == PIC_18F24K20 |
target_chip == PIC_18F2515 | target_chip == PIC_18LF25J10 | target_chip ==
PIC_18F2410 | target_chip == PIC_18F2550 | target_chip == PIC_18F2553 |
target_chip == PIC_18F2510 | target_chip == PIC_18F25K20 | target_chip ==
PIC_18F24J10 | target_chip == PIC_18F26K20 | target_chip == PIC_18F2455 |
target_chip == PIC_18F2450 | target_chip == PIC_18F2321 | target_chip ==
PIC_18F2320 | target_chip == PIC_18F2458 | target_chip == PIC_18F2610 |
target_chip == PIC_18F23K20 | target_chip == PIC_18F2520 | target_chip ==
PIC_18F2523 | target_chip == PIC_18F2525 | target_chip == PIC_18F25J10 |
target_chip == PIC_18F2220 | target_chip == PIC_18F2221 then
+
+ const byte ADC_NCHANNEL = 10
+ const byte JALLIB_ADC_GRP = 10
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 11
+-- Number of channels: 11
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RB4 <-> AN11
+-- RB5 <-> AN13
+--
+if target_chip == PIC_16F886 | target_chip == PIC_16F883 | target_chip ==
PIC_16F882 then
+
+ const byte ADC_NCHANNEL = 11
+ const byte JALLIB_ADC_GRP = 11
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN13 is pin_B5
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 12
+-- Number of channels: 14
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RB4 <-> AN11
+-- RB5 <-> AN13
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_16F884 | target_chip == PIC_16F887 then
+
+ const byte ADC_NCHANNEL = 14
+ const byte JALLIB_ADC_GRP = 12
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN13 is pin_B5
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 13
+-- Number of channels: 13
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RB4 <-> AN11
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_18F4620 | target_chip == PIC_18LF45J10 | target_chip
== PIC_18F44K20 | target_chip == PIC_18F4220 | target_chip == PIC_18F4221 |
target_chip == PIC_18F4610 | target_chip == PIC_18F4553 | target_chip ==
PIC_18F4550 | target_chip == PIC_18F45K20 | target_chip == PIC_18F4410 |
target_chip == PIC_18F46K20 | target_chip == PIC_18F4455 | target_chip ==
PIC_18F4525 | target_chip == PIC_18F4523 | target_chip == PIC_18F4520 |
target_chip == PIC_18F45J10 | target_chip == PIC_18F4423 | target_chip ==
PIC_18F4420 | target_chip == PIC_18F4450 | target_chip == PIC_18F4515 |
target_chip == PIC_18F4510 | target_chip == PIC_18F4458 | target_chip ==
PIC_18F4321 | target_chip == PIC_18F4320 | target_chip == PIC_18LF44J10 |
target_chip == PIC_18F44J10 | target_chip == PIC_18F43K20 then
+
+ const byte ADC_NCHANNEL = 13
+ const byte JALLIB_ADC_GRP = 13
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 14
+-- Number of channels: 10
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RC2 <-> AN11
+--
+if target_chip == PIC_18F25J11 | target_chip == PIC_18LF24J50 |
target_chip == PIC_18LF26J11 | target_chip == PIC_18F24J50 | target_chip ==
PIC_18F25J50 | target_chip == PIC_18F26J50 | target_chip == PIC_18F26J11 |
target_chip == PIC_18LF26J50 | target_chip == PIC_18LF25J50 | target_chip
== PIC_18LF24J11 | target_chip == PIC_18F24J11 | target_chip ==
PIC_18LF25J11 then
+
+ const byte ADC_NCHANNEL = 10
+ const byte JALLIB_ADC_GRP = 14
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_C2
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 15
+-- Number of channels: 13
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RC2 <-> AN11
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_18LF45J50 | target_chip == PIC_18LF45J11 |
target_chip == PIC_18LF46J11 | target_chip == PIC_18F46J50 | target_chip ==
PIC_18F45J50 | target_chip == PIC_18F46J11 | target_chip == PIC_18LF44J50 |
target_chip == PIC_18F44J50 | target_chip == PIC_18F45J11 | target_chip ==
PIC_18LF46J50 | target_chip == PIC_18LF44J11 | target_chip == PIC_18F44J11
then
+
+ const byte ADC_NCHANNEL = 13
+ const byte JALLIB_ADC_GRP = 15
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_C2
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+-- JALLIB_ADC_GRP 16
+-- Number of channels: 10
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB4 <-> AN11
+-- RB5 <-> AN13
+--
+if target_chip == PIC_16F767 | target_chip == PIC_16F737 then
+
+ const byte ADC_NCHANNEL = 10
+ const byte JALLIB_ADC_GRP = 16
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN13 is pin_B5
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN8 is pin_B2
+
+end if
+
+
+-- JALLIB_ADC_GRP 17
+-- Number of channels: 13
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB4 <-> AN11
+-- RB5 <-> AN13
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_16F747 | target_chip == PIC_16F777 then
+
+ const byte ADC_NCHANNEL = 13
+ const byte JALLIB_ADC_GRP = 17
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN13 is pin_B5
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+ var volatile bit adc_pin_AN8 is pin_B2
+
+end if
+
+
+-- JALLIB_ADC_GRP 18
+-- Number of channels: 8
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RE0 <-> AN5
+-- RE1 <-> AN6
+-- RE2 <-> AN7
+--
+if target_chip == PIC_16F946 | target_chip == PIC_16F874A | target_chip ==
PIC_16F877A | target_chip == PIC_18F452 | target_chip == PIC_18F458 |
target_chip == PIC_18F4439 | target_chip == PIC_18F4539 | target_chip ==
PIC_18F442 | target_chip == PIC_16F914 | target_chip == PIC_18F448 |
target_chip == PIC_16F917 | target_chip == PIC_16F74 | target_chip ==
PIC_16F77 | target_chip == PIC_16F874 | target_chip == PIC_16F877 |
target_chip == PIC_16F871 then
+
+ const byte ADC_NCHANNEL = 8
+ const byte JALLIB_ADC_GRP = 18
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_E0
+ var volatile bit adc_pin_AN6 is pin_E1
+ var volatile bit adc_pin_AN7 is pin_E2
+
+end if
+
+
+-- JALLIB_ADC_GRP 19
+-- Number of channels: 12
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF0 <-> AN5
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+--
+if target_chip == PIC_18F6310 | target_chip == PIC_18F6527 | target_chip
== PIC_18F6393 | target_chip == PIC_18F6390 | target_chip == PIC_18F8393 |
target_chip == PIC_18F6490 | target_chip == PIC_18F6493 | target_chip ==
PIC_18F6627 | target_chip == PIC_18F8410 | target_chip == PIC_18F8493 |
target_chip == PIC_18F8390 | target_chip == PIC_18F8310 | target_chip ==
PIC_18F6525 | target_chip == PIC_18F6520 | target_chip == PIC_18F6723 |
target_chip == PIC_18F6722 | target_chip == PIC_18F6720 | target_chip ==
PIC_18F6680 | target_chip == PIC_18F6585 | target_chip == PIC_18F6410 |
target_chip == PIC_18F6621 | target_chip == PIC_18F8490 | target_chip ==
PIC_18F6628 | target_chip == PIC_18F6622 | target_chip == PIC_18F6620 then
+
+ const byte ADC_NCHANNEL = 12
+ const byte JALLIB_ADC_GRP = 19
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_F0
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 20
+-- Number of channels: 16
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF0 <-> AN5
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+-- RH4 <-> AN12
+-- RH5 <-> AN13
+-- RH6 <-> AN14
+-- RH7 <-> AN15
+--
+if target_chip == PIC_18F8720 | target_chip == PIC_18F8723 | target_chip
== PIC_18F8627 | target_chip == PIC_18F8520 | target_chip == PIC_18F8527 |
target_chip == PIC_18F8628 | target_chip == PIC_18F8620 | target_chip ==
PIC_18F8722 | target_chip == PIC_18F8622 | target_chip == PIC_18F96J65 |
target_chip == PIC_18F96J60 | target_chip == PIC_18F8585 | target_chip ==
PIC_18F97J60 | target_chip == PIC_18F8680 then
+
+ const byte ADC_NCHANNEL = 16
+ const byte JALLIB_ADC_GRP = 20
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN12 is pin_H4
+ var volatile bit adc_pin_AN13 is pin_H5
+ var volatile bit adc_pin_AN14 is pin_H6
+ var volatile bit adc_pin_AN15 is pin_H7
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_F0
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 21
+-- Number of channels: 15
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF0 <-> AN5
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+-- RH5 <-> AN13
+-- RH6 <-> AN14
+-- RH7 <-> AN15
+--
+if target_chip == PIC_18F8525 | target_chip == PIC_18F8621 then
+
+ const byte ADC_NCHANNEL = 15
+ const byte JALLIB_ADC_GRP = 21
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN13 is pin_H5
+ var volatile bit adc_pin_AN14 is pin_H6
+ var volatile bit adc_pin_AN15 is pin_H7
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_F0
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 22
+-- Number of channels: 11
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+--
+if target_chip == PIC_18F66J60 | target_chip == PIC_18F65J15 | target_chip
== PIC_18F86J16 | target_chip == PIC_18F66J16 | target_chip == PIC_18F66J10
| target_chip == PIC_18F66J11 | target_chip == PIC_18F67J11 | target_chip
== PIC_18F65J10 | target_chip == PIC_18F86J11 | target_chip == PIC_18F66J65
| target_chip == PIC_18F67J10 | target_chip == PIC_18F87J11 | target_chip
== PIC_18F66J15 | target_chip == PIC_18F67J60 then
+
+ const byte ADC_NCHANNEL = 11
+ const byte JALLIB_ADC_GRP = 22
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 23
+-- Number of channels: 12
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+-- RF7 <-> AN5
+--
+if target_chip == PIC_18F66J90 | target_chip == PIC_18F67J90 | target_chip
== PIC_18F86J90 | target_chip == PIC_18F83J90 | target_chip == PIC_18F63J90
| target_chip == PIC_18F84J90 | target_chip == PIC_18F64J90 | target_chip
== PIC_18F85J90 | target_chip == PIC_18F87J90 | target_chip == PIC_18F65J90
then
+
+ const byte ADC_NCHANNEL = 12
+ const byte JALLIB_ADC_GRP = 23
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN5 is pin_F7
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 24
+-- Number of channels: 15
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF1 <-> AN6
+-- RF2 <-> AN7
+-- RF3 <-> AN8
+-- RF4 <-> AN9
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+-- RH4 <-> AN12
+-- RH5 <-> AN13
+-- RH6 <-> AN14
+-- RH7 <-> AN15
+--
+if target_chip == PIC_18F86J15 | target_chip == PIC_18F86J10 | target_chip
== PIC_18F86J60 | target_chip == PIC_18F85J15 | target_chip == PIC_18F85J10
| target_chip == PIC_18F86J65 | target_chip == PIC_18F87J10 | target_chip
== PIC_18F87J60 then
+
+ const byte ADC_NCHANNEL = 15
+ const byte JALLIB_ADC_GRP = 24
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN12 is pin_H4
+ var volatile bit adc_pin_AN13 is pin_H5
+ var volatile bit adc_pin_AN14 is pin_H6
+ var volatile bit adc_pin_AN15 is pin_H7
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN6 is pin_F1
+ var volatile bit adc_pin_AN7 is pin_F2
+ var volatile bit adc_pin_AN8 is pin_F3
+ var volatile bit adc_pin_AN9 is pin_F4
+
+end if
+
+
+-- JALLIB_ADC_GRP 25
+-- Number of channels: 8
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RA5 <-> AN4
+-- RF2 <-> AN7
+-- RF5 <-> AN10
+-- RF6 <-> AN11
+--
+if target_chip == PIC_18F65J50 | target_chip == PIC_18F86J50 | target_chip
== PIC_18F87J50 | target_chip == PIC_18F86J55 | target_chip == PIC_18F66J50
| target_chip == PIC_18F66J55 | target_chip == PIC_18F67J50 | target_chip
== PIC_18F85J50 then
+
+ const byte ADC_NCHANNEL = 8
+ const byte JALLIB_ADC_GRP = 25
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_F5
+ var volatile bit adc_pin_AN11 is pin_F6
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_A5
+ var volatile bit adc_pin_AN7 is pin_F2
+
+end if
+
+
+-- JALLIB_ADC_GRP 26
+-- Number of channels: 7
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA3 <-> AN3
+-- RB0 <-> AN4
+-- RB1 <-> AN5
+-- RB4 <-> AN6
+--
+if target_chip == PIC_18F1320 | target_chip == PIC_18F1220 then
+
+ const byte ADC_NCHANNEL = 7
+ const byte JALLIB_ADC_GRP = 26
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A3
+ var volatile bit adc_pin_AN4 is pin_B0
+ var volatile bit adc_pin_AN5 is pin_B1
+ var volatile bit adc_pin_AN6 is pin_B4
+
+end if
+
+
+-- JALLIB_ADC_GRP 27
+-- Number of channels: 4
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA4 <-> AN3
+--
+if target_chip == PIC_12F683 then
+
+ const byte ADC_NCHANNEL = 4
+ const byte JALLIB_ADC_GRP = 27
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A4
+
+end if
+
+
+-- JALLIB_ADC_GRP 28
+-- Number of channels: 12
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA4 <-> AN3
+-- RB4 <-> AN10
+-- RB5 <-> AN11
+-- RC0 <-> AN4
+-- RC1 <-> AN5
+-- RC2 <-> AN6
+-- RC3 <-> AN7
+-- RC6 <-> AN8
+-- RC7 <-> AN9
+--
+if target_chip == PIC_18LF13K22 | target_chip == PIC_16HV785 | target_chip
== PIC_18F13K22 | target_chip == PIC_18LF14K22 | target_chip ==
PIC_18F14K22 | target_chip == PIC_16F785 then
+
+ const byte ADC_NCHANNEL = 12
+ const byte JALLIB_ADC_GRP = 28
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN10 is pin_B4
+ var volatile bit adc_pin_AN11 is pin_B5
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A4
+ var volatile bit adc_pin_AN4 is pin_C0
+ var volatile bit adc_pin_AN5 is pin_C1
+ var volatile bit adc_pin_AN6 is pin_C2
+ var volatile bit adc_pin_AN7 is pin_C3
+ var volatile bit adc_pin_AN8 is pin_C6
+ var volatile bit adc_pin_AN9 is pin_C7
+
+end if
+
+
+-- JALLIB_ADC_GRP 29
+-- Number of channels: 8
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA2 <-> AN2
+-- RA4 <-> AN3
+-- RC0 <-> AN4
+-- RC1 <-> AN5
+-- RC2 <-> AN6
+-- RC3 <-> AN7
+--
+if target_chip == PIC_16F688 | target_chip == PIC_16F684 then
+
+ const byte ADC_NCHANNEL = 8
+ const byte JALLIB_ADC_GRP = 29
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A2
+ var volatile bit adc_pin_AN3 is pin_A4
+ var volatile bit adc_pin_AN4 is pin_C0
+ var volatile bit adc_pin_AN5 is pin_C1
+ var volatile bit adc_pin_AN6 is pin_C2
+ var volatile bit adc_pin_AN7 is pin_C3
+
+end if
+
+
+-- JALLIB_ADC_GRP 30
+-- Number of channels: 3
+-- Pin association:
+-- RA0 <-> AN0
+-- RA1 <-> AN1
+-- RA4 <-> AN2
+--
+if target_chip == PIC_18F1230 | target_chip == PIC_18F1330 then
+
+ const byte ADC_NCHANNEL = 3
+ const byte JALLIB_ADC_GRP = 30
+ var volatile bit adc_pin_AN0 is pin_A0
+ var volatile bit adc_pin_AN1 is pin_A1
+ var volatile bit adc_pin_AN2 is pin_A4
+
+end if
+
+
+-- JALLIB_ADC_GRP 31
+-- Number of channels: 9
+-- Pin association:
+-- RA4 <-> AN3
+-- RB4 <-> AN10
+-- RB5 <-> AN11
+-- RC0 <-> AN4
+-- RC1 <-> AN5
+-- RC2 <-> AN6
+-- RC3 <-> AN7
+-- RC6 <-> AN8
+-- RC7 <-> AN9
+--
+if target_chip == PIC_18LF14K50 | target_chip == PIC_18F13K50 |
target_chip == PIC_18LF13K50 | target_chip == PIC_18F14K50 then
+
+ const byte ADC_NCHANNEL = 9
+ const byte JALLIB_ADC_GRP = 31
+ var volatile bit adc_pin_AN10 is pin_B4
+ var volatile bit adc_pin_AN11 is pin_B5
+ var volatile bit adc_pin_AN3 is pin_A4
+ var volatile bit adc_pin_AN4 is pin_C0
+ var volatile bit adc_pin_AN5 is pin_C1
+ var volatile bit adc_pin_AN6 is pin_C2
+ var volatile bit adc_pin_AN7 is pin_C3
+ var volatile bit adc_pin_AN8 is pin_C6
+ var volatile bit adc_pin_AN9 is pin_C7
+
+end if
+
+
+-- JALLIB_ADC_GRP 32
+-- Number of channels: 3
+-- Pin association:
+-- RB0 <-> AN0
+-- RB1 <-> AN1
+-- RB2 <-> AN2
+--
+if target_chip == PIC_16F526 | target_chip == PIC_16F506 then
+
+ const byte ADC_NCHANNEL = 3
+ const byte JALLIB_ADC_GRP = 32
+ var volatile bit adc_pin_AN0 is pin_B0
+ var volatile bit adc_pin_AN1 is pin_B1
+ var volatile bit adc_pin_AN2 is pin_B2
+
+end if
+
+
+-- JALLIB_ADC_GRP 33
+-- Number of channels: 6
+-- Pin association:
+-- RB0 <-> AN12
+-- RB1 <-> AN10
+-- RB2 <-> AN8
+-- RB3 <-> AN9
+-- RB4 <-> AN11
+-- RB5 <-> AN13
+--
+if target_chip == PIC_16F724 | target_chip == PIC_16F726 | target_chip ==
PIC_16F727 | target_chip == PIC_16F722 | target_chip == PIC_16F723 |
target_chip == PIC_16LF723 | target_chip == PIC_16LF722 | target_chip ==
PIC_16LF727 | target_chip == PIC_16LF726 | target_chip == PIC_16LF724 then
+
+ const byte ADC_NCHANNEL = 6
+ const byte JALLIB_ADC_GRP = 33
+ var volatile bit adc_pin_AN10 is pin_B1
+ var volatile bit adc_pin_AN11 is pin_B4
+ var volatile bit adc_pin_AN12 is pin_B0
+ var volatile bit adc_pin_AN13 is pin_B5
+ var volatile bit adc_pin_AN8 is pin_B2
+ var volatile bit adc_pin_AN9 is pin_B3
+
+end if
+
+
+
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---