PDA

View Full Version : fuse options in pbp



comwarrior
- 31st July 2009, 16:56
ok, i'm trying to set the fuse options so that i don't have to remember to set them...

I've been searching around for ages for them and tried everything i could find including whats in the help and faq on here...

I've tried...


device pic16F877A, HS_OSC, WDT_OFF, PWRTE_OFF, BODEN_OFF, LVP_OFF, WRTE_OFF, CP_OFF, DEBUG_OFF

and


CONFIG HS_OSC, WDT_OFF, PWRTE_OFF, BODEN_OFF, LVP_OFF, WRTE_OFF, CP_OFF, DEBUG_OFF

Basically, OSC should be HS and everything else should be off...

I'm using MPLAB IDE but compiling using PBP2.44 via command line and programming using winpic8 and a JDM programmer (proberbly a clone)...

PS, i don't want to use ICSP when their is around 100 volts DC in my system... so LVP is also disabled to solve an IO issue...

Any help appreciated

mackrackit
- 31st July 2009, 17:52
http://www.picbasic.co.uk/forum/showthread.php?t=543

Darrel Taylor
- 31st July 2009, 18:00
I've been searching around for ages for them and tried everything i could find including whats in the help and faq on here...
Although you say that you've read them, the results don't match what the threads recommend.

In this thread ...

Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543

Read post#1, sections 2.b. and 3.b.
<br>

comwarrior
- 31st July 2009, 21:02
ok, added following to the start...


@ device pic16F877A, HS_OSC
@ device WDT_OFF
@ device PWRT_OFF
@ device BOD_OFF
@ device LVP_OFF
@ device WRT_OFF
@ device CPD_OFF
@ device DEBUG_OFF

and I get the following error during compile...


D:\Bedini\PIC code\bedini 1>pbpw -p16f877 test1.bas -v
PicBasic Pro Compiler 2.44, (c) 1998, 2003 microEngineering Labs, Inc.
All Rights Reserved.
Pass 1:
Pass 2:
Code Gen:
Macro Pass:
PM Assembler 4.06, Copyright (c) 1995, 2003 microEngineering Labs, Inc.
Error D:\blah\blah\blah\TEST1.ASM 94 : [225] Undefined Symbol 'pic16F877A'
*** 1 Error ***

my INC dir only has an M16F87XA.inc file does that make a diference?

Darrel Taylor
- 31st July 2009, 21:10
Command line options override anything in your program.

You've compiled it for a 16F877
pbpw -p16f877 test1.bas

And put @ device pic16F877A, ... in the program.
<br>

comwarrior
- 31st July 2009, 22:04
well spotted...

The A was missing because i originally orderd the none A version but changed because they were out of stock and they said 3 weeks for stock... they had the A's in so i said i'll have them instead...

Thanks Darrel... again

:edit
hmmm, i wonder if thats causing other problems....

mackrackit
- 31st July 2009, 22:29
hmmm, i wonder if thats causing other problems....

What other problems are you having?

The "A" version has a few things different. Do a data sheet compare and you will find them.

mackrackit
- 31st July 2009, 22:48
This might help.

comwarrior
- 2nd August 2009, 18:29
i dont believe that pdf is entirely acurite...

problems i was havin were pwm lockups, ie pwm suddenly stopping during normal running...
pwm not starting up...
wild fluctuations on ADC's (i using internal Vref)
and 'clunky' operation... as in what appears to be little 'freezes' during operation

but now... works perfectly every time... ADC's seem far more stable...

mackrackit
- 2nd August 2009, 19:41
What is not correct in the PDF?

comwarrior
- 2nd August 2009, 23:07
what i was trying to say was i don't believe the pdf contains all the changes...