PDA

View Full Version : Bloody F886



muddy0409
- 11th October 2014, 09:10
I am having a devil of a time getting the config working on a F886.
PBP 2.60 & MPASM

@ __config _CONFIG1, _HS_OSC & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF
@ __config _CONFIG2, _WRT_OFF

That is my entire program ATM

When I Compile I get

overwriting previous address contents (2007)

If I REM out second line only, same thing
If I REM out first line only, compiles OK

So I figure there is something wrong in config1 stuff. These 2 lines were directly coppied from elsewhere in this forum and pasted.
WTF is going on here.

I'm getting too damn old for this crap.

BTW is there anywhere I can see what the individual config bits actually mean. I have seen the bottom of the .INC file, that names the words contents but not the bit positions.

Would be great to see something like
CONFIG1.0 IS WDT 1=ON 0=OFF
CONFIG1.2 IS MCLRE 1=ON 0=OFF

or whatever they are.

Time for an OUZO and COKE I think. (or 2 or 3)

Thank you in advance as always.

Archangel
- 11th October 2014, 09:45
Hi Peter,
I think you will find instructions here: http://www.picbasic.co.uk/forum/showthread.php?t=543

In 2.6 you still have to comment the configs in the xxx.inc files

richard
- 11th October 2014, 09:50
depending on your level of patience
http://www.picbasic.co.uk/forum/showthread.php?t=543

or just edit the pic16f886.inc file to suit.


too slow

muddy0409
- 12th October 2014, 05:08
Have investigated a full day without success.

Next suggestion..
Does anyone have a WORKING F886 program, in PBP 2.60, with MPASM, (onWin7 PRO 64 bit on a laptop) that does work? that they could show me (at least the WORKING configs and DEFINES sections ) and let me copy into my setup just to let me see that my setup is OK and compiling successfully.
Otherwise, I am feeling I will migrate over to Great Cow ans see if that does everything? Much as I would prefer to stay with the MEL stuf 'cos I do normally know enough to bluff my way through. FYI I am using the CHIPINO board for some projects, or at least I will if I can get my setup going.

richard
- 12th October 2014, 05:30
in your pbp dir you have a file called 16f886.inc


edit it to look like this below
remove all config statements from your pgm

failing that upgrade to pbp3 it makes life much easier
silver edition is only $25 at dontronics if the have any left


;************************************************* ***************
;* 16F886.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2009 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 07/02/09 *
;* Version : 2.60 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
include 'M16F88x.INC' ; PM header
device pic16F886, intrc_osc_noclkout, wdt_on, mclr_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F886, r = dec, w = -302
INCLUDE "P16F886.INC" ; MPASM Header
__config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST

muddy0409
- 12th October 2014, 08:32
OK Rich, did that

Wrote a simple 2 line prg...nothing but these 2 lines...

define osc 16

PORTC = 0


When I compile, get lots of errors.....

ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)
ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)
ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)
ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)
ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)
ERROR [113] PBPPIC14.LIB SYMBOL NOT PREVIOUSLY DEFINED (PORTC)

WTF?????

HenrikOlsson
- 12th October 2014, 09:11
Hi Peter,
First, are you sure you have the correct device (PIC18F886) selected in the dropdown list in MicroCodeStudio?
Second, not related to the error message, define is a case sensitive statement. osc and OSC are not the same thing. For PBP to correctly pick up that you intened to run at 16MHz you need to define OSC 16.

/Henrik.

muddy0409
- 12th October 2014, 09:29
Rightio.
Changed the osc to OSC

Now it compiles but with the following...

7471

but at least it is compiling and programming...but when I read the chip back, the config bits have not changed....melabs usb programmer.

looks like it doesn't like the .inc file that was changed?

..

richard
- 12th October 2014, 09:53
sorry the forum eats up all the white space
use the attachment but rename it to 16f886.inc

muddy0409
- 12th October 2014, 10:48
Hmmm...
yep, that looks like it goes with no problems now, with a small correction to the HS_OSC part.

Thanks SO much.
You can have the rest of the weekend off...