Connecting programmer to MicroCode Studio


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1

    Default Connecting programmer to MicroCode Studio

    New to this forum, and new to PIC programming as well.

    I have just started to learn about PIC programming. I started by downloading MPLAB and doing some of the tutorials. Then I purchased this programmer http://www.futurlec.com/PIC_Programmer.shtml , built a development board to blink LED’s and started having some success.

    But developing in ASM is not my cup of tea, so I have downloaded the demo version of PICBasic Pro and I am trying to use it.

    The problem is I cant’t seem to figure out how to connect the programmer to MicroCode Studio. I know I can just use the files generated by PBP to use in MPLAB to program the PIC, but I want to program directly from MCS.

    The programmer says it is Pickit2 compatible if that helps.

    Any help would be appreciated, but it needs to be tailored to a complete novice.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    In MCS, select menus -> "View" -> "Compile and Program Options..."
    Point MCS to the PBP directory (or let it find it automatically) under the Compiler tab
    Point MCS to the MPLAB directory (or let it find it automatically) under the Assembler tab
    Point MCS to the PICKIT2 by creating a custom programmer entry and point MCS to the PICKIT2 executable.
    Press F9 in the main MCS window to compile the source code, assemble the source code, and start the PICKIT2 programmer.
    Not sure if it works with the PICKIT2 clones though.
    My advice... Spend the $50 and buy the real PICKIT2...

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Not sure if it works with the PICKIT2 clones though.
    My advice... Spend the $50 and buy the real PICKIT2...
    The clones on eBay run $34.99, the real PICKIT2 programmer by itself from Microchip is presently $34.99 The kit with a Developers board is $49.99.
    http://www.microchipdirect.com/produ...words=DV164120
    http://www.microchipdirect.com/produ...words=PG164120
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    I'll try. Under the MicroCode Studio menu select View, then select Compile and Program Options..., then click the Programmer tab, and press the Add New Programmer... button. Then select the Create a Custom Programmer Entry radio button and press Next. Enter the name you want to call your programmer, it can be anything you want, and press Next. Then enter the name of the executable file that you use to run the programmer, it will be something.exe, and press next, then either select the find automatically for find manually buttons, and press next. When your finished, just go back to the View menu and make sure that your new programmer is set as the default in the little window, and you should be good to go.

    Any more problems, just let us know, there are a lot of pretty smart folks around here who'll do their best to get you going.

    Welcome to the forum!
    Jerry
    If your oscilloscope costs more than your car...

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thanks. I got it.... now where can I find a good basic tutorial for PICBasic?? I only have PIC16F876A, but I can buy some different PIC's if they are necessary.

    Thanks for the help.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Welcome,

    Sample programs can be found here
    http://www.melabs.com/
    and here
    http://rentron.com/
    Bruce is working on a book also.

    The manual has the basics and read this forum for the trickier stuff.

    This is also a good place to go
    http://www.picbasic.co.uk/forum/forumdisplay.php?f=16
    At the bottom of the page select "From the Beginning" to see all of the threads.
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    OK, I thought I had it, but I don’t. Although my programmer is working, the files created in MCS are not being loaded into the PICkit 2 program.

    When "compile and program" is selected in MCS, the file is compiled with no errors and the PICkit 2 programmer window opens. Then my programmer lights up and the PICkit 2 programmer shows a successful program loaded into the PIC. Unfortunately, all that is loaded is blanks (all “3FFF”).

    Somehow the HEX file is not being loaded into the PICkit 2 software.

    I don’t know if I am explaining this well, but can anyone help? Could this be that I left the last step out during the programmer setup? It was a blank box that had somthing to do with linking the HEX code. I didn't know what to enter there.
    Last edited by KrashKaloop; - 7th September 2008 at 02:13.

  8. #8
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Where did I put that file?

    Quote Originally Posted by KrashKaloop View Post
    OK, I thought I had it, but I don’t. Although my programmer is working, the files created in MCS are not being loaded into the PICkit 2 program.

    When "compile and program" is selected in MCS, the file is compiled with no errors and the PICkit 2 programmer window opens. Then my programmer lights up and the PICkit 2 programmer shows a successful program loaded into the PIC. Unfortunately, all that is loaded is blanks (all “3FFF”).

    Somehow the HEX file is not being loaded into the PICkit 2 software.

    I don’t know if I am explaining this well, but can anyone help? Could this be that I left the last step out during the programmer setup? It was a blank box that had somthing to do with linking the HEX code. I didn't know what to enter there.
    Hi KrashKaloop,

    Welcome to the forum.

    Just went through the same problem. The PICkit2 is new to me too.

    I found that the top box, of the three boxes, in the lower right-hand corner, of the single screen, PICkit2 programming window, labeled [“Auto Input Hex + Write Device”] worked.

    But, you have to know (remember) where MCS put the hex file and what it is called.

    You know you have the hex file loaded (ready to progam) when it shows up in the PICkit2 [Source:] window.

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  9. #9
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    35


    Did you find this post helpful? Yes | No

    Question Auto program for PICkit2 ?

    I just installed a new PICkit2 and would like to know if the auto start and program will work.
    When I select compile and program in the IDE, the programmer app starts but I have to manually grab the hex file and do the load from the PICkit2 application (2 steps).
    Some other programmers will accept a script file in the IDE that will allow them to compile and program your PIC with one click...
    Does anybody know the correct script to make the PICkit2 program the PIC when started by the IDE?
    Thanks,
    ....Microcode studio plus 3.0.0.5
    ....18F252

  10. #10
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    With the PicKIT2, you don't need a script for one-step programming - use the circled feature (works with any compiler/IDE):

    Attached Images Attached Images  

  11. #11
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    35


    Did you find this post helpful? Yes | No

    Default PICkit2 script?

    Yes I use it that way now.
    I would like to use the programmer as I use the MEL USB unit and make it a one click use.
    Once you go one click.... you don't want to go back...
    Do you know if the PICkit2 can even be driven to do "one click" form the IDE like the MEL programmers?

  12. #12
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Use the suggestion rmteo gave.

    Whenever the hex is changed, PICKIT2 software will see it, reload it, and then program the PIC. You have to do nothing.
    Dave
    Always wear safety glasses while programming.

  13. #13
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    What you need is the "PICKit2 Command Line Interface".

    http://ww1.microchip.com/downloads/e...K2CMDv1-12.zip

    1 click from Microcode Studio (compile and program).
    DT

  14. #14
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    35


    Did you find this post helpful? Yes | No

    Default PICkit2?

    Maybe I did not ask my question in the correct way...
    The IDE has a button that will compile and program(flash) your PIC with one click (if you have the correct script installed). It starts the programmer application if it is not running and then the programmer programs the PIC... you do not have to touch anything in the programmer GUI... it basically runs in parallel with the microcode IDE.... I mean ONE click to do everything. It is very fast and it is a part of the Microcode studio IDE to programmer interface.
    The MEL programmers all can read a script and be automated.... I do not know if the PICkit2 has this feature where it can be totally remote controlled from the IDE.
    Perhaps I should ask this on the Microchip forum??
    **************

  15. #15
    Join Date
    Jul 2014
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: Connecting programmer to MicroCode Studio

    I have a PICkit2 clone and DT explanation works if followed to the letter, the only thing I changed was the cmd line to one suggested in another post: -PPIC$target-device$ -F$hex-filename$ -E -M -Y -Y -h9, then the dos cmd box will open with erasing device followed by three msg's and waiting 9 sec before closing allowing user time to view error's if any.

    Note:if dos cmd box closes quickly then you have made a mistake during installation or the choosen device in Microcode Studio
    selection box is incorrect(example 16F877A when should be 16F877)

Similar Threads

  1. Connecting PICSTART to Microcode Studio
    By OzGrant in forum General
    Replies: 8
    Last Post: - 2nd February 2010, 10:20
  2. Connecting PICSTART to Microcode Studio
    By OzGrant in forum General
    Replies: 0
    Last Post: - 30th January 2010, 20:40
  3. Microcode studio programmer question
    By zk_bamx2 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th February 2008, 10:20
  4. Microcode studio loader problem
    By woodygjw in forum General
    Replies: 2
    Last Post: - 10th September 2007, 01:18
  5. Replies: 2
    Last Post: - 25th February 2006, 02:53

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