Config problem PIC16F886


Closed Thread
Results 1 to 40 of 56

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    Always get a lot of messages that the config is not correct.

    Now I have decided to use Crystal and will be very greatful for help with configuration word(s)

    Have used a PIC16F876A before without any problem, think it can be that the F886 have 2 config words????

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Are you using the default PM assembler, or MPASM?

    For PM, the CONFIG2 word is set using the DEVICE2 pseudo-op. But not setting config2 will not cause an error. And your DEVICE line above looks OK (if using PM).

    If you are using MPASM then it would be ...
    Code:
    @    __config _CONFIG1, _INTOSCIO & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CPD_OFF & _FCMEN_OFF &  _IESO_OFF
    Of if you're using a crystal now, replace _INTOSCIO with _XT_OSC or _HS_OSC.

    Don't forget to comment the config line in the 16F886.inc file in your PBP folder.
    <br>
    DT

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

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

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

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

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

Similar Threads

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