Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.
Hey everyone,

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

Thanks to dougy83 for the help to finalise the code.

Take a look...
http://www.jakeselectronics.net/index.php
Follow the link to my website, then navigate to tools and the various generators are listed there.

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

EDIT: Updated link.
 
Last edited:
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.
 
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
 
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/en/DeviceDoc/33023a.pdf
 
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.
 
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?
 
Last edited:
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.
 
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:
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?
 
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.
 
This is a somewhat old thread of mine, but I've updated the link the opening post in case anyone stumbles across this page through a google search or something.
I've also taken many peoples advice of changing the color scheme of the site to pretty much black on white, and I like it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top