Menu

How to create bootloader for PIC16F1829

Waldo
2024-01-22
2024-01-23
  • Waldo

    Waldo - 2024-01-22

    Hello, all! I´d like to create a bootloader for a PIC16F1829, but I have no clue how to do it.
    Is there a place where I have to download the firmware, or a software that I must use to configure the source
    code?
    Please, help me, I´m trying very hard to understand how Tiny Bootloader works!

     
    • Anobium

      Anobium - 2024-01-23

      I have replaced the complexity of writing the bootloader with an application. The application essentially does this.

      1. Determines chip and the chip parameters from the GCBASIC reference/compiler files.
      2. Determines the parameters like freq, bps etc
      3. Determines TinyBootLoader+ chip ID. This is based on memory and HEF/SAF sizes,
      4. Determine the chip memory architecture and chip family. There are three difference chip family and six different memory architectures across all the PICs. Some of the memory architectures require buffer writes and some do not.
      5. Setup the oscillator
      6. Setup the USART and the PPS, if defined.
      7. Setup to variables and memory space

      At this point the program is ready to accept data.

      1. Receive the chip type from the application. Respond using byte determined at #4 above, or exit
      2. Receive address data byte, length of packet and data type or if timeout then exit.
      3. Receive data byte, or if timeout then exit.
      4. Depending data type write received data to PROGMEM or EE , or, buffer.
      5. If at end of packet and using buffer, write received data in buffer to PROGMEM or EE
      6. Send checksum to application.
      7. Repeat from #2 above until time out ( no data arriving ).

      https://www.youtube.com/watch?v=NgVbc-LsF7k


      Writing this is ASM is not that way to do this anymore. I wrote many bootloaders using the ASM then I wrote the solution in the video.

      A bootloader needs to be consistent and reliable. And, the method in the video provides these.

      Ping me on pickitplus AT anobium DOT co DOT UK

       

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.