Menu

Updated Chipfiles

Anobium
2019-07-31
2020-09-04
  • Anobium

    Anobium - 2019-07-31

    16f1512, 16f1513,16f1516, 16f1517, 16F1518, 16F1519, 16F1526 and 16F1527 chipfiles updated to support internal frequencies.

    These will be included in future releases.

    New commit [r949] by evanvenn

     

    Related

    Commit: [r949]

  • SPostma

    SPostma - 2020-09-03

    I spotted a small bug in two chipfiles: 16f570.dat and 16f527.dat

    Both contain a line FamilyVariant=1 to signify a PIC16F1xx device with 64 RAM pages
    (having an alternative MOVLB encoding of "00 0001 01kk kkkk" instead of 00 0000 001k kkkk).

    The FamilyVariant=1 line should be deleted for these two chips IMHO.

    By the way, all devices with FamilyVariant=1 always have (WREG_SHAD >= 8165),
    so this FamilyVariant property could be detected automatically.

     
    • Anobium

      Anobium - 2020-09-03

      Looks correct to me.

        'Add family variant where needed
        ChipFamilyVariant = 0
        If ChipFamily = 12 Then
          '16F527 and 16F570 chips have some extra instructions, can detect with presence of IBSR register
          If HasSFR("IBSR") Then
            ChipFamilyVariant = 1
          End If
        ElseIf ChipFamily = 15 Then
          If HasSFRBit("BSR5") Then
            ChipFamilyVariant = 1
          ' Removed next two lines at thes 16f15325 and other chips that need ChipFamilyVariant = 1 are less than 2048 - errant warning
          ' ElseIf ChipRAM >= 2048 Then
          '  Print "Warning: BSR5 detection may have failed, movlb may be broken"
          End If
        ElseIf ChipFamily = 16 Then
          '18F chips with 4096 or more data addresses have movffl and different lfsr instruction
          If MaxChipAddress >= 4096 Then ChipFamilyVariant = 1
        End If
      

      It this FAMILY is detected automatically. Can you see an oversight?

       
  • SPostma

    SPostma - 2020-09-03

    I spotted another FamilyVariant typo in file 16f19197.dat,
    I see WREG_SHAD,8165, so 64 RAM pages, but the FamilyVariant=1 line is missing!

    Please add FamilyVariant=1 in 16f19197.dat ..

     
    • Anobium

      Anobium - 2020-09-03

      The code shown above are the rules. Are the rules incorrect?

       
      • SPostma

        SPostma - 2020-09-03

        I think I caused trouble here; I see that my 16f19197.dat file is from 21 december 2018.
        Sorry for troubling you again!

         
  • SPostma

    SPostma - 2020-09-03

    Sorry for wasting your time, Evan!
    I thought that ChipVariant=1 only indicated the new movlb instruction encoding for 16F1xx devices. I learn every day! ;-)

     
    • Anobium

      Anobium - 2020-09-04

      Not a problem. Here are the notes from the developer guide.

      FamilyVariant is to handle chips that have added instructions and need different treatment in the assembler. It is used for 3 PIC families where some chips have added instructions not found in most. The default value is 0, but it can be set to anything as shown below.

      Family FamilyVariant values
      12 0: Default
      1: Newer chips (16F527, 16F570) which have movlb, return and retfie instructions.
      14 Not used
      15 0: Default
      1: Chips with more RAM that have an extra bit for the bank in the movlb instruction (6 bits rather than 5)
      16 0: Default
      1: Chips with more RAM (K42 and K83 series) that have a movffl instruction and 2 more bits for the address in the lfsr instruction. Controls Automatic Context Save during interrupts for K42 and K83 with MVECEN = OFF, the EEPROM base address at 0x31000
      AVR: Not used, although the HardwareMult parameter has a similar role in identifying which chips have a hardware multiplier.

      FamilyVariant is exposed as ChipFamilyVariant. This is NOT use within any libraries. And, to my knowledge is ONLY used within the compiler.

      FamilyVariant IS used within the compiler. The chipfamily (shown in column #1 above) will determine the method the compile users to address using the correct ASM instructions that are specfic to a chip family.

      Hope this helps.

       

      Last edit: Anobium 2020-09-04

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.