Hi guys,

 From the beginning I have been struggling with the large variety of 
names Microchip used in MPLAB for the configuration words, especially to 
specify Oscillator configurations. The main cause of these variety is 
that MPLAB doesn't use *names*, like in the datasheets, but a 
*description*, which can be a few letters, like HS, XT, or EC but not 
infrequently also whole sentences, like:

  EC OSCILLATOR, CLKOUT FUNCTION ON OSC2 (MEDIUM POWER, 160 KHZ - 4 MHZ)

These descriptions may differ only in a few characters or can look 
totally different, while these are the same. Example:

> INTERNAL OSCILLATOR BLOCK, CLKOUT FUNCTION ON RA6, PORT FUNCTION ON RA7
> INT RC-CLKOUT ON OSC2

In these descriptions (from different PICS) it is totally irrelevant for 
the fuse_def specification which is clock output pin and which the I/O 
pin. Therefore these descriptions could both be specified as:

  INTOSC_CLKOUT

In the current dev2jal script I parse the description and try to catch 
synonyms. But I'm not satisfied: it doesn't catch all variations and as 
a result the device files contain very complicated OSC names!
I'm now experimenting with a different method. I build a table with all 
descriptions and assign (manually!) a normalized name to each 
description. This name will replace the MPLAB description.  It is a 
one-off job which requires some more datasheet reading, and the table 
has to be maintained manually when descriptions change or new PICs 
appear in MPLAB, but I think it is worth the effort.

Although 'fuse_def OSC' has the most variations some other configuration 
bits have a similar issue. I'll design the mentioned table such that it 
can also be used for other fuse_def keywords.

The result of this will definitely be that current samples with fuse_def 
specifications will have to be adapted for the new names. We'll let 
Seb's robot do the detection!

Same applies to your own private programs: you have been warned!

Regards, Rob.


-- 
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

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