Closed GoogleCodeExporter closed 9 years ago
With version 0.0.50 of the Dev2Jal script every device file has a PIC specific
set of
default fuse settings. This should prevent verify errors with not so well
behaving
PIC programmers.
Original comment by robhamerling
on 12 Oct 2008 at 12:08
Although 'fixed' in Oct 2008, I have re-opened this issue because several
device files have default config bits settings which are not conform the
datasheet defaults.
Background info: The default config bits settings in the device files come from
a tools file devicespecific.cmd, which contains an entry for every PIC. When a
new PIC arrives a new set of parameters has to be added. This is typically
performed by 'copy-paste-modify', without an (automated) check with datasheet
or MPLAB, thus a possible source of errors.
It seems feasible to derive default config bits settings from the .dev files in
MPLAB. Will investigate....
Original comment by robhamerling
on 28 Mar 2012 at 6:55
For the record.
I'm working on an extension of the dev2jal script to collect the default config
bits settings from the MPLAB .dev files, which seems to work out fine.
The bad news:
While checking the preliminary results with the datasheets I found
contradictions in the datasheet itself. For example:
Take 39582B of the 16f87xa, page 144 (REGISTER 14-1). Above the bar with the
config bits you'll find 'U-0' for bit 12. At the bottom of the page you'll find
in the legend the meaning of this: U = Unimplemented bit, read as '0'.
Now look up on the same page the description for bit 12: Unimplemented: Read as
'1'.
So bit 12 is probably(!) unimplemented, but does it read as '0' or as '1'???
Or does Microchip a different logic than I'm used to?
And this is just an example, several other datasheets have similar
'contradictions'.
Worse: in several MPLAB .dev files (latest version) I found several occasions
where other bits are specified as Unimplemented (Unused) than the datasheet
tells me...
The good news:
My exercise shows that the extended script will correct many errors in the
default config bits settings (at least for the implemented bits, but also for
unimplemented bits!).
... to be continued ...
Original comment by robhamerling
on 30 Mar 2012 at 1:10
I added a procedure to the dev2jal script to derive default configuration bits
settings from MPLAB .dev files. Because of the issues described above in
comment 3, I kept it possible to specify an alternative setting in
devicespecific.json, which will override the derived settings. For by far the
most PICs the derived setting matches the datasheet specifications, randomly
checked with several datasheets. Therefore the old specification in
devicespecific.json has been removed, except for a number of PICs for which the
derived specification from MPLAB seems not completely correct.
Original comment by robhamerling
on 2 Apr 2012 at 12:16
More checks showed that the default configuration bits settings as of Revision
3019 (derived from the MPLAB .dev files, partly overridden by an alternative in
devicespecific.json)) are OK.
When faulty or inconvenient settings reported devicespecific.json will be
modified accordingly. No need to open a new issue or reopen this issue.
Original comment by robhamerling
on 6 Apr 2012 at 10:10
Original issue reported on code.google.com by
robhamerling
on 10 Oct 2008 at 11:08