Acessing Config1 Register in PIC16F88


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    40

    Default Acessing Config1 Register in PIC16F88

    can anyone advice why setting config1 register for PIC16F88 produce syntax error ?
    I want to set FOSC1 & FOSC0 in Config1 register. Refer datasheet page 130.

    Thx.
    Cheers,

    mychangl
    "The Dream Is Everything"

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Acessing Config1 Register in PIC16F88

    It will be much easier for someone to help if you post the troubling code. Absent being a prognosticator no one will be able to pinpoint your issue without seeing what you've written.

  3. #3
    Join Date
    Jun 2006
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Acessing Config1 Register in PIC16F88

    The purpose is to enable port A & B become digital IO. But with this instruction, only PortA.6 & 7 not responded while Porta.5 become MCLR.
    According to datasheet, i should access Config1 but PBP product syntax error.

    The code is :
    INCLUDE "modedefs.bas"

    'Set clock source to internal @ 4MHZ
    osccon = %01100010

    'Set all analog pin as digital pin
    ansel = %00000000

    'Set Pin direction
    TRISA = %00000000 'All PortA as output
    TRISB = %00000000 'All PortB as output

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


    Did you find this post helpful? Yes | No

    Default Re: Acessing Config1 Register in PIC16F88

    Hi,
    The CONFIG registers aren't (normally) accessible at runtime like "normal" registers. You can change them by using you device programmers software (which programmare are you using?) or you can set/change them in the code. The way you set them in code depends on which version of PBP you're using.

    If you're using PBP3 then open up the manual and read up on the #CONFIG / #ENDCONFIG directives. If you're using a version prior to PBP3 then make sure you read this thread. Or you can search around the forum a bit and you'll find PLENTY of information since CONFIG settings are one of the most discussed topics.

    /Henrik.

  5. #5
    Join Date
    Jun 2006
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Acessing Config1 Register in PIC16F88

    I am using PBP 2.6 with microcode studio.
    Cheers,

    mychangl
    "The Dream Is Everything"

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Acessing Config1 Register in PIC16F88

    Then make sure you read the thread I linked in my previous reply and follow the link to the Wiki in the first post - it'll tell you everything you need to know.

    /Henrik.

  7. #7
    Join Date
    Jun 2006
    Posts
    40


    Did you find this post helpful? Yes | No

    Thumbs up Re: Acessing Config1 Register in PIC16F88

    Will do it. Thank you Henrik.
    Cheers,

    mychangl
    "The Dream Is Everything"

Similar Threads

  1. 16F886 (illegal opcode CONFIG1)
    By MOUNTAIN747 in forum General
    Replies: 12
    Last Post: - 29th May 2015, 19:35
  2. 16F1825 CONFIG1 AND CONFIG 2 questions
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th May 2013, 03:01
  3. Register Settings
    By Archangel in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th September 2007, 00:28
  4. Tris Register use.
    By tsanders in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th October 2006, 15:12
  5. setting register
    By volcane in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th April 2006, 22:46

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