• AVR Freaks

Hot!PIC18F4580 CAN bootloader

Author
Eugeniu
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2020/05/05 04:07:52
  • Location: 0
  • Status: offline
2020/05/06 01:15:51 (permalink)
4 (1)

PIC18F4580 CAN bootloader

Hello everyone,
I have a system with a CAN Network. Each of the nodes has a PIC18F4580 MCU. According to AN247 and MCU datasheet, there is a memory space special for the bootloader. Except AN247 I couldnt really find any tutorials or examples how to implement a CAN bootloader. Can you please help me with this implementation ? I have several questions:
Is the bootloader usually loaded with the factory firmware?
How can I load a bootloader firmware in that part or the memory, as far as it is write protective?
Can I find somewhere the source code of the bootloader described in AN247? According to documentation, the source code should be on the microchip web site.
Can you please suggest some more information about implementing a CAN bootloader on this MCU?
 
Thank you in advance.
 
 

Attached Image(s)

#1

17 Replies Related Threads

    Danno
    Super Member
    • Total Posts : 288
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/07 16:00:15 (permalink)
    0
    This thread suggests it was removed for cause: https://www.microchip.com/forums/m347502.aspx
     
     
    #2
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC18F4580 CAN bootloader 2020/05/07 18:14:34 (permalink)
    +1 (1)
    Danno
    This thread suggests it was removed for cause: https://www.microchip.com/forums/m347502.aspx

    Reading between the lines, I suspect a vac student did the work, and disappeared before anyone noticed it didn't work.
    MC don't appear interested in finishing the job.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 18858
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC18F4580 CAN bootloader 2020/05/07 19:02:51 (permalink)
    0
    Does MCC or EZBL have a CAN Bootloader?
    #4
    Eugeniu
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/05/05 04:07:52
    • Location: 0
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 00:11:37 (permalink)
    0
    Hi all, thank you for replying to my post.
    Can you please suggest a way to contact the microchip support via a ticket or an email?  I couldnt find any link related to this.
    I want to ask them directly if they provide some valid documentation about a CAN bootloader.
    #5
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC18F4580 CAN bootloader 2020/05/08 00:21:53 (permalink)

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #6
    crosland
    Super Member
    • Total Posts : 2017
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 04:24:23 (permalink)
    0
    The code is included in AN247 https://www.digikey.co.uk/en/pdf/m/microchip-technology/an247-a-can-bootloader-for-pic18f-can-microcontrollers . You will need to cut and paste it and maybe reformat it a bit.
     
    It works fine for me, but I have modified it to fit my needs, and ported it to C. I don't know what the supposed bugs are.
    #7
    David
    Pic User
    • Total Posts : 1307
    • Reward points : 0
    • Joined: 2007/12/17 23:19:53
    • Location: uk sussex
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 06:45:58 (permalink)
    0
    Following
     

    David
    I support http://picforum.ric323.com because this forum is often too broken to use!
    #8
    crosland
    Super Member
    • Total Posts : 2017
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 12:46:15 (permalink)
    0 (2)
    David
    Following
     


    Did you mean to type a whole sentence?
    #9
    Danno
    Super Member
    • Total Posts : 288
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 13:41:53 (permalink)
    +3 (3)
    MCC does not support CAN but the memory interface layer is completely separate from the communication layer.  So if you can write your own CAN layer, you can replace the UART code and it'll work.
     
    Unfortunately MCC doesn't support PIC18F4580, but the newer PIC18F45K80 is.  You might be able to generate a bootloader for that device, then modify it for the older part and replace the UART code with CAN code.
     
    $.02
    #10
    David
    Pic User
    • Total Posts : 1307
    • Reward points : 0
    • Joined: 2007/12/17 23:19:53
    • Location: uk sussex
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 17:08:58 (permalink)
    0 (2)
    crosland
    David
    Following
     


    Did you mean to type a whole sentence?


    My post was helpful to me, who did you help ?

    David
    I support http://picforum.ric323.com because this forum is often too broken to use!
    #11
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC18F4580 CAN bootloader 2020/05/08 17:28:45 (permalink)
    +2 (2)
    David, I'm sure crosland wasn't being derogatory. He just asked if this was the start of a question, that somehow got cut off.
     
    My guess is you posted that just to start following this topic, i.e. to get notifications when anyone posts an answer.
    You can do that by simply clicking the "Subscribe to this thread" link at the top of the thread.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #12
    David
    Pic User
    • Total Posts : 1307
    • Reward points : 0
    • Joined: 2007/12/17 23:19:53
    • Location: uk sussex
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/08 18:10:45 (permalink)
    +1 (1)
    May be I was being too sensitive :) .. been fighting my ASM code for a few days and its winning at present.
    This should be a friendly place.. 
    So I am sorry for sounding a bit rude. 

    David
    I support http://picforum.ric323.com because this forum is often too broken to use!
    #13
    Eugeniu
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/05/05 04:07:52
    • Location: 0
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/11 00:22:37 (permalink)
    0
    Thank you all for information, it si really helpful.
    #14
    crosland
    Super Member
    • Total Posts : 2017
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/11 05:14:39 (permalink)
    0
    David
    crosland
    David
    Following
     


    Did you mean to type a whole sentence?


    My post was helpful to me, who did you help ?


    See post #7
    #15
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC18F4580 CAN bootloader 2020/05/11 05:25:52 (permalink)
    0 (2)
    Misunderstanding. David apologised in post#13

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #16
    David
    Pic User
    • Total Posts : 1307
    • Reward points : 0
    • Joined: 2007/12/17 23:19:53
    • Location: uk sussex
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/05/12 19:07:14 (permalink)
    0
    do I ? LOL

    David
    I support http://picforum.ric323.com because this forum is often too broken to use!
    #17
    Eugeniu
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/05/05 04:07:52
    • Location: 0
    • Status: offline
    Re: PIC18F4580 CAN bootloader 2020/07/02 01:20:03 (permalink)
    +1 (1)
    Hi everyone, finally I was able to use the code from AN247, with some minor changes related to my specific project.
    So I made an assembly project in mplab x ide with this code. Then I changed it a bit according to my requirements, defined it to work with "self verified" logic, so only with an unidirectional communication. Then I linked it to my basic application, there are documentation about this provided by microchip as well. For the firmware update procedure, an application was developed in Java to send data to the device according to AN247.
    Works fine for me.
    post edited by Eugeniu - 2020/07/02 01:21:52
    #18
    Jump to:
    © 2020 APG vNext Commercial Version 4.5