How to read CONFIG1


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2003
    Posts
    98

    Default How to read CONFIG1

    chip = PIC16F1933
    if i put the register name
    CONFIG1
    in a statement PBP3 is not happy and will not compile

    i am trying to debug something and i want to examine a few bits, just want to print a byte or word to my serial LCD to ponder what may be going on

    is there a way to read CONFIG1 ? in PBP3

    (in the MEL programmer software mePROG the config looks as expected)

    will post more in another thread about the issue i am chasing

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


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    You either set the configs in the inc file or in your code. If you are relying on something else then you can have trouble.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

  4. #4
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    yes i know, i just want to read CONFIG1, is that not possible ?

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    Maybe you should read that link again.

    If that's not what you want, you'll have to give more details.

    Robert

  6. #6
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    Quote Originally Posted by Demon View Post
    Maybe you should read that link again.

    If that's not what you want, you'll have to give more details.

    Robert
    Hi
    i assume you mean the 4093 link above ? (the posts crossed at the same moment)
    now i have read it, says it is only for 18F, i have 16F

    what i was wanting was simply to inspect these 2 bits in CONFIG1 as i was having trouble with the mode functioning properly:
    in CONFIG1 WDTE <4:3>
    since one can access most any register in PBP by its name i was surprised that CONFIG1 was not available, perhaps there is some good reason

    i imagine i could discover where it is in memory and looks that way (i assume it is a fixed location ?)

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    The CONFIGxx names are used within PBP and are listed in the include files.

    The individual registers are used by Microchip and are described in the datasheet.

    I suggest reading the register directly (check datasheet to see if readable). This will be much more efficient and easier to implement.

    Robert

  8. #8


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    Unless the PIC has CFGS you cannot read the fuses (otherwise known as config registers). This appears to be a PIC18 only thing. Unless you have a suspect PIC or programmer they are what you last wrote to them.

    BTW always a good idea to check for an errata if your PIC wont do as it's told.

  9. #9
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default Re: How to read CONFIG1

    Quote Originally Posted by towlerg View Post
    Unless the PIC has CFGS you cannot read the fuses (otherwise known as config registers). This appears to be a PIC18 only thing. Unless you have a suspect PIC or programmer they are what you last wrote to them.

    BTW always a good idea to check for an errata if your PIC wont do as it's told.
    thanks for that confirmation about not being able to read those registers in a 16F, too bad about that

    i did read the errata and did not spot a related issue, peda is helping me on another thread here that is related to what started this

Similar Threads

  1. 16F886 (illegal opcode CONFIG1)
    By MOUNTAIN747 in forum General
    Replies: 12
    Last Post: - 29th May 2015, 20:35
  2. Acessing Config1 Register in PIC16F88
    By mychangl in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th February 2014, 17:09
  3. 16F1825 CONFIG1 AND CONFIG 2 questions
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th May 2013, 04:01
  4. Replies: 6
    Last Post: - 14th October 2005, 20:41
  5. Trying to read PortC
    By BobK in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th November 2004, 11:16

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