Beginner- blinking led's on pickit 2 starter kit


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Angry Re: Beginner- blinking led's on pickit 2 starter kit

    Hey Jason,

    Firstly, I can't say wether MPLab is more or less capable than MCS. It's just the only one I know and use.

    In order to compile in MCS I believe you only need to go to VIEW, COMPILE AND PROGRAM OPTIONS and tell MCS where to find PBP.
    (Mine is just C:\pbp)

    For Me I just use the compile button on the upper left of the mcs window (below NEW) I have not bothered to get "Compile Progarm" to work.

    Below is a post I made in another thread that might help...

    I use MicroCode Studio...
    I just compile the program in MCS, then move over to the pickit2 window and do a "File", "Import Hex" and go to the directory where MCS put the .hex file and load it and "Write" to the PIC. Mine are under C:\Program Files\Mecanique\MCS.

    Just open up MCS and Pickit2 and leave them open for the duration of your programming / editing session.

    Once you locat the directory that MCS stores the .hex file, Pickit2 will find it the next time you compile. If you are testing the same program repeatedly you will find the .hex file you are working on, listed as a recent file, under the "File" drop down in the Pickit2 window. You can just double click on the existing link under the "File" menu and you are ready to "Write" to your PIC.

    I have not bothered to figure out how to get MCS to automatically compile and burn.

    Sometimes I will manually modify the PIC "fuses" in the Pickit2 window just before burning. I'm not that good at setting the "fuses" correctly in my program yet. (look below the "Help" drop down menu, in the Pickit2 window, and you will see a "Configuration" link which will allow you to change the "fuse" bits.

    Hope this addresses your question
    good luck
    Dwight


    Personally I think the PICkit2 is ideal to supply power for your test circut as long as you arent pulling too much current.

    I can, literally, make a change to a program, compile, import to pickit and program a PIC to test the code in less than 15 seconds. I just leave the pickit window open along side of the MCS window.

    NOTE: here is a GOTCHA to watch out for with the LPC demo board...
    If you are trying to read the onboard POT into RA0 and send the results to a DEBUG window... there is a confilict as RA0 is also used for DEBUG... so what I did is to cut the trace from the POT to RA0 and put a loose wire instead. That way I can take the output from the POT to any of the PINS that I want to, not just RA0. (See the LPC schematic in its documentation. (this one drove me nuts for a while)

    Hope you are making progress


    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  2. #2
    Join Date
    Jun 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    I get an illegal opcode error when I run that configuration command and the 16f690 device in microstudio dissapeared

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


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    Quote Originally Posted by Jasonstew View Post
    I get an illegal opcode error when I run that configuration command and the 16f690 device in microstudio dissapeared
    Which configuration command do you refer to? Which opcode ?
    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
    Jun 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    the @ device pic16F690, intrc_osc_noclkout, BOD_OFF, PWRT_OFF, wdt_off, mclr_off,protect_off
    command and the pic16F690 opcode error

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


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    Here is some info on how to set your configuration fuses. http://www.picbasic.co.uk/forum/cont...o-your-Program They are case sensitive, so changing them all to capitals will help. Here is one way to do it, if you wanted it in your code space.

    Code:
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _BOD_OFF & _PWRTE_OFF & _WDT_OFF & _MCLRE_OFF & _CP_OFF
    You may notice that there is no mclr_off or protect_off options in the P16F690.INC in the MPLAB directory. That is causing some of the errors.

  6. #6
    Join Date
    Jun 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    thanks for your help, but now I am getting this error ERROR: Unable to execute mpasmwin.Error[118] C:\TEST.ASM 52 : Overwriting previous address contents (2007)
    any ideas?

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


    Did you find this post helpful? Yes | No

    Default Re: Beginner- blinking led's on pickit 2 starter kit

    When setting the configs in code space you need to comment out the configs lines in the chip's *.inc file.
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

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