#CONFIG for a PIC12F683 ?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2023
    Location
    Cape Town, South Africa
    Posts
    26

    Default #CONFIG for a PIC12F683 ?

    Hi, I have a horrible pic programming system where I have to manually type in the config every time I want to write to the chip. (and sometimes I make mistakes!). Of course the elegant way is to include a #CONFIG statement at the compiler head of the code. What would be the correct #CONFIG code that sets the bits as follows? (Taken from page 84 of the PIC12F683 manual and it gives me correct result)

    bit 11 FCMEN = 1
    bit 10 IESO = 0
    bit 9-8 BOREN = 01
    bit 7 CPD = 0
    bit 6 CP = 0
    bit 5 MCLRE = 0
    bit 4 PWRTE = 0
    bit 3 WDTE = 0
    bit 2-0 FOSC = 100

    In real life it should look something like the following, but different words and values . . . .

    #config
    CONFIG FOSC = HS
    CONFIG WDTEN = OFF
    CONFIG PWRT = ON
    CONFIG BOREN = OFF
    CONFIG MCLRE = OFF
    . . . . . . . . .
    . . . . . . .
    #endconfig

    Thank you

  2. #2
    Join Date
    Mar 2023
    Location
    Cape Town, South Africa
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Re: #CONFIG for a PIC12F683 ?

    I have tried this and it seems to work:

    #CONFIG
    __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
    #ENDCONFIG

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    0 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: #CONFIG for a PIC12F683 ?

    Melabes MeConfig utility is an excellent thing for generating configs.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Re: #CONFIG for a PIC12F683 ?

    This was a beta try and does not support newer MCUs.

    Also there will not be any new version of this really good idea.

    Ioannis

  5. #5
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: #CONFIG for a PIC12F683 ?

    I don't think that 12F683 belongs to "new" CPUs in any means

Similar Threads

  1. Random in PIC12F683
    By mikebike in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th March 2013, 14:07
  2. PIC12F683 and EEPROM
    By ross246 in forum General
    Replies: 2
    Last Post: - 19th November 2010, 19:17
  3. PIC12F683 Config Problems
    By Electroman87 in forum General
    Replies: 1
    Last Post: - 22nd April 2009, 08:18
  4. Pic12f683 Mclre
    By jmbanales21485 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th March 2007, 23:37
  5. Using the pic12F683
    By TonyA in forum General
    Replies: 2
    Last Post: - 6th April 2006, 12:46

Members who have read this thread : 7

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