Revision: 1871
Author: sebastien.lelong
Date: Sun Apr 4 02:17:06 2010
Log: issue 123: add support for PICs in datasheets 39625 and 39626 (18F2585
18F2680 18F4585 18F4680, 18F2525 18F2620 18F4525 18F4620)
http://code.google.com/p/jallib/source/detail?r=1871
Modified:
/trunk/include/peripheral/adc/adc_channels.jal
/trunk/tools/adc/adc_pcfg.py
=======================================
--- /trunk/include/peripheral/adc/adc_channels.jal Mon Mar 29 00:16:18 2010
+++ /trunk/include/peripheral/adc/adc_channels.jal Sun Apr 4 02:17:06 2010
@@ -127,22 +127,60 @@
-- combination
-- -----------------------------------------
-if target_chip == PIC_18F66J93 | target_chip == PIC_18F67J93 | target_chip
== PIC_18F86J93 | target_chip == PIC_18F87J93 | target_chip == PIC_16F767 |
target_chip == PIC_16F777 | target_chip == PIC_16F747 | target_chip ==
PIC_16F737 | target_chip == PIC_18F6585 | target_chip == PIC_18F8680 |
target_chip == PIC_18F6680 | target_chip == PIC_18F8585 | target_chip ==
PIC_18F2553 | target_chip == PIC_18F4553 | target_chip == PIC_18F2458 |
target_chip == PIC_18F4458 | target_chip == PIC_16F73 | target_chip ==
PIC_16F74 | target_chip == PIC_16F77 | target_chip == PIC_16F76 |
target_chip == PIC_18F4539 | target_chip == PIC_18F2539 | target_chip ==
PIC_18F2439 | target_chip == PIC_18F4439 | target_chip == PIC_16F873 |
target_chip == PIC_16F874 | target_chip == PIC_16F876 | target_chip ==
PIC_16F877 | target_chip == PIC_16F872 | target_chip == PIC_16F72 |
target_chip == PIC_16F876A | target_chip == PIC_16F873A | target_chip ==
PIC_16F877A | target_chip == PIC_16F874A | target_chip == PIC_18F2550 |
target_chip == PIC_18F4550 | target_chip == PIC_18F4455 | target_chip ==
PIC_18F2455 | target_chip == PIC_16F870 | target_chip == PIC_16F871 |
target_chip == PIC_18F4450 | target_chip == PIC_18F2450 | target_chip ==
PIC_16F818 | target_chip == PIC_16F819 | target_chip == PIC_16F716 then
+if target_chip == PIC_16F72 | target_chip == PIC_16F767 | target_chip ==
PIC_16F777 | target_chip == PIC_16F747 | target_chip == PIC_16F737 |
target_chip == PIC_16F876A | target_chip == PIC_16F873A | target_chip ==
PIC_16F877A | target_chip == PIC_16F874A | target_chip == PIC_18F4525 |
target_chip == PIC_18F2525 | target_chip == PIC_18F2620 | target_chip ==
PIC_18F4620 | target_chip == PIC_18F2550 | target_chip == PIC_18F4550 |
target_chip == PIC_18F4455 | target_chip == PIC_18F2455 | target_chip ==
PIC_16F870 | target_chip == PIC_16F871 | target_chip == PIC_18F4450 |
target_chip == PIC_18F2450 | target_chip == PIC_18F6585 | target_chip ==
PIC_18F8680 | target_chip == PIC_18F6680 | target_chip == PIC_18F8585 |
target_chip == PIC_18F2553 | target_chip == PIC_18F4553 | target_chip ==
PIC_18F2458 | target_chip == PIC_18F4458 | target_chip == PIC_16F73 |
target_chip == PIC_16F74 | target_chip == PIC_16F77 | target_chip ==
PIC_16F76 | target_chip == PIC_16F872 | target_chip == PIC_16F873 |
target_chip == PIC_16F874 | target_chip == PIC_16F876 | target_chip ==
PIC_16F877 | target_chip == PIC_18F4539 | target_chip == PIC_18F2539 |
target_chip == PIC_18F2439 | target_chip == PIC_18F4439 | target_chip ==
PIC_18F2680 | target_chip == PIC_18F4680 | target_chip == PIC_18F2585 |
target_chip == PIC_18F4585 | target_chip == PIC_18F66J93 | target_chip ==
PIC_18F67J93 | target_chip == PIC_18F86J93 | target_chip == PIC_18F87J93 |
target_chip == PIC_16F818 | target_chip == PIC_16F819 | target_chip ==
PIC_16F716 then
_debug "ADC channels config: dependent pins, via PCFG bits"
procedure _adc_setup_pins() is
pragma inline
- -- Datasheet: 39948
- if target_chip == PIC_18F66J93 | target_chip == PIC_18F67J93 |
target_chip == PIC_18F86J93 | target_chip == PIC_18F87J93 then
+ -- Datasheet: 39597
+ if target_chip == PIC_16F72 then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [39] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0000, 0b_0, 0b_0}
+ const byte ADC_PCFG_MAP [18] = {0b_111, 0b_0, 0b_0, 0b_0, 0b_0,
0b_0, 0b_0, 0b_0, 0b_0, 0b_100, 0b_101, 0b_0, 0b_0, 0b_0, 0b_0, 0b_000,
0b_001, 0b_0}
+ var bit*3 no_vref = 0
+ var bit*3 one_vref = 0
+ var bit*3 two_vref = 0
+
+ if (ADC_NCHANNEL) == 0 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 1 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 2 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 3 then
+ pin_AN0_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 5 then
+ pin_AN4_direction = input
+ pin_AN2_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN1_direction = input
+ end if
+
+ end if
+
+
+
+
+ -- Datasheet: 30498
+ if target_chip == PIC_16F777 | target_chip == PIC_16F747 then
+
+
+
+ -- This array stores PCFG config bits, 3 by 3, for each number of
+ -- ADC channels, from 1 to the max:
+ -- For each 3-tuple: (no vref, 1 vref, 2 vref)
+ const byte ADC_PCFG_MAP [45] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0011, 0b_0, 0b_0, 0b_0010, 0b_0, 0b_0, 0b_0000, 0b_0, 0b_0}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -161,91 +199,118 @@
elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
pin_AN1_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 5 then
pin_AN2_direction = input
pin_AN4_direction = input
pin_AN1_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 6 then
pin_AN2_direction = input
pin_AN4_direction = input
pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
elsif (ADC_NCHANNEL) == 7 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
elsif (ADC_NCHANNEL) == 8 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
pin_AN1_direction = input
pin_AN7_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
elsif (ADC_NCHANNEL) == 9 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
pin_AN1_direction = input
pin_AN7_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
pin_AN8_direction = input
elsif (ADC_NCHANNEL) == 10 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
pin_AN1_direction = input
- pin_AN9_direction = input
pin_AN7_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
pin_AN8_direction = input
elsif (ADC_NCHANNEL) == 11 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
+ pin_AN10_direction = input
pin_AN1_direction = input
- pin_AN9_direction = input
pin_AN7_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
- pin_AN10_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
pin_AN8_direction = input
elsif (ADC_NCHANNEL) == 12 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN6_direction = input
+ pin_AN10_direction = input
+ pin_AN11_direction = input
pin_AN1_direction = input
- pin_AN9_direction = input
pin_AN7_direction = input
- pin_AN5_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 13 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN11_direction = input
+ pin_AN1_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
pin_AN3_direction = input
+ pin_AN12_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 14 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
pin_AN10_direction = input
pin_AN11_direction = input
+ pin_AN1_direction = input
+ pin_AN13_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN12_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
pin_AN8_direction = input
end if
end if
-
-
-- Datasheet: 30498
if target_chip == PIC_16F767 | target_chip == PIC_16F737 then
@@ -343,15 +408,17 @@
end if
- -- Datasheet: 30498
- if target_chip == PIC_16F777 | target_chip == PIC_16F747 then
+
+
+ -- Datasheet: 39582
+ if target_chip == PIC_16F876A | target_chip == PIC_16F873A then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [45] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0011, 0b_0, 0b_0, 0b_0010, 0b_0, 0b_0, 0b_0000, 0b_0, 0b_0}
+ const byte ADC_PCFG_MAP [18] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_1111, 0b_0, 0b_0101,
0b_1101, 0b_1001, 0b_1010, 0b_1000}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -361,122 +428,79 @@
elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 2 then
- pin_AN1_direction = input
- pin_AN0_direction = input
+ asm nop
elsif (ADC_NCHANNEL) == 3 then
+ pin_AN0_direction = input
pin_AN2_direction = input
+ pin_AN3_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN1_direction = input
pin_AN0_direction = input
- elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
- pin_AN1_direction = input
pin_AN3_direction = input
- pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 5 then
- pin_AN2_direction = input
pin_AN4_direction = input
pin_AN1_direction = input
- pin_AN3_direction = input
pin_AN0_direction = input
- elsif (ADC_NCHANNEL) == 6 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
pin_AN3_direction = input
+ end if
+
+ end if
+
+
+ -- Datasheet: 39582
+ if target_chip == PIC_16F877A | target_chip == PIC_16F874A then
+
+
+
+ -- This array stores PCFG config bits, 3 by 3, for each number of
+ -- ADC channels, from 1 to the max:
+ -- For each 3-tuple: (no vref, 1 vref, 2 vref)
+ const byte ADC_PCFG_MAP [27] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_1111, 0b_0, 0b_0101,
0b_1101, 0b_0010, 0b_0011, 0b_1100, 0b_1001, 0b_1010, 0b_1011, 0b_0, 0b_0,
0b_0, 0b_0000, 0b_0001, 0b_1000}
+ var bit*4 no_vref = 0
+ var bit*4 one_vref = 0
+ var bit*4 two_vref = 0
+
+ if (ADC_NCHANNEL) == 0 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
- pin_AN5_direction = input
- elsif (ADC_NCHANNEL) == 7 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN6_direction = input
- pin_AN3_direction = input
+ elsif (ADC_NCHANNEL) == 2 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 3 then
pin_AN0_direction = input
- pin_AN5_direction = input
- elsif (ADC_NCHANNEL) == 8 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN6_direction = input
pin_AN3_direction = input
- pin_AN0_direction = input
- pin_AN5_direction = input
- elsif (ADC_NCHANNEL) == 9 then
- pin_AN2_direction = input
- pin_AN4_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN6_direction = input
- pin_AN3_direction = input
pin_AN0_direction = input
- pin_AN5_direction = input
- pin_AN8_direction = input
- elsif (ADC_NCHANNEL) == 10 then
pin_AN2_direction = input
+ pin_AN3_direction = input
+ elsif (ADC_NCHANNEL) == 5 then
pin_AN4_direction = input
pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN6_direction = input
- pin_AN3_direction = input
pin_AN0_direction = input
- pin_AN9_direction = input
- pin_AN5_direction = input
- pin_AN8_direction = input
- elsif (ADC_NCHANNEL) == 11 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN10_direction = input
- pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN6_direction = input
pin_AN3_direction = input
- pin_AN0_direction = input
- pin_AN9_direction = input
- pin_AN5_direction = input
- pin_AN8_direction = input
- elsif (ADC_NCHANNEL) == 12 then
+ elsif (ADC_NCHANNEL) == 6 then
pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN6_direction = input
pin_AN3_direction = input
pin_AN0_direction = input
- pin_AN9_direction = input
pin_AN5_direction = input
- pin_AN8_direction = input
- elsif (ADC_NCHANNEL) == 13 then
- pin_AN2_direction = input
+ elsif (ADC_NCHANNEL) == 7 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 8 then
pin_AN4_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
pin_AN1_direction = input
pin_AN7_direction = input
pin_AN6_direction = input
- pin_AN3_direction = input
- pin_AN12_direction = input
pin_AN0_direction = input
- pin_AN9_direction = input
pin_AN5_direction = input
- pin_AN8_direction = input
- elsif (ADC_NCHANNEL) == 14 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
- pin_AN1_direction = input
- pin_AN7_direction = input
- pin_AN13_direction = input
- pin_AN6_direction = input
pin_AN3_direction = input
- pin_AN12_direction = input
- pin_AN0_direction = input
- pin_AN9_direction = input
- pin_AN5_direction = input
- pin_AN8_direction = input
end if
end if
@@ -484,8 +508,8 @@
- -- Datasheet: 39887
- if target_chip == PIC_18F2553 | target_chip == PIC_18F2458 then
+ -- Datasheet: 39626
+ if target_chip == PIC_18F2525 | target_chip == PIC_18F2620 then
@@ -569,8 +593,8 @@
end if
- -- Datasheet: 39887
- if target_chip == PIC_18F4553 | target_chip == PIC_18F4458 then
+ -- Datasheet: 39626
+ if target_chip == PIC_18F4525 | target_chip == PIC_18F4620 then
@@ -906,15 +930,15 @@
- -- Datasheet: 30491
- if target_chip == PIC_18F8680 | target_chip == PIC_18F8585 then
+ -- Datasheet: 30292
+ if target_chip == PIC_16F873 | target_chip == PIC_16F876 then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [51] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0011, 0b_0, 0b_0, 0b_0010, 0b_0, 0b_0, 0b_0001, 0b_0, 0b_0, 0b_0, 0b_0,
0b_0, 0b_0000, 0b_0, 0b_0}
+ const byte ADC_PCFG_MAP [18] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0101, 0b_1111, 0b_0, 0b_0,
0b_1101, 0b_1001, 0b_1010, 0b_1000}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -924,155 +948,36 @@
elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 2 then
- pin_AN1_direction = input
- pin_AN0_direction = input
+ asm nop
elsif (ADC_NCHANNEL) == 3 then
- pin_AN2_direction = input
- pin_AN1_direction = input
pin_AN0_direction = input
- elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
- pin_AN1_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 5 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN0_direction = input
- pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 6 then
- pin_AN2_direction = input
- pin_AN4_direction = input
pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 7 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 8 then
- pin_AN2_direction = input
+ elsif (ADC_NCHANNEL) == 5 then
pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 9 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN8_direction = input
pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 10 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 11 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 12 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 13 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN12_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 14 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN13_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN12_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 15 then
- asm nop
- elsif (ADC_NCHANNEL) == 16 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN13_direction = input
- pin_AN15_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN12_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN14_direction = input
- pin_AN11_direction = input
- pin_AN6_direction = input
end if
end if
- -- Datasheet: 30491
- if target_chip == PIC_18F6585 | target_chip == PIC_18F6680 then
+ -- Datasheet: 30292
+ if target_chip == PIC_16F874 | target_chip == PIC_16F877 then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [39] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0010, 0b_0, 0b_0}
+ const byte ADC_PCFG_MAP [27] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0101, 0b_1111, 0b_0, 0b_0,
0b_1101, 0b_0010, 0b_0011, 0b_1100, 0b_1001, 0b_1010, 0b_1011, 0b_0, 0b_0,
0b_0, 0b_0000, 0b_0001, 0b_1000}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -1082,93 +987,40 @@
elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 2 then
- pin_AN1_direction = input
- pin_AN0_direction = input
+ asm nop
elsif (ADC_NCHANNEL) == 3 then
- pin_AN2_direction = input
- pin_AN1_direction = input
pin_AN0_direction = input
- elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
- pin_AN1_direction = input
+ pin_AN3_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN0_direction = input
+ pin_AN1_direction = input
+ pin_AN2_direction = input
pin_AN3_direction = input
elsif (ADC_NCHANNEL) == 5 then
- pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN1_direction = input
pin_AN0_direction = input
+ pin_AN1_direction = input
+ pin_AN2_direction = input
pin_AN3_direction = input
elsif (ADC_NCHANNEL) == 6 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
pin_AN5_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 7 then
- pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 8 then
pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 9 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 10 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
pin_AN1_direction = input
- pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 7 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 8 then
pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 11 then
- pin_AN2_direction = input
- pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
pin_AN5_direction = input
- pin_AN7_direction = input
- pin_AN0_direction = input
- pin_AN3_direction = input
- pin_AN10_direction = input
pin_AN6_direction = input
- elsif (ADC_NCHANNEL) == 12 then
- pin_AN2_direction = input
pin_AN4_direction = input
- pin_AN9_direction = input
- pin_AN8_direction = input
- pin_AN1_direction = input
- pin_AN5_direction = input
- pin_AN7_direction = input
pin_AN0_direction = input
+ pin_AN1_direction = input
+ pin_AN2_direction = input
pin_AN3_direction = input
- pin_AN10_direction = input
- pin_AN11_direction = input
- pin_AN6_direction = input
end if
end if
@@ -1269,6 +1121,169 @@
pin_AN3_direction = input
end if
+ end if
+
+
+
+
+ -- Datasheet: 39625
+ if target_chip == PIC_18F2680 | target_chip == PIC_18F2585 then
+
+
+
+ -- This array stores PCFG config bits, 3 by 3, for each number of
+ -- ADC channels, from 1 to the max:
+ -- For each 3-tuple: (no vref, 1 vref, 2 vref)
+ const byte ADC_PCFG_MAP [27] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1000, 0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0000,
0b_0, 0b_0}
+ var bit*4 no_vref = 0
+ var bit*4 one_vref = 0
+ var bit*4 two_vref = 0
+
+ if (ADC_NCHANNEL) == 0 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 1 then
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 2 then
+ pin_AN1_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 3 then
+ pin_AN2_direction = input
+ pin_AN1_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
+ pin_AN2_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 5 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 6 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 7 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ elsif (ADC_NCHANNEL) == 8 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ end if
+
+ end if
+
+
+ -- Datasheet: 39625
+ if target_chip == PIC_18F4680 | target_chip == PIC_18F4585 then
+
+
+
+ -- This array stores PCFG config bits, 3 by 3, for each number of
+ -- ADC channels, from 1 to the max:
+ -- For each 3-tuple: (no vref, 1 vref, 2 vref)
+ const byte ADC_PCFG_MAP [36] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0000, 0b_0, 0b_0}
+ var bit*4 no_vref = 0
+ var bit*4 one_vref = 0
+ var bit*4 two_vref = 0
+
+ if (ADC_NCHANNEL) == 0 then
+ asm nop
+ elsif (ADC_NCHANNEL) == 1 then
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 2 then
+ pin_AN1_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 3 then
+ pin_AN2_direction = input
+ pin_AN1_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
+ pin_AN2_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 5 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 6 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 7 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 8 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 9 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 10 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
+ elsif (ADC_NCHANNEL) == 11 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN8_direction = input
+ pin_AN1_direction = input
+ pin_AN7_direction = input
+ pin_AN6_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN5_direction = input
+ end if
+
end if
@@ -1485,15 +1500,15 @@
- -- Datasheet: 39582
- if target_chip == PIC_16F876A | target_chip == PIC_16F873A then
+ -- Datasheet: 39887
+ if target_chip == PIC_18F2553 | target_chip == PIC_18F2458 then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [18] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_1111, 0b_0, 0b_0101,
0b_1101, 0b_1001, 0b_1010, 0b_1000}
+ const byte ADC_PCFG_MAP [33] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1000, 0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100,
0b_0, 0b_0, 0b_0011, 0b_0, 0b_0, 0b_0000, 0b_0, 0b_0}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -1503,36 +1518,82 @@
elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 2 then
- asm nop
+ pin_AN1_direction = input
+ pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 3 then
+ pin_AN2_direction = input
+ pin_AN1_direction = input
pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
+ pin_AN1_direction = input
pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 4 then
+ pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 5 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
pin_AN1_direction = input
+ pin_AN3_direction = input
pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 6 then
pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN1_direction = input
pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 5 then
+ pin_AN0_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 7 then
+ pin_AN2_direction = input
pin_AN4_direction = input
pin_AN1_direction = input
+ pin_AN3_direction = input
pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 8 then
pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN1_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 9 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN11_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN8_direction = input
+ elsif (ADC_NCHANNEL) == 10 then
+ pin_AN2_direction = input
+ pin_AN4_direction = input
+ pin_AN10_direction = input
+ pin_AN11_direction = input
+ pin_AN1_direction = input
+ pin_AN3_direction = input
+ pin_AN12_direction = input
+ pin_AN0_direction = input
+ pin_AN9_direction = input
+ pin_AN8_direction = input
end if
end if
- -- Datasheet: 39582
- if target_chip == PIC_16F877A | target_chip == PIC_16F874A then
+ -- Datasheet: 39887
+ if target_chip == PIC_18F4553 | target_chip == PIC_18F4458 then
-- This array stores PCFG config bits, 3 by 3, for each number of
-- ADC channels, from 1 to the max:
-- For each 3-tuple: (no vref, 1 vref, 2 vref)
- const byte ADC_PCFG_MAP [27] = {0b_0110, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_0, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_1111, 0b_0, 0b_0101,
0b_1101, 0b_0010, 0b_0011, 0b_1100, 0b_1001, 0b_1010, 0b_1011, 0b_0, 0b_0,
0b_0, 0b_0000, 0b_0001, 0b_1000}
+ const byte ADC_PCFG_MAP [42] = {0b_1111, 0b_0, 0b_0, 0b_1110,
0b_0, 0b_0, 0b_1101, 0b_0, 0b_0, 0b_1100, 0b_0, 0b_0, 0b_1011, 0b_0, 0b_0,
0b_1010, 0b_0, 0b_0, 0b_1001, 0b_0, 0b_0, 0b_1000, 0b_0, 0b_0, 0b_0111,
0b_0, 0b_0, 0b_0110, 0b_0, 0b_0, 0b_0101, 0b_0, 0b_0, 0b_0100, 0b_0, 0b_0,
0b_0011, 0b_0, 0b_0, 0b_0000, 0b_0, 0b_0}
var bit*4 no_vref = 0
var bit*4 one_vref = 0
var bit*4 two_vref = 0
@@ -1542,22 +1603,23 @@
elsif (ADC_NCHANNEL) == 1 then
pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 2 then
- asm nop
- elsif (ADC_NCHANNEL) == 3 then
+ pin_AN1_direction = input
pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 3 then
pin_AN2_direction = input
- pin_AN3_direction = input
- elsif (ADC_NCHANNEL) == 4 then
pin_AN1_direction = input
pin_AN0_direction = input
+ elsif (ADC_NCHANNEL) == 4 then
pin_AN2_direction = input
+ pin_AN1_direction = input
pin_AN3_direction = input
+ pin_AN0_direction = input
elsif (ADC_NCHANNEL) == 5 then
+ pin_AN2_direction = input
pin_AN4_direction = input
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/tools/adc/adc_pcfg.py Fri Mar 12 12:04:03 2010
+++ /trunk/tools/adc/adc_pcfg.py Sun Apr 4 02:17:06 2010
@@ -2100,5 +2100,379 @@
'AN1/RA1' : 'D',
'AN0/RA0' : 'D',
},
- }
-}
+ },
+ '39625': {
+ # same config for '0001','0010','0011','0100', only keep one config
+ # else will produce error in ADC lib generation
+ '0000': {
+ 'AN10/RB0': 'A',
+ 'AN9/RB4' : 'A',
+ 'AN8/RB1' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 'A',
+ 'AN1/RA1' : 'A',
+ 'AN0/RA0' : 'A',
+ },
+ '0101': {
+ 'AN10/RB0': 'D',
+ 'AN9/RB4' : 'A',
+ 'AN8/RB1' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 'A',
+ 'AN1/RA1' : 'A',
+ 'AN0/RA0' : 'A',
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: 'D',
+ 'AN1/RA1' : 'D',
+ 'AN0/RA0' : 'D',
+ },
+ },
+ '39626': {
+ # same config for '0001' and '0010', only keep one config
+ # else will produce error in ADC lib generation
+ '0000': {
+ 'AN12/RB0': 'A',
+ 'AN11/RB4': 'A',
+ 'AN10/RB1': 'A',
+ 'AN9/RB3' : 'A',
+ 'AN8/RB2' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 'A',
+ 'AN1/RA1' : 'A',
+ 'AN0/RA0' : 'A',
+ },
+ '0011': {
+ 'AN12/RB0': 'D',
+ 'AN11/RB4': 'A',
+ 'AN10/RB1': 'A',
+ 'AN9/RB3' : 'A',
+ 'AN8/RB2' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 'A',
+ 'AN1/RA1' : 'A',
+ 'AN0/RA0' : 'A',
+ },
+ '0100': {
+ 'AN12/RB0': 'D',
+ 'AN11/RB4': 'D',
+ 'AN10/RB1': 'A',
+ 'AN9/RB3' : 'A',
+ 'AN8/RB2' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 'A',
+ 'AN1/RA1' : 'A',
+ 'AN0/RA0' : 'A',
+ },
+ '0101': {
+ 'AN12/RB0': 'D',
+ 'AN11/RB4': 'D',
+ 'AN10/RB1': 'D',
+ 'AN9/RB3' : 'A',
+ 'AN8/RB2' : 'A',
+ 'AN7/RE2' : 'A',
+ 'AN6/RE1' : 'A',
+ 'AN5/RE0' : 'A',
+ 'AN4/RA5' : 'A',
+ 'AN3/RA3' : 'A',
+ 'AN2/RA2' : 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 'AN9/RB3' : 'D',
+ 'AN8/RB2' : 'D',
+ 'AN7/RE2' : 'D',
+ 'AN6/RE1' : 'D',
+ 'AN5/RE0' : 'D',
+ 'AN4/RA5' : 'D',
+ 'AN3/RA3' : 'D',
+ 'AN2/RA2' : 'D',
+ 'AN1/RA1' : 'D',
+ 'AN0/RA0' : 'A',
+ },
+ '1111': {
+ 'AN12/RB0': 'D',
+ 'AN11/RB4': 'D',
+ 'AN10/RB1': 'D',
+ 'AN9/RB3' : 'D',
+ 'AN8/RB2' : 'D',
+ 'AN7/RE2' : 'D',
+ 'AN6/RE1' : 'D',
+ 'AN5/RE0' : 'D',
+ 'AN4/RA5' : 'D',
+ 'AN3/RA3' : 'D',
+ 'AN2/RA2' : 'D',
+ 'AN1/RA1' : 'D',
+ 'AN0/RA0' : 'D',
+ },
+ },
+}
--
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.