Menu

PIC18 firmware commentary

Dan
2018-04-21
2018-12-08
  • Dan

    Dan - 2018-04-21

    Hi,
    I created a firmware with shorter code than before, so I will explain it.
    Includes k42 pps and new serial.

    Best regards
    Dan

     

    Last edit: Dan 2018-04-21
  • Ayinde Olayiwola

    Hi Dan, i have been trying for months on increasing the TinyBootloader size from 100words to about 200words for PIC18, what do i need to change in the code and PC Software?

    Thank you

     
  • Anobium

    Anobium - 2018-05-24

    Why?

     
  • William Roth

    William Roth - 2018-12-08

    The bootloader size can be increased by modifying the the ASM. For example with the PIC18F25K42 change this line from :

       #define first_address max_flash-200
       to
      #define first_address max_flash-392
    

    Then rebuild the project in MPLABX (ver 4.05)

    You should then edit the piccodes.ini file to reflect the change .

    The bootloader will now be located at address 0x7E80 and will have room for additional code if needed

    From the original 200 bytes the size can be incremented in steps
    of 64 bytes (32 Words) so 264, 328, 392, 456, etc should all be valid.

    It may be significant to note that TBL firmwares will all fail to build with newer version s of MPLABX / MPASMX. This is becasue these newer versions do not allow the use of cnt1, cnt2, cnt3, rpt1, or rpt2 as variables or labels.

    To use MPLABX 5.xx change these variables/labels in the ASM to something else. Then rebuild.

    William

     

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.