Searching \ for 'How to embedd config fuses into PIC.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'How to embedd config fuses into PIC.'.

Truncated match.
PICList Thread
'How to embedd config fuses into PIC.'
1999\01\14@102025 by Steven Kosmerchock

flavicon
face
Friends,
I have just recently decided to embedd the configuration fuses into a program (a
fter a program went wacko).
I have been following all the documentation but it still doesn't work. I wrote a
small program just to see if it would
work, so I could get the feel for the setup procedure. All it does is turn an LE
D on, waits 3uS then turns the
LED off, then waits 3uS more and turns it on. Whenever I try to compile it I get
an error:

Error [122]    A:\filename.asm 13  : Illegal opcode (_XT_OSC)

Here is the program:
********************************************************************************
*************************************
                   list         p=16f84
                   radix      hex
#INCLUDE               <P16f84.INC>
;
status          equ       0x03
porta           equ       0x05
trisa             equ       0x85
;
rp0              equ        5
;
_config                    _XT_OSC &  _PWRTE_ON & _CP_OFF & _WDT_OFF
;
                  org         0x000
;
start            clrf          porta
                  bsf          status,rp0
                  movlw     0x00
                  movwf     trisa
                  bcf          status,rp0
                  clrf          porta
loop            bsf          porta,0
                  nop
                  nop
                  nop
                  bcf          porta,0
                  nop
                  nop
                  nop
                  goto        loop
                  end
********************************************************************************
*****************************

I don't know what I am doing wrong. I followed all the steps that were given to
me in the
PICMicro MID-RANGE MCU Family Reference Manual. I would GREATLY appreciate any h
elp.
Thanks!!!!!!!!!!!!!!!!

Best regards,
Steven


Steven Kosmerchock
Engineering Technician/Student
CELWAVE
Phoenix   Arizona   USA
Email:   spam_OUTsteve.kosmerchockTakeThisOuTspamcelwave.com
http://www.geocities.com/researchtriangle/lab/6584

1999\01\14@104905 by Andy David

flavicon
face
> _config      _XT_OSC &  _PWRTE_ON & _CP_OFF & _WDT_OFF


Steve,
       you need to use two underscores before the 'config'
       and it'll work. MPASM is perhaps interpreting
       '_config' as a label, hence the error.



- Andy.

----------------------------------------------------------
Andrew David, Software Manager, Ultronics Ltd, Cheltenham.
.....akdavidKILLspamspam@spam@Ultronics.co.uk          http://www.ultronics.com/
----------------------------------------------------------

1999\01\14@111733 by Quentin

flavicon
face
MPASM is very syntax sensitive when it comes to the INC file.
A few things:
make sure _XT_OSC     EQU     H'3FFD' is in the p16f84.inc file, or that
you are using the original INC file.
MPLAB must be able to find the INC file (I always open mine, as I put
all my register declarations in it).
I notice you got _CONFIG instead of __CONFIG (one dash instead of two,
this could be your problem).
Use the c:/MPLAB/template/f84temp.asm for your programs, or copy the
__CONFIG... line from it, and then make your changes, and follow the
syntax in the INC file under "Configuration Bits".

Basically, I always use both the INC and template files, make
modifications to my liking and save it for future use before I put any
code in it. I then run both side by side when I do my editing. A very
nice feature to use.

Hope this helps
Quentin

1999\01\14@114456 by Barry King

flavicon
face
Steven,

snip
> _config                    _XT_OSC &  _PWRTE_ON & _CP_OFF & _WDT_OFF
snip

The directive you want has a DOUBLE underscore before it.

The typefont they chose for the book runs them together.  The example
code that is on the website and CD ROM is consistent and correct on
this.

MicroChip's website also has e-mail addresses of the right place to
give them ( polite! <g>) constructive criticism on the documentation.

---------------------------------------------------
Barry King
Engineering Manager
NRG Systems "Measuring the Wind's Energy"
barryspamKILLspamnrgsystems.com
"The witty saying has been deleted due to limited EPROM space"

1999\01\14@115304 by Harold Hallikainen

picon face
Here's my CONFIG line, which works...

       __config        _cp_off & _hs_osc & _boden_on & _pwrte_on &
_wdt_on


       I note that yours starts at the left margin, probably making
__config a label and the rest an opcode...

Harold



Harold Hallikainen
.....haroldKILLspamspam.....hallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

On Thu, 14 Jan 1999 08:08:37 -0700 Steven Kosmerchock
<EraseMESteve.Kosmerchockspam_OUTspamTakeThisOuTCELWAVE.COM> writes:
{Quote hidden}

**************************************
{Quote hidden}

******************************
{Quote hidden}

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1999\01\14@140046 by Ray Doerr

picon face
part 0 2855 bytes content-type:application/octet-stream; (decoded 7bit)

First, the config command has two underscores before the word "config".  ie.
__config

Secondly, the __config command can't be in the first column, so tab over one
tab stop and then type the __config

Attached is a sniplet I use for a 16C67 program.

I hope this solves your issue.

Thanks Ray Doerr


{Original Message removed}

1999\01\15@040852 by Dr. Imre Bartfai

flavicon
face
Hi,
AFAIK you should use the word __FUSES instead of _config.
Imre


On Thu, 14 Jan 1999, Steven Kosmerchock wrote:

> Friends,
> I have just recently decided to embedd the configuration fuses into a program
(after a program went wacko).
> I have been following all the documentation but it still doesn't work. I wrote
a small program just to see if it would
> work, so I could get the feel for the setup procedure. All it does is turn an
LED on, waits 3uS then turns the
> LED off, then waits 3uS more and turns it on. Whenever I try to compile it I g
et an error:
>
> Error [122]    A:\filename.asm 13  : Illegal opcode (_XT_OSC)
>
> Here is the program:
> ******************************************************************************
***************************************
{Quote hidden}

*******************************
>
> I don't know what I am doing wrong. I followed all the steps that were given t
o me in the
> PICMicro MID-RANGE MCU Family Reference Manual. I would GREATLY appreciate any
help.
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...