+ Reply to Thread
Results 1 to 14 of 14

Thread: Configuration Word Generator for 627A/628A/648A

  1. #1
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Talking Configuration Word Generator for 627A/628A/648A

    Hey everyone,

    Just wanting to share this generator I have made...

    Thanks to dougy83 for the help to finalise the code.

    Take a look...
    Jake's Electronics | Kits, Tutorials, Projects and More.

    Share your thoughts.
    If you are a PIC user/programmer, would you ever use something like this?


  2. #2
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,805

    Default

    Had a look and it's good but I hate the config 0xnnnn type instruction. You should change it so that it uses the labels in the include file.

    For example,
    Code:
    	__config _INTRC_OSC_NOCLKOUT & _PWRTE_ON & _BODEN_ON & _MCLRE_OFF & _WDT_OFF & _CP_OFF
    
    From the above I can see what is turned on/off.

    On the other hand,
    Code:
    	__config 0b10101010011
    
    means nothing to me.

    Sorry to be unsupportive but this is a little bugbear of mine.

    However, if you change it to produce the Microchip preferred version then I'll point people to your site.

    Mike.

  3. #3
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,522

    Default

    As someone who has been wanting to write a Config' Helper app' for a long time, I commend you for your effort but I'm afraid I have to agree with Pommie.

    If I ever do get around to writing that app' it will have radio buttons to select the type of output formatting (assembler, MCC18, BoostC, others.) and a button to copy that text to the clipboard for insertion into the source file. And hey, if you want to take up the cause, that would be great.

    Kind regards, Mike

  4. #4
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Default

    I will take your advice and see what I can do.

    It may take a little time as I struggle with Javascript :P

    Thanks for the input

  5. #5
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Default

    Alright.. Its taken 2 hours and 10 minutes...
    And i've managed to include 'Microchip preferred version'

    I want to do more, but I'm learning by trial and error. So the progress is slow as I do not know much about javascript at all.

    Take another look; Jake's Electronics | Kits, Tutorials, Projects and More.
    Thoughts again please.......

    I have 2 problems...
    1. What is the 'Microchip preferred version' for the "LVP: Low Voltage Programming Enable" (_LVP_XX???????????)
    2. For the oscillator, "011 = EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN"...
    What is EC? What is the 'Microchip preferred version' for that?
    I couldn't seem to find it on page 503 of the http://ww1.microchip.com/downloads/e...Doc/33023a.pdf

  6. #6
    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,790

    Default

    Check the include file for each chip you're using, the definitions are declared there.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  7. #7
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,805

    Default

    Very well done,

    The Microchip values can be found in file P16F628A.INC which you will find in C:\Program Files\Microchip\MPASM Suite , they are,
    Code:
    _BODEN_ON                    EQU     H'3FFF' ;Backwards compatability to 16F62X
    _BODEN_OFF                   EQU     H'3FBF' ;Backwards compatability to 16F62X
    _BOREN_ON                    EQU     H'3FFF'
    _BOREN_OFF                   EQU     H'3FBF'
    _CP_ON                       EQU     H'1FFF'
    _CP_OFF                      EQU     H'3FFF'
    _DATA_CP_ON                  EQU     H'3EFF'
    _DATA_CP_OFF                 EQU     H'3FFF'
    _PWRTE_OFF                   EQU     H'3FFF'
    _PWRTE_ON                    EQU     H'3FF7'
    _WDT_ON                      EQU     H'3FFF'
    _WDT_OFF                     EQU     H'3FFB'
    _LVP_ON                      EQU     H'3FFF'
    _LVP_OFF                     EQU     H'3F7F'
    _MCLRE_ON                    EQU     H'3FFF'
    _MCLRE_OFF                   EQU     H'3FDF'
    _RC_OSC_CLKOUT               EQU     H'3FFF'
    _RC_OSC_NOCLKOUT             EQU     H'3FFE'
    _ER_OSC_CLKOUT               EQU     H'3FFF' ;Backwards compatability to 16F62X
    _ER_OSC_NOCLKOUT             EQU     H'3FFE' ;Backwards compatability to 16F62X
    _INTOSC_OSC_CLKOUT   	     EQU     H'3FFD'
    _INTOSC_OSC_NOCLKOUT         EQU     H'3FFC'    
    _INTRC_OSC_CLKOUT   	     EQU     H'3FFD' ;Backwards compatability to 16F62X
    _INTRC_OSC_NOCLKOUT	     EQU     H'3FFC' ;Backwards compatability to 16F62X
    _EXTCLK_OSC                  EQU     H'3FEF'
    _HS_OSC                      EQU     H'3FEE'
    _XT_OSC                      EQU     H'3FED'
    _LP_OSC                      EQU     H'3FEC'
    
    So, again, well done, rep++.

    Mike.

  8. #8
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Default

    arr thanks nigel and mike,

    I looked for that but went to the wrong directory in MPLAB.

    Ok, I've smoothed out the errors, I think... I just need a couple of people to give it a quick check;
    http://jakeselectronics.x10hosting.com/b.php
    once it's error free, i will create a propper link to it from my page.


    Thanks for all the input and help...

    Oh another thing, Are you happy with the defaults?

  9. #9
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,835
    Blog Entries
    13

    Default

    Quote Originally Posted by Nigel Goodwin View Post
    Check the include file for each chip you're using, the definitions are declared there.
    This is the way I create a CONFIG when using a new PIC.

    Copy and Paste all the CONFIG's for the PIC's you use most into a 'Headers.txt' file.
    Doing it this you can also add the PIC type include, list and error level files to the Header.txt file.

    A quick copy/paste to a new program, edit as required and you can start writing the program.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  10. #10
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,522

    Default

    Oh wow! Very nice!

    Can you do the other hundred or so PIC devices for us all now, please (grin).

    Kind regards, Mike
    Last edited by Mike, K8LH; 22nd October 2009 at 10:25 AM.

  11. #11
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Default

    haha i thought that when i was half way through...
    I will probably do the ones i commonly experiment with...
    16F877, 16F737, 12F629...
    then If there are any popular requests...

    Anyways, new permentant link for those who might see this post in the future...

    PIC16F627A/628A/648A Configuration Word Generator

  12. #12
    atferrari Good atferrari Good atferrari Good
    Join Date
    Oct 2003
    Location
    Buenos Aires - Argentina
    Posts
    573

    Default

    Jake,

    All I can see from your page is a dark black background and faint white letters that I hardly could read. Is that normal?
    Agustín Tomás
    In theory, there is no difference between theory and practice. In practice, however, there is.

  13. #13
    jakeselectronics Good jakeselectronics Good jakeselectronics Good
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    199

    Default

    The page is not 100% black and the writing should be clearly visibale and reabable.
    If it appears dark and hard to read, i'd say your monitor is darker than everyone elses.

  14. #14
    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,790

    Default

    I would agree with Eric, the colour choices are very bad giving poor readability.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

+ Reply to Thread

Similar Threads

  1. ? Please or Help ? like a swear word ?
    By killivolt in forum Chit-Chat
    Replies: 7
    Latest: 18th March 2008, 04:33 AM
  2. Configuration Word Of Pic
    By raedbenz in forum Micro Controllers
    Replies: 3
    Latest: 11th December 2006, 04:14 AM
  3. Access to configuration word of PIC16f84a
    By folarinv in forum Micro Controllers
    Replies: 3
    Latest: 19th December 2005, 07:43 PM
  4. can anybody provide me manual of HP 8006A Word generator....
    By ankurpatel23 in forum Datasheet/Parts Requests
    Replies: 0
    Latest: 8th June 2005, 02:11 PM
  5. PIC16F628 Configuration Word
    By Kingpin094 in forum Micro Controllers
    Replies: 2
    Latest: 4th September 2003, 03:01 AM

Tags for this Thread