Config problem PIC16F886


Closed Thread
Results 1 to 40 of 56

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    64


    Did you find this post helpful? Yes | No

    Default

    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Thumbs up

    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

  3. #3
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Error in INC file

    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

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bosse View Post
    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
    Hi Bosse,
    Can you post your .inc file, at least the area where you been pokin' around ? Also post the first say 8 - 10 lines of the code you are trying to get to work?
    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.

  5. #5
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Unhappy

    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

  6. #6
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    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

  7. #7
    Join Date
    Feb 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Config problem PIC16F886

    Hi! I am using Microcode Studio version 4.0.0.0 . pbp version is 2.47 . Thanks.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    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...

  9. #9
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Smile

    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

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 17:20
  4. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26
  5. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 03:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts