+ Reply to Thread
Results 1 to 4 of 4

Thread: Configuration Word Of Pic

  1. #1
    raedbenz Newbie
    Join Date
    Nov 2006
    Posts
    50

    Default Configuration Word Of Pic

    HI..SOME PIC's THE CONFIGURATION IS LIKE ( __CONFIG _CP_OFF&_WDT_OFF&_PWRTE_ON&_XT_OSC ),

    AND OTHERS LIKE THE FOLLOWING EXAMPLE,



    LIST P=16F628
    #include "P16F628.inc"
    __config 0x3F18;----------CONFIGURATION WORD-------------



    SO WHAT IS THE DIFFERENCE ?AND WHY DID WE WRITE (_CONFIG 0x3F18)?FROM WHERE DID WE GET THESE VALUES..? IS THERE ANY TABLES EXPLANES THE CONFIHURATION WORDS?


  2. #2
    eng1 Excellent eng1 Excellent eng1 Excellent eng1 Excellent eng1 Excellent
    Join Date
    Apr 2006
    Location
    Italy
    Posts
    938

    Default

    The first method is self-explanatory. Instead, when you write a hexadecimal value, it's difficult to recall what's the function of each bit you're setting or clearing and you should convert the value with the binary notation first.
    For example 0x3F18 is 11111100011000. Then check the datasheet of your PIC. The Configuration Word is described there.
    Last edited by eng1; 10th December 2006 at 05:46 PM.

  3. #3
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default

    Quote Originally Posted by raedbenz
    HI..SOME PIC's THE CONFIGURATION IS LIKE ( __CONFIG _CP_OFF&_WDT_OFF&_PWRTE_ON&_XT_OSC ),

    AND OTHERS LIKE THE FOLLOWING EXAMPLE,



    LIST P=16F628
    #include "P16F628.inc"
    __config 0x3F18;----------CONFIGURATION WORD-------------



    SO WHAT IS THE DIFFERENCE ?AND WHY DID WE WRITE (_CONFIG 0x3F18)?FROM WHERE DID WE GET THESE VALUES..? IS THERE ANY TABLES EXPLANES THE CONFIHURATION WORDS?
    For a start please don't use all capital letters, it's considered shouting and rude!.

    Both examples give exactly the same result, personally I use the second method because I can't be bothered to do all the typing for the first - which is also obviously far more prone to making a mistake. My programmer software WinPicProg displays the hexadecimal fuse on screen as you select the options you want, so I simply use the value that gives me.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  4. #4
    mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent
    Join Date
    Oct 2006
    Location
    Hyderabad, India.
    Posts
    2,476
    Blog Entries
    1

    Default

    Hi,
    So simple and nice conept,sir, instead of typing the whole lot.
    thanks for the idea.
    Regards,
    Sarma.

+ Reply to Thread

Similar Threads

  1. Access to configuration word of PIC16f84a
    By folarinv in forum Micro Controllers
    Replies: 3
    Latest: 19th December 2005, 07:43 PM
  2. Chip talk
    By dreamproject in forum Electronic Projects Design/Ideas/Reviews
    Replies: 8
    Latest: 2nd April 2005, 07:24 PM
  3. Motor control interface
    By dreamproject in forum Micro Controllers
    Replies: 0
    Latest: 31st March 2005, 03:48 AM
  4. PIC16F628 Configuration Word
    By Kingpin094 in forum Micro Controllers
    Replies: 2
    Latest: 4th September 2003, 03:01 AM
  5. 16f877 help with config word
    By fishcurry in forum Micro Controllers
    Replies: 1
    Latest: 31st July 2003, 11:02 AM

Tags for this Thread