Author: robhamerling
Date: Wed Jun 17 09:16:04 2009
New Revision: 1039

Modified:
    trunk/doc/html/devicefiles.html

Log:

Update and some text enhancements



Modified: trunk/doc/html/devicefiles.html
==============================================================================
--- trunk/doc/html/devicefiles.html     (original)
+++ trunk/doc/html/devicefiles.html     Wed Jun 17 09:16:04 2009
@@ -237,23 +237,29 @@
  As a rule the device files use the names as used by the datasheets.
  However the device files have been generated from the MPLAB information
  files, not the datasheets!
-Therefore it is possible that some names may not be conform the datasheet.
-When you find  such a deviation, please report to the Jallib team!
+So it is possible that some names may not be conform the datasheet.
+When you find such a deviation, please report to the Jallib team,
+and most likely the next release will contain the corrected name.

  <p>For all registers of the chip a name is declared and where appropriate
  also the individual bits or groups of bits are declared.
-Also some aliases are declared for easy the migration or conversion of
+<br>Subfields of registers have the name of the register as prefix, like
+<pre>
+  var volatile bit  INTCON_GIE  at INTCON : 7
+</pre>
+<br>Some aliases are declared for easy migration or conversion of
  existing JalV2 libraries and programs to the Jallib environment.

-<p>There are also exceptions to the rules above.
+<p>There are exceptions to the rules above.
  For example the interrupt bits of Timer 0 are declared as TMR0IE and
  TMR0IF for <b>all</b> devices, even though some datasheets use the names
  T0IE and T0IF.
  This is just an example, see below for more.
-<br>This 'normalization' is done to be able to use all libraries for all
-types of PICmicros.
-As side-effect also programs can be migrated to other types of PICs more
-easily.
+<br>The aim of this 'normalization' is:
+<ol>
+<li>to be able to use all libraries for all types of PICmicros
+<li>to ease the migration of programs to other types of PICs.
+</ol>


  <h3>PORTx and TRISx</h3>
@@ -296,7 +302,7 @@
  </pre>
  <p>The device files contain pseudo variables which mimic the existence
  of memory mapped registers,
-and now you can use statements like the one above.
+which makes it possible to use statements like the one above.
  <p>For example: even though a 16F59 has no addressable TRISC register,
  you can still specify:
  <pre>
@@ -319,6 +325,8 @@
     PORTA_low_direction = all_output  -- direction upper nibble unchanged
  </pre>
  <p>Several function libraries in the Jallib collection use this facility.
+<P>Note: Nibbles are always declared even if the register doesn't have the
+nibble fully populated (or not populated at all!) with pins.

  <h3>Names of MSSP modules</h3>
  <p>Names of registers of MSSP modules have been normalized as follows:
@@ -350,6 +358,24 @@
  </pre>
  </ul>

+<h3>Names of ADC modules</h3>
+<p>Names of registers and subfields of ADC modules have been normalized as  
follows:
+
+<p>When the ADCONx_VCFG subfield is a multi-bit field it is declared
+both as a multi-bit field ADCONx_VCFG and as enumerated bits
+(ADCONx_VCFG0 and ADCONx_VCFG1).
+
+<p>While most PICS with more than 8 ADC channels have a 4-bits subfield
+ADCONx_CHS, some PICs have the channel selection bits scattered over
+more than 1 subfield.
+For example the 16F7x7s have a 3-bits CHS field plus a single CHS3 bit
+to be able to support channel 8 and up.
+In this and similar cases a pseudo variable ADCON_CHS has been declared
+which takes care of the scattering of channel selection bits.
+So an ADC library can always address ADCONx_CFG as multibit 'binary' field,
+regardless if the bits are scattered over the register or not.
+
+
  <h3>Miscellaneous remarks about names</h3>
  <p>When you have used Jal before with other device files or libraries
  you may notice some differences in the naming convention:
@@ -358,8 +384,6 @@
      popular naming convention especially for PORT_A_low/high,
      PORT_A_direction, etc.
      For individual pins the convention 'pin_Ax' is used.
-<li>Subfields of registers have the registername as prefix, like
-    <br>var volatile bit  INTCON_GIE  at INTCON : 7
  <li>When you hit compile errors related to undefined names, scan the
      device files to search for 'our' name of the register or port.
  </ul>
@@ -415,7 +439,6 @@
  <pre>
    var bit led_red at portA : 0
  </pre>
-
  With this specification a 'led-red = on' will have the desired result, but
  it will not update the shadow register.
  Any next operation which uses the shadowing mechanism will override the
@@ -433,7 +456,7 @@
  <h2>Naming convention for configuration bits (fuses)</h2>

  <p>The configuration bits or groups of bits is such a large variety that it
-is almost impossible to obtain a naming convention which covers it all.
+is almost impossible to obtain a uniform naming convention.
  <ul>
  <li>For all implemented configuration bits an option name and two or more
  tags are defined, but the chosen names may not always be intuitive or

--~--~---------~--~----~------------~-------~--~----~
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