element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum programming hex file for PIC18F26J50-EVK vs separate IC
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 10 replies
  • Answers 5 answers
  • Subscribers 302 subscribers
  • Views 1287 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

programming hex file for PIC18F26J50-EVK vs separate IC

wimbloemendal
wimbloemendal over 6 years ago

Hi,

I have used several times the PIC18F26J50-EVKPIC18F26J50-EVK development kit. Nice thing about it that it can program it self. That is press S1 (pin RC0) during power on, and it will be recognized by the "Microchip PIC18 Starter Kit for Flowcode from Element14" bootloader. Now I wonder if I buy the uproc as 'standalone' component, will I be able to program it the same way? (Having a S1 connected to RC0 in my own made design). Or do I need a separate programmer?

regards,

_Wim_

  • Sign in to reply
  • Cancel

Top Replies

  • wimbloemendal
    wimbloemendal over 6 years ago in reply to koudelad +1
    Hmm, I was afraid for that. So I need a separate programmer + the appropriate hex file. Alternative is to buy the EVK kits, and take out the (preprogrammed) IC... Any programmer from element14 for this…
  • wimbloemendal
    wimbloemendal over 6 years ago +1
    Just to complete this thread.. Meanwhile I ordered & received the PICkit4 programmer. I downloaded and installed MPLAB X IDE v5.1.0, and imported the hex file https://www.element14.com/community/docs/DOC…
  • koudelad
    0 koudelad over 6 years ago

    Hello,

     

    The mentioned PIC in the kit contains a preprogrammed HID bootloader from factory. It is a firmware bootloader, not hardware. If you buy a new chip, it will arrive blank and you would need a separate programmer to program the PIC with the same firmware. (I guess there is some default firmware available for download at some product page).

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • wimbloemendal
    0 wimbloemendal over 6 years ago in reply to koudelad

    Hmm, I was afraid for that. So I need a separate programmer + the appropriate hex file. Alternative is to buy the EVK kits, and take out the (preprogrammed) IC...

    Any programmer from element14 for this device you can recommend? And then where to get the default firmware.. Or would a "Read Device" and "Export Hex" from an EVK kit will do the job..!?

    Thanks for your response,

    _Wim_

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • koudelad
    0 koudelad over 6 years ago in reply to wimbloemendal

    You are right.

     

    If you need just one device, buying the development kit one more time is the cheapest option.

     

    If you plan some more work with PIC devices, I recommend using a separate programmer. The newest official low cost programmer is PICkit4. https://uk.farnell.com/microchip/pg164140/in-ckt-debugger-programmer-pic/dp/2840654?st=pickit

     

    The last PICkit I used was PICkit2 and it was compatible with the Microchip's IDE: MPLAB (now named MPLAB X). This programmer also had a standalone application that allowed reading and cloning a PIC device. I hope the newest PICkit4 is capable of doing that too, but I would rather someone else (actually owning the programmer) confirming it.

     

    Regarding the firmware file: I couldn't find any information about on the Microchip website, however, there is at least a manual for this kit here on element14 (maybe also other resources?) Microchip: User Manual for PIC18F26J50-EVK Flowcode Development Kit . Chapter 6.2 mentiones downloading a sample hex file, so I guess there was some CD supplied with this kit, that contained the file.

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • wimbloemendal
    0 wimbloemendal over 6 years ago in reply to koudelad

    The PICkit4 is indeed a good idea, cheap enough, even if I would use a few components. However I'm getting a little confused about the firmware (hex) file. If I create a simple program through Flowcode and write that to the target chip, the result is that somehow the target includes (again) the bootloader to allow to program again, and again, etc. I can even choose to 'Erase Device', and still this bootloader is available in the device! So is this 'bootloader' somewhere stored in a hidden area?! Or is this bootloader automatically added with the "HID Bootloader" program? Or what?

     

    _Wim_

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • koudelad
    0 koudelad over 6 years ago in reply to wimbloemendal

    This is a usual practice with bootloaders and their "special" software. If you use the software supplied with the kit, it never really erases the bootloader, it uses the bootloader to program the target device (or erase the user program memory) - but never the bootloader itself.

     

    On the other hand, if you erase the chip using the MPLAB X (or some PIC programmer software) using the PICkit (or another HW programmer) directly, it would erase the whole chip, including the bootloader. It couldn't be revived using the kit software, but only after programming the bootloader again, using the HW programmer.

     

    I hope I didn't confuse you even more.

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • koudelad
    0 koudelad over 6 years ago in reply to wimbloemendal

    Have a look at this Microchip's description or their bootloader generator and some general principles:

    https://www.microchip.com/promo/8-bit-bootloader

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • wimbloemendal
    0 wimbloemendal over 6 years ago in reply to koudelad

    Hi David,

    I think I understand what you're saying, although the matter is pretty complicated (to me). So if I understand correctly, if I order the PICkit4 programmer, I can at least program a new blank chip with my application written with Flowcode. Although I assume now that this will be without a bootloader to allow self-programming. As such not really a big issue for me, although the self-programming feature would be handy...

    I found however Microchip: Firmware for PIC18F26J50-EVK FLOWCODE Development Kit (.hex file) … I wonder if this would include the demo application + bootloader. So if I program a new blank chip initially with this hex file (using the PICkit14), I end up with a PIC with self-programming capability..!?

    Of course on my PCB I must add a ICSP connector to be able to connect to the PICkit4, something I would not require for self-programming.. It's kind of chicken & egg story I guess!? :-)

    Thanks you very much for your support,

    _Wim_

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • koudelad
    0 koudelad over 6 years ago in reply to wimbloemendal

    Oh, that is great you have found the firmware file. It is exactly as you write - there are two possibilities - it is only some default program for showcase (without bootloader), or it is a full firmware file with bootloader (and optionally with some application).

    Bootloaders usually (but not always) need to be programmed using an external programmer.

     

    Either way, if you buy a standalone programmer like PICkit4, you are able to program the chip even if you bought a chip with blank memory (in that state are all the microcontrollers sold by default). Then you should be able to clone the program memory from the chip in the development kit you already have. Or upload the firmware you found and see whether it works like the chip in the development kit, or not.

     

    I am not familiar with Flowcode, but does it give you somewhere an option to create an output hex file with or without the bootloader? By default it obviously generates just a program that can be uploaded by the bootloader supplied with the kit (the bootloader was programmed by the manufacturer).

     

    Think of a bootloader of just a piece of program that is able to program the rest of the flash memory. If you power up the microcontroller, it is the first piece of code that starts and its purpose is to check whether there is a request for a new program upload. If not, the user program runs (if there is any).

    It has some advantages and disadvantages.

    Advantages:

    • it is "free" in terms of HW - you don't need additional chip (like in PICkit4) to program the microcontroller.

    Disadvantages:

    • you sacrifice some program memory for the bootloader, so your program can't be as big as if you programmed with a programmer on a bare chip.
    • It also takes some time, before the user program runs (as explained above).
    • If the bootloader has to capability of reprogramming itself, you might somehow be able to corrupt the bootloader, which is irrecoverable without an external programmer.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • wimbloemendal
    0 wimbloemendal over 6 years ago

    Just to complete this thread.. Meanwhile I ordered & received the PICkit4 programmer. I downloaded and installed MPLAB X IDE v5.1.0, and imported the hex file

    https://www.element14.com/community/docs/DOC-60720/l/microchip-firmware-for-pic18f26j50-evk-flowcode-development-kit-hex-file. Result was that the only the self programming feature was running. Now I could use the HID bootloader, as supplied with the evaluation board, and load my own user code. (And most likley, havent tried yet, use the 'internal' programmer from Flowcode).

    So I'm now able to program fresh PIC18F26J50 once with the PICkit4, and continue working with these components with Flowcode & HID Bootloader as usual.

    Thanks David!

    regards,

    _Wim_

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • koudelad
    0 koudelad over 6 years ago in reply to wimbloemendal

    Thank you for the great news. I am glad I could help.

     

    The standalone programmer will be handy also in case you want to try "bare metal" programming.

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube