How to use the Microchip XPRESS drag and drop bootloader with MCSP


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default How to use the Microchip XPRESS drag and drop bootloader with MCSP

    The previous version of the MikroE PIC Clicker 2 for 18F67K40 had the standard FTDI USB to serial IC and the 67K40 came pre-programmed with a serial bootloader so you can use bootloader application provided by MikroE to program it.

    A short while ago they released an updated version of this board which, instead of the FTDI chip, comes with a PIC16F1454 acting as the USB to serial chip. The main CPU still comes with the serial bootloader pre-programmed so you can use the serial bootloader if you wish. No need to worry about CONFIG bits since that's part of the bootloader, just DEFINE OSC 64 and away you go.

    But the cool thing is that when you plug this new board in to the PC it not only shows up as a serial port, it also shows up as a mass storage device. Here you can see it showing up as D: with a label XPRESS on my system (I appologize for the Swedish screenshot but you get the idea).


    Name:  Clicker 2 - 1.PNG
Views: 197
Size:  10.1 KB


    All you need to do to program the 18F67K40 is to drag and drop your .hex file onto this device - done - and it's fast.

    We can tell MicroCodeStudio to automatically copy the file onto the device after successful compilation. To do this we need to go to View->Compile and Program Options and Add New Programmer. I labeled mine XPRESS Drag & Drop Bootloader but you can obviously call it anything you want. Since we want to do a basic file copy the Programmer Filename will be xcopy.exe and this is usually located in c:\windows\system32 but just click Find Automatically and MCSP will find it for you.

    Next is the parameters we need to pass to xcopy. I used /Y $long-hex-filename$ D:\ where the /Y tells xcopy not to ask us if we want to overwrite an existing file with the same name, the $long-hex-filename$ is the MCSP variable for the path and filename of our .hex file and D:\ is the destination path. You obviously need to match the destination path to however your system is configured, it only happened to be D:\ on my system.

    WARNINGS:
    Once you drag/drop a file onto the device it will overwrite the bootloader that originally was on the 67K40. I don't know if a simple DEFINE LOADER_USED would have saved it but at this point I don't really care because this method is SO much faster than messing around with the serial bootloader. The USB to serial bridge will still work (the board still shows up as a serial port on the PC) but the bootloader is no longer there. If you want the bootloader back MikroE provides the .hex file for it so you can use any device programmer to get it back into the 67K40.

    If you're using detachable harddrives and USB sticks (who doesn't) it's possible that the next time you plug the Clicker 2 into the PC it shows up as another drive letter which obviously makes MCSP tell xcopy to copy the .hex file to the wrong destination. Likely not the end of the World but might be slightly confusing until figured out.

    /Henrik.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default Re: How to use the Microchip XPRESS drag and drop bootloader with MCSP

    Very nice Henrik, thanks for sharing! (Though I could not find that board...)

    Ioannis
    Last edited by Ioannis; - 28th December 2017 at 13:57.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: How to use the Microchip XPRESS drag and drop bootloader with MCSP

    Here it is: https://www.mikroe.com/clicker-2-pic18fk
    Digikey is carrying MikroE's products but they don't seem to have this one yet. It's also unfortunate that they named it the same as the old one so if you find it at a distributor you have to ask which revision of the board it is if you want the one acting as a composite device.

    /Henrik.

Similar Threads

  1. MCSP and ICD2 Microchip
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th January 2008, 13:37
  2. Microchip Bootloader and Interrupts
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th May 2007, 01:11
  3. Bootloader,MCSP and Serial communication
    By surfer0815 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd March 2006, 11:52
  4. MCSP Bootloader Parameters
    By CocaColaKid in forum General
    Replies: 0
    Last Post: - 19th September 2005, 19:15
  5. MCSP BootLoader and Configuration Fuses
    By CocaColaKid in forum General
    Replies: 1
    Last Post: - 23rd August 2005, 15:42

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts