MicroCode Studio Plus - adding Easypic5 as programmer


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2009
    Location
    England
    Posts
    17

    Default MicroCode Studio Plus - adding Easypic5 as programmer

    I have an Easypic5 board that I purchased before deciding to buy PBPro. I would like to use the Easypic5 on board USB programmer with MCS+ if possible. I have found reference here to adding PICkit 2 as an additional programmer (under Wiki as below) but don't understand the final entry "pPIC$target-device$ -f$hex-filename$ -M -R -T -h2"

    Grateful for any advice

    Thanks

    David

    Wiki reference:-

    In Microcode Studio View | Compile and Program Options... | programmer tab,
    click Add New Programmer, select "Create a custom programmer entry" then click "Next".
    Enter any name you wish to call it and click "Next".
    Enter pk2cmd.exe as the "Programmer Filename" and click "Next".
    Click the "Find Manually" button and point it to C:\Program Files\Microchip\PICkit 2 v2 and click "Next".
    Enter this parameter line

    -pPIC$target-device$ -f$hex-filename$ -M -R -T -h2

    Then click Finished.

    Pressing Compile and Program or F10 in MicroCode Studio will now do it all.

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    When you add your Pickit2 as a programmer for MCS, you get to a window that lets you add parameters. Here is that window:

    Name:  programmer.PNG
Views: 1173
Size:  30.7 KB

    I have not heard of anyone trying to add the USB programmer for the EasyPic board, but let us know how it goes.

    Walter

    Edit:
    Well, seeing as the wiki example has it laid out with pictures http://www.picbasic.co.uk/forum/cont...Line-Interface
    I take it you want an understanding of what the line command does.

    The pickit2 has command line options, which allow you to control it using text.

    Here is a list:
    Code:
    9. Command Line Options
    ----------------------------------------------------------------------------
    The following commands are available in the command line interface.
    
                              PICkit 2 COMMAND LINE HELP
    Options              Description                              Default
    ----------------------------------------------------------------------------
    A<value>             Set Vdd voltage                          Device Specific
    B
                  Specify the path to PK2DeviceFile.dat    Searches PATH
                                                                  and calling dir
    C                    Blank Check Device                       No Blank Check
    D<file>              OS Download                              None
    E                    Erase Flash Device                       Do Not Erase
    F<file>              Hex File Selection                       None
    G<type><range path="">  Read functions                           None
                         Type F: = read into hex file,
                                 path = full file path,
                                 range is not used
                         Types P,E,I,C: = ouput read of Program,
                                 EEPROM, ID and/or Configuration
                                 Memory to the screen. P and E
                                 must be followed by an address
                                 range in the form of x-y where
                                 x is the start address and y is
                                 the end address both in hex,
                                 path is not used
                                 (Serial EEPROM memory is 'P')
    H<value>             Delay before Exit                        Exit immediately
                             K = Wait on keypress before exit
                             1 to 9 = Wait <value> seconds
                                      before exit
    I                    Display Device ID & silicon revision     Do Not Display
    J<newlines>          Display operation percent complete       Rotating slash
                             N = Each update on newline
    K                    Display Hex File Checksum                Do Not Display
    L<rate>              Set programming speed                    Fastest
                         <rate> is a value of 1-16, with 1 being
                         the fastest.
    M<memory region="">     Program Device                           Do Not Program
                         memory regions:
                             P = Program memory
                             E = EEPROM
                             I = ID memory
                             C = Configuration memory
                             If no region is entered, the entire
                             device will be erased & programmed.
                             If a region is entered, no erase
                             is performed and only the given 
                             region is programmed.
                             All programmed regions are verified.
                 (serial EEPROM memory is 'P')
    N<string>            Assign Unit ID string to first found     None
                         PICkit 2 unit.  String is limited to 14
                         characters maximum.  May not be used
                         with other options.
                         Example: -NLab1B
    P
                  Part Selection. Example: -PPIC16f887     (Required)
    P                    Auto-Detect in all detectable families
    PF                   List auto-detectable part families
    PF<id>               Auto-Detect only within the given part
                         family, using the ID listed with -PF
                         Example: -PF2
    Q                    Disable PE for PIC24/dsPIC33 devices     Use PE
    R                    Release /MCLR after operations           Assert /MCLR
    S<string #="">          Use the PICkit 2 with the given Unit ID  First found unit
                         string.  Useful when multiple PICkit 2
                         units are connected.
                         Example: -SLab1B
                         If no <string> is entered, then the
                         Unit IDs of all connected units will be
                         displayed.  In this case, all other
                         options are ignored. -S# will list units
                         with their firmware versions.
                         See help -s? for more info.
    T                    Power Target after operations            Vdd off
    U<value>             Program OSCCAL memory, where:            Do Not Program
                          <value> is a hexidecimal number
                          representing the OSCCAL value to be
                          programmed. This may only be used in
                          conjunction with a programming 
                          operation.
    V<value>             Vpp override                             Device Specific
    W                    Externally power target                  Power from Pk2
    X                    Use VPP first Program Entry Method       VDD first
    Y<memory region="">     Verify Device                            Do Not Verify
                             P = Program memory
                             E = EEPROM
                             I = ID memory
                             C = Configuration memory
                             If no region is entered, the entire
                             device will be verified.
                             (Serial EEPROM memory is 'P')
    Z                    Preserve EEData on Program               Do Not Preserve
    ?                    Help Screen                              Not Shown
    
         Each option must be immediately preceeded by a switch, Which can
         be either a dash <-> or a slash </memory> and options must be separated
         by a single space.
    
         Example:   PK2CMD /PPIC16F887 /Fc:\mycode /M
                                   or
                    PK2CMD -PPIC16F887 -Fc:\mycode -M
    
         Any option immediately followed by a question mark will invoke
         a more detailed description of how to use that option.
    
         Commands and their parameters are not case sensitive. Commands will
         be processed according to command order of precedence, not the order
         in which they appear on the command line. 
        Precedence:
                    -?      (first)
                    -B
            -S
                    -D    
            -N
                    -P
                    -A -F -J -L -Q -V -W -X -Z
                    -C
                    -U
                    -E
                    -M
                    -Y
                    -G
                    -I -K   
            -R -T
            -H      (last)
            
    
         The program will return an exit code upon completion which will
         indicate either successful completion, or describe the reason for
         failure. To view the list of exit codes and their descriptions,
         type -?E on the command line.
    
         type -?V on the command line for version information.
    
         type -?L on the command line for license information.
    
         type -?P on the command line for a listing of supported devices.
         type -?P<string> to search for and display a list of supported devices
                          beginning with <string>.
    So basically, this parameters line is taking information from MCS, like processor, hexfile etc, and entering this info into the PicKit 2 command line. That is the extent of my guesswork. Er I mean knowledge.

    </string></string></value></value></value></string></string></id></string></memory></rate></rate></newlines></value></value></range></type></file></file></value>-pPIC$target-device$ -f$hex-filename$ -M -R -T -h2
    <value>
    <file><file><type><range path=""><value><value><newlines><rate><rate><memor y region=""><string>
    <id><string #=""><string><value><value><value><string><string> So -P is pic device type, the MCS shared parameter for this is $target-device$
    -f is hex file MCS calls $hex-filename$
    -M means program device
    -R </string></string></value></value></value></string></string></id></string></memory></rate></rate></newlines></value></value></range></type></file></file></value>Release /MCLR after operations Assert /MCLR<value><file><file><type><range path=""><value><value><newlines><rate><rate><memor y region=""><string>
    <id><string #=""><string><value><value><value><string><strin g>-T Release power to device
    -h2 , delay 2 seconds for exit

    But these are all specific for the Pickit 2 device (Well except for the target-device and hex-filename. These two will be useful to make other programers work with MCS.

    </string></string></value></value></value></string></string></id></string></memory></rate></rate></newlines></value></value></range></type></file></file></value>
    Last edited by ScaleRobotics; - 15th August 2010 at 17:05.
    http://www.scalerobotics.com

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    I have not heard of anyone trying to add the USB programmer for the EasyPic board, but let us know how it goes.

    Walter
    Hi, Walter

    Very simple with the EasyPic 6 : just use an ICD2 or 3 in the External ICD Plug ...

    like this you can program your chip straight from MPLAB ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    But is there a way to program it straight from MCS with the compile and program button?
    http://www.scalerobotics.com

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    But is there a way to program it straight from MCS with the compile and program button?
    No soucy ...

    Programmer file :
    PicFlash.exe
    Location:
    "C:\Program Files\Mikroelektronika\PICFLASH-mikroICD"
    Parameter line:
    -pPIC$target-device$ -f$hex-filename$ -e -w
    This one perfectly works ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Perfect Alain,

    You just saved David and I thousands of unnecessary mouse clicks (in the long run). Is that working for your EasyPic5 David? My EasyPic6 likes it, and so do I.

    Walter
    http://www.scalerobotics.com

  7. #7
    Join Date
    Jun 2009
    Location
    England
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Perfect Alain,

    You just saved David and I thousands of unnecessary mouse clicks (in the long run). Is that working for your EasyPic5 David? My EasyPic6 likes it, and so do I.

    Walter
    Yes, it works! Many thanks to Alain and you.

    Regards

    David

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by david1800 View Post
    Yes, it works! David
    Hi, David

    For Pickit2 and MCS ... I do not know why the EDIT button doesn't change anything to what you had liked to modify ...

    BUT begin by supressing the Pickit2 entry and THEN re-create the full entry for PicKit2 ...

    It will work properly, then.

    May be Darrel should add this "little detail" to the wiki ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Jun 2009
    Location
    England
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Thanks Alain

    I am probably being a bit stupid, but I am new to this and am not sure what you mean by suppressing the Pickit2 entry (where) and then recreating the full entry for the PicKit2 (where?).

    Many thanks

    David

    Quote Originally Posted by Acetronics View Post
    Hi, David

    For Pickit2 and MCS ... I do not know why the EDIT button doesn't change anything to what you had liked to modify ...

    BUT begin by supressing the Pickit2 entry and THEN re-create the full entry for PicKit2 ...

    It will work properly, then.

    May be Darrel should add this "little detail" to the wiki ...

    Alain

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by david1800 View Post
    Thanks Alain

    I am probably being a bit stupid, but I am new to this and am not sure what you mean by suppressing the Pickit2 entry (where) and then recreating the full entry for the PicKit2 (where?).

    Many thanks

    David
    Just freshly fallen from bed, might be ...

    just re-read your first post ... and the wiki extract !

    Alain

    PS: see here : http://www.picbasic.co.uk/forum/show...8470#post68470
    Last edited by Acetronics2; - 17th August 2010 at 12:17.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Jun 2009
    Location
    England
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    I don't need to have just got out of bed to be confused, it comes naturally! Thanks for the link, I'm at the steep learing curve stage.

    Regards

    David

    Quote Originally Posted by Acetronics View Post
    Just freshly fallen from bed, might be ...

    just re-read your first post ... and the wiki extract !

    Alain

    PS: see here : http://www.picbasic.co.uk/forum/show...8470#post68470

Members who have read this thread : 0

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