Menu

Problem with latest chipdata

2009-08-03
2013-05-30
  • Nobody/Anonymous

    There is a problem with OPTION register bits in the chipdata files for 16F627 and 16F628 (and maybe others) .  After several frustrating hours and assembler errors related to OPTION, I saw that the chipdata file defines OPTION_REG with its numerical address, then the bits are defined as OPTION.x, where they should be defined as OPTION_REG.x.
    --Bert

     
  • Nobody/Anonymous

    I still don't see any corrections to the chipdata files, so I searched the whole folder and found the following problems with the current data files:

    1. There are 81 .dat files that have the register number defined as "OPTION_REG.x", but the corresponding register bits in the file are defined as "yyy,OPTION,z".  I batch edited them so the register bits are now "yyy.OPTION_REG.z".(I would have attached the corrected files but I don't think I can.  Notepad++ can do the batch find/replace).

    This was what caused the assembler errors I reported above; I only now found out how many of the .dat files had this typo in them.

    1. The following .dat files have register bits defined in the bits section, but no corresponding register number.  I don't use these chips, so I don't know the proper register number (most chips seem to be OPTION_REG,129).  They all also use OPTION, not OPTION_REG for the bits so should be updated accordingly.

    16C52, C54, c54a, c54b, c54c, c55, c55a, C56, c56a, C57, c57c, C58, c58a, c58b,
    16cr54, cr54a, cr54b, cr54c, cr56, cr56a, cr57a, cr57b, cr57c, cr58a, cr58b,
    16f54, f57, f59, f5x,
    16hv540

    1. The following .dat files have duplicate entries for the same register bit:

    16f630 Line 96: NOT_GPPU,OPTION_REG,7, and Line 97: NOT_RAPU,OPTION_REG,7
    16f676 Line 110: NOT_GPPU,OPTION_REG,7, and Line 111: NOT_RAPU,OPTION_REG,7

    The other 481 files in the chipdata folder don't seem to have any problems with the OPTION register.

    -Bert

     
  • Hugh Considine

    Hugh Considine - 2010-02-06

    Sorry, my bad, thanks for the reminder!

    I've had a couple of other emails about the OPTION/OPTION_REG problem in the last week, all involving the '628. I didn't realise how widespread the problem was until a couple of days ago. The affected chip data files should all now be fixed in the latest update.

    The 16x5 chips don't actually have a CONFIG register like the other PICs. Their CONFIG register is write only, and is set by loading a value into W and then executing the config instruction. The only way to set these at present is with inline assembly, though if this is a problem for anyone I can look at creating an OPTION_REG register on these chips the same way that the latest revisions of GCBASIC deal with the tris registers on 16x5 chips.

    The duplicate names for the same bit isn't too major an issue either, there are quite a few places where that happens. (The A/D converter start bit has several names, typically GO, GO_DONE, and/or NOT_DONE!)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.