Configuration error


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107

    Default Configuration error

    My simple program compiles OK but when I try to program, I get "configuration error". I don't understand how the configuration can be in error, it is what it is, isn't it? This is my program:
    code
    rem device 12F675
    CMCON = 7 'SETS DIGITAL MODE
    TRISIO = %00111100 'MAKES GPIO.2,3,4,AND 5 AN INPUT
    DEFINE OSCCAL_1K 1 'PRESERVES OSCILLATOR CALIBRATION
    J VAR BYTE 'DEFINE VARIABLE J
    low GPIO.0

    END

    If I try to erase the micro, I get "configuration error". I am using MicroCode Studio. I found Melanie's post on configuration fuses but I don't know enough to understand.

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


    Did you find this post helpful? Yes | No

    Default

    What version of PBP are you using? PM or MPASM(version?).

    Have you done anything to the 12F675.inc file in the PBP directory?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    I am using melabs programmer version 4.01, microcode studio version 2.3.0.0 and compiler version is picbasic pro 2.46. I don't know if that answers your question. I have not looked at the include file (or know where to find it).

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Did you select the correct device in the dropdown list in MicroCodeStudio? Most programing softwares autoselect the device based on the device that the loaded .hex file was compiled for. (I don't know about the one you're using though). So, if you select the wrong device in MCS you'll get the wrong device in the programing software.

  5. #5
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    Works for me
    but like HenrikOlsson said make sure you have 12f675 selected
    16f628 is the default on mine
    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : grounded                                   *
    '*  Notice  : Copyright (c) 2009 Copyright  *
    '*          : All Rights Reserved                               *
    '*  Date    : 9/15/2009                                         *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    rem device 12F675
    CMCON = 7 'SETS DIGITAL MODE
    TRISIO = %00111100 'MAKES GPIO.2,3,4,AND 5 AN INPUT
    DEFINE OSCCAL_1K 1 'PRESERVES OSCILLATOR CALIBRATION
    J VAR BYTE 'DEFINE VARIABLE J
    low GPIO.0
    
    END
    " be nice it's people like me that make people like you look smart"
    yes I read the datasheet, of the 300 pages I understood 10

  6. #6
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    I did a read on the 12F675 and it came up "code protected". How did that happen? I thought default was not protected. How could I read the memory if it was protected? I suppose I will have to throw away the two that I tried to program. I hesitate to try a 3rd 12F675 but they are cheap, thank the Lord.

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


    Did you find this post helpful? Yes | No

    Default

    Look at the program that your programmer uses. Some have a way to set the fuses there. If you have one like that find out how to disable that option. It is nothing but trouble.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Dave,

    Unsure that this matters, but I had a heck-of-a fun time with an 833 chip last week, due in no small part to the programmer. Current numbers are:
    Programmer 4.31
    MCS 3.0.0.5
    PBPro 2.50c

    Microcode studio is an easy fix. The programmer should probably be upgraded, and unless somebody more literate than I takes issue, I'll say that you're ok with PBPro.

    There is a "configuration" window that shows up under the "view" menu in the programmer. I've never had an issue with it, it will over-write any settings you put in the code. Is it the best way? Who the heck knows. It can make your life miserable if you are trying to do something specific and not pay attention to it.....

    Hope that helps
    Gary

  9. #9
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    OK, I tried a 3rd 12F675 and altho I made sure the configuration was xt_osc and not code protected, the program failed with configuration error and when I read the memory, it comes up lp osc and code protected. I don't know what to do except uninstall and re-install the program.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,
    I use the PICKit2 and sometimes encounter that same scenario. The PICKit2 doesn't have an erase button (working from memory here as I am not home) so they say to select the chip you are using and program blank without selecting a hex file, to erase. This usually fixes the PIC and it programs when I load the hex. Crazy though it seems, when I get one like that my old JDM Clone won't erase it either.
    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.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Russ Kincaid View Post
    OK, I tried a 3rd 12F675 and altho I made sure the configuration was xt_osc and not code protected, the program failed with configuration error and when I read the memory, it comes up lp osc and code protected. I don't know what to do except uninstall and re-install the program.
    What programmer are you using?

    The PICKit2 doesn't have an erase button
    Mine does
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Russ,

    Take it to the step where you actually program the chip, press "view" and open the "configuration" window, and post what the settings are, here, would you? I'm interested in what it's telling you.....
    By default, they should match -exactly- the listing in the 12f675.inc file in c:\pbp (or wherever it lives)
    If you've changed them in the config window and saved it, then the saved values will be the default.

    By way of example, you should have an option for setting the osc. The default may be XT, but you can change it to INTOSC and save the settings. Quite handy (I can see Dave cringing right now - sorry) handy if you never plan to use any other compiler...... not so handy if the code needs to be portable.

    I am having quite a time with some code that makes Thomas the Tank Engine look complex. Oddly enough it's a 12f675. AND, the routines are simple and have been used a few times, not precisely the same, but the methodology. Now it won't run. I loaded a working file into the same chip on the same development board and it won't run either. The working file was built last week, and the MeProg software upgraded shortly thereafter.

    Gary

  13. #13
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Any time I try to program a 12F675, the default configuration is LP osc and code protected.


    If I change the configuration to EXTOSC and NOT PROTECTED and try to program, I get a configuration error.


    Now, when I read the part, the configuration changes to LP osc and code protected.

    I am using the Melabs programmer. I can make a jpg image of the configuration window but don't know how to post it.

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


    Did you find this post helpful? Yes | No

    Default

    Below the message box when you reply there is a "manage attachment" button.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Configuration bits and timing
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th November 2012, 08:53
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  4. pbp245 compliation error
    By Woodzy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th July 2006, 05:59
  5. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 00:22

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