Author: sebastien.lelong
Date: Mon Jun 29 02:47:07 2009
New Revision: 1060

Modified:
    trunk/include/peripheral/adc/adc_clock.jal

Log:
issue-75: fixed typo about ADCS bits

Modified: trunk/include/peripheral/adc/adc_clock.jal
==============================================================================
--- trunk/include/peripheral/adc/adc_clock.jal  (original)
+++ trunk/include/peripheral/adc/adc_clock.jal  Mon Jun 29 02:47:07 2009
@@ -61,7 +61,7 @@
     -- For 18F4550 (and other 18F PICs ?): 0.7usec < Tad < 25usec
     -- So, honoring 16F88 values should do the trick for 18F4550, right ?
     -- We then just need to compute Tad from the highest possible clock  
value,
-   -- and decreasing until Tad interval is match.
+   -- and decreasing until Tad interval gives a match.

     -- Oh, I forgot ! clock selection bits can *2 or *3:
     --   - when bit*2: factor is 2, 8 or 32
@@ -78,7 +78,7 @@
     --       => ... and these are: ADCON1_ADCS, ADCON2_ADCS, ANSEL_ADCS
     --   - for p in `grep ADCON1_ADCS2 * | sed "s#:var.*##"`; do grep  
_ADCS[[:space:]] $p | awk '{print $3,$4}';done | sort -u
     --       => gives "bit*2 ADCON0_ADCS" so extra 3rd bit exists when  
ADCON0_ADCS is defined
-   -- Final note before code: when a third extra bit exists, if multiply  
by 2 the factor.
+   -- Final note before code: when a third extra bit exists, clock factor  
is multiplied by 2.
     -- This means without this 3rd bit, we have exactly the same  
distribution as for PICs with
     -- only 2-bits long ADCS.

@@ -101,12 +101,12 @@
          const bit ADC_ADCS_BIT_SPLIT = false
     end if
     if defined(ADCON2_ADCS) == true then
-         var volatile bit*2 jallib_adcs is ADCON2_ADCS
+         var volatile bit*3 jallib_adcs is ADCON2_ADCS
          const byte ADC_ADCS_BIT_LONG = 3
          const bit ADC_ADCS_BIT_SPLIT = false
     end if
     if defined(ANSEL_ADCS) == true then
-         var volatile bit*2 jallib_adcs_lsb is ANSEL_ADCS
+         var volatile bit*3 jallib_adcs_lsb is ANSEL_ADCS
          const byte ADC_ADCS_BIT_LONG = 3
          const bit ADC_ADCS_BIT_SPLIT = false
     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
-~----------~----~----~----~------~----~------~--~---

Reply via email to