Config problem PIC16F886


Closed Thread
Results 1 to 40 of 56

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Probably means that you typed something in wrong, missing a space here or there, have an extra ' character, maybe a " character in there somewhere that shouldn't be...
    Just got back from dinner . . . That is why I asked him to post the .inc file and first 8 lines or so, to see if he introduced an extra character . . .
    Post the real CONFIG part that you're using. We can guess at your problem all day. Could be that the tire pressure is low...we'll never know...
    we can hope . . .
    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Hi skimask, Joe and Darrel

    Can not find out how to find out about the CONFIG word. Have comment out the CONFIG word in the program. using MPASM assembler. Now I'm really confused. Have been lucky with my other programs for other Controllers, that I can see now.
    Really wants to find out how to configure CONFIG word for 16F886.

    ;************************************************* ***************
    ;* 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, _INTOSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    NOLIST
    endif
    LIST

    I wants to have 8 MHz Internal Oscillator, my PCB have 4k7 resistor to MCLR pin so think MCLR have to be ON?
    Also want ALL I/O to be DIGITAL.

    Have printed out the INC file from the MPASM directory and the PDF file for 16F886 from MicroChip. Have much to read, but if I understand all???

    What can I do to get it work?

    Include a short version of the program.

    All the Best

    Bosse
    Attached Files Attached Files

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bosse View Post
    Can not find out how to find out about the CONFIG word.
    The config fuses are explained in the 16F886 datasheet in the 'Special Features of the CPU' section.

    Have comment out the CONFIG word in the program. using MPASM assembler.
    If you comment them out in the 16F886.INC file in the PBP folder, you need to put them in your main program.
    If you don't put them in your main program, you can temporarily/permanently set them in the 16F886.INC file in the PBP folder.

    Really wants to find out how to configure CONFIG word for 16F886.
    And again...if you read, and re-read, and re-read, and heed, this thread:
    http://www.picbasic.co.uk/forum/show...ght=presetting
    You will understand what needs to go where...
    Get the list of available/recognized config fuses settings from the 16F886.INC file in the MPASM folder...just like the thread says to do...

    ;************************************************* ***************
    ;* 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, _INTOSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    If you're going to put the config fuses in your program, comment out the above line
    If you're going to make the config fuses temporarily/permanent, change the above line to what you need using the available settings in the 16F886.INC in the MPASM folder
    NOLIST
    endif
    LIST

  4. #4
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Smile

    Hi skimask,

    Thank you very much for all your help, now I will change the config in the INC file.

    Wish you all the best

    Bosse

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

    Thank you very much for all your help, now I will change the config in the INC file.

    Wish you all the best

    Bosse
    Ya Know, I would only add an <b><font color=red> ; </b></font color> there. What I would do is save the configs you want saved as a file, call it 16F886 Setup and open it for each new project, then when you get ready to compile just save it as your new project's name: MyNewProject.BAS
    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.

  6. #6
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Smile

    Hi Joe,

    Thank you for your help. Was working yesterday to 06.30 in the morning, so today I have not tried out the new settings. Will do it tomorrow and belive it will work now. Have tried with LEDs and sometimes 2 LEDs lights when only one should. Will send you info about my progress tomorrow.

    Many thanks again ALL of you

    Bosse

  7. #7
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Thumbs up

    Hi everybody - especially you how have helped me, MANY THANKS!!

    Now it is running nice - still a warning from PicKit2 - Configuration 23EC 0700

    But can not see any problem when program runs - have hardtested all functions and NO problem to see.

    All the Best to you all

    Bosse

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


    Did you find this post helpful? Yes | No

    Default

    HI BOSSE,
    Time to ask, what is / is not working? Your file compiles nicely here, only changes I see are as follows: add, OSCTUNE = %00000000 ' SET OSC TO CALIBRATED VALUE
    VRCON = 0 and change to OSCCON = %01110101 , these may in fact do nothing differently, but I would try them. Does your circuit come alive and do anything ? Have you tried adding a heartbeat code just so you can see if life exists? Simple LED works wonders.
    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.

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