Hi Bosse:
If you are using the port A as digital, you will need to disable too the
comparators.
CM1CON0 = 0
CM2CON0 = 0
Greetings...
Ruben de la Pena V.
Hi Bosse:
If you are using the port A as digital, you will need to disable too the
comparators.
CM1CON0 = 0
CM2CON0 = 0
Greetings...
Ruben de la Pena V.
Thank you very much Darrel and Ruben,
I use PM assembler. Have decided to use a ceramic resonator (20 MHz)
Wants ALL DIGITAL if possible.
Will try your configuration recommendations
Thanks again
Bosse
Hi,
Now I have done something ?????
Get the error: Error 16F886.INC 15 : [201] ''' expected
Have changed the INC file, but changed it back to original again, so now when I try to compile get this error.
Use PM and PicBasic Pro with MicroCode Studio Pro.
Please is there anybody how can help me solve the problem
Bosse
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi Joe,
First I tries to get Config O.K. so have only a small program for testing config words. Wants ALL digital. Working with a project with MAXIMS iButton chips, works perfect with 16F88.
;************************************************* ***************
;* 16F886.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2006 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 05/26/06 *
;* Version : 2.47 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
include 'M16F88x.INC' ; PM header
device pic16F886, xt_osc, 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, _XT_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
Think the INC file is O.K - But can not understand why it stops working????
'@ DEVICE PIC16F886, INTOSCIO, WDT_ON,MCLR_OFF,LVP_OFF,PROTECT_OFF,BOD_OFF,CPD_OF F,IESO_OFF,FCMEN_OFF,PWRT_ON
'DEFINE OSC 8
OSCCON = %01110001 ' Internal 8 mhz Osc
ANSEL = 0 ' All Digital
ANSELH = 0
'ADCON1 = $0F
'ADCON0 = 0
TRISC = 0
RUN:
PORTC.0 = 1
pause 1000
PORTC.0 = 0
PAUSE 1000
goto RUN
END
Do you recomend to use MPASM assembler? Have now tried more than 2 weeks with this problem.
PORTA is reserved for furure use - PORTA.1 = Input
PORTB %??001111 - RB6 and RB7connected to progsocket for PicKit2.
PORTC %11100100 - RC3 = SCK - RC4 = SDA 24LC256
Would be very great ful for all help and advices
Thanks in advance
Bosse
Hi Joe,
Forget to tell you the Warning from PicKit2.
Warning: Some configuration words not in hex file.
Ensure default values above right are acceptable.
Configuration 2FF9 0700
Bosse
Hi! I am using Microcode Studio version 4.0.0.0 . pbp version is 2.47 . Thanks.
http://www.picbasic.co.uk/forum/showthread.php?t=543
What it boils down to....
Method one:
Comment out the config settings in the inc file, put the actual config settings in your source code prefixed by either an @ or inside an ASM block. Use this method if you frequently change this setting or that setting a lot.
Method two:
Comment out the original config settings in the inc file, add in your own config settings to that same inc file in the same place. I use this method since I almost always use the PICs in the same way (i.e. HS_PLL for the 18F, MCLR on, and so on and so on)
Method three (and others)...
Lots of different methods for doing this sort of thing. The 2 above are the 2 that I use.
Check the particular PICs .INC file in the MPASM directory for your particular PICs various options...
Hi Skimask,
Thank you !
Now it starts working, have changed the config in the 16F886.INC file and moved the configuration over to the real program. But still have the warning from PicKit2.
Have to work on and make some small changes and see if the warnings will go away.
I'm not proffessional, but have learned very much from this forum and are very greatful for all your help.
Thank you ALL
Bosse
Bookmarks