Please help configure 16F616


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: Please help configure 16F616

    #config
    __CONFIG _CP_OFF & _WDTE_OFF & _BOREN_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF
    #endconfig
    is only setting a partial number of config bits for that chip ,the bits that are omitted will revert to their default state , it may cause your [totally unspecified] problem, or it may be in the unposted code or both




    this is the device info file from your ?:\PBP3\DEVICE_REFERENCE folder

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    ;  File:    PIC16F616.INFO
    ;  Date:    05/18/16
    ;  Generated by melabs File Manager
    ;
    ;  PICBASIC PRO(tm) Compiler version: 3.0.9
    ;
    ;  Copyright 2016 microEngineering Labs, Inc.   All Rights Reserved
    ;  The content herein is intended to facilitate embedded development using
    ;  PICBASIC PRO Compiler.  Reproduction or utilization for other purposes
    ;  is prohibited without written permission from microEngineering Labs, Inc..
    ;  
    ;  microEngineering Labs, Inc.
    ;  2845 Ore Mill Road STE 4
    ;  Colorado Springs, CO  80904
    ;  719-520-5323
    ;  fax: 719-520-1867
    ;  http://melabs.com
    ;  [email protected]
    ;
    ;  Modifications to this file in the \DEVICE_REFERENCE folder will be
    ;  overwritten when you install future upgrades.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;MPASM __CONFIG Directive Options
    ;
    ;  The PBP default configuration for the PIC16F616 is:
    ;
    ;  #CONFIG
    ;    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _IOSCFS_4MHZ & _CP_OFF
    ;  #ENDCONFIG
    ;
    ;  You may use the information below to construct your own configuration
    ;  directives for the PIC16F616.  Please note that ALL DEFAULT
    ;  CONFIGURATION SETTINGS WILL BE OVERWRITTEN when you include a #CONFIG
    ;  block in your program.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    ; Available __CONFIG labels for PIC16F616:
    ;
    ;CONFIG Options
    ;
    ;  Oscillator Selection bits
    ;    _FOSC_EXTRCCLK     ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _EXTRC_OSC_CLKOUT     ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _EXTRC     ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _FOSC_EXTRCIO     ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _EXTRC_OSC_NOCLKOUT     ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _EXTRCIO     ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
    ;    _FOSC_INTOSCCLK     ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _INTRC_OSC_CLKOUT     ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _INTOSC     ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _FOSC_INTOSCIO     ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _INTRC_OSC_NOCLKOUT     ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _INTOSCIO     ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
    ;    _FOSC_EC     ;EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN
    ;    _EC_OSC     ;EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN
    ;    _FOSC_HS     ;HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;    _HS_OSC     ;HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;    _FOSC_XT     ;XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;    _XT_OSC     ;XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;    _FOSC_LP     ;LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;    _LP_OSC     ;LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
    ;
    ;  Watchdog Timer Enable bit
    ;    _WDTE_ON     ;WDT enabled
    ;    _WDT_ON     ;WDT enabled
    ;    _WDTE_OFF     ;WDT disabled and can be enabled by SWDTEN bit of the WDTCON register
    ;    _WDT_OFF     ;WDT disabled and can be enabled by SWDTEN bit of the WDTCON register
    ;
    ;  Power-up Timer Enable bit
    ;    _PWRTE_OFF     ;PWRT disabled
    ;    _PWRTE_ON     ;PWRT enabled
    ;
    ;  MCLR Pin Function Select bit
    ;    _MCLRE_ON     ;MCLR pin function is MCLR
    ;    _MCLRE_OFF     ;MCLR pin function is digital input, MCLR internally tied to VDD
    ;
    ;  Code Protection bit
    ;    _CP_OFF     ;Program memory code protection is disabled
    ;    _CP_ON     ;Program memory code protection is enabled
    ;
    ;  Internal Oscillator Frequency Select bit
    ;    _IOSCFS_8MHZ     ;8 MHz
    ;    _IOSCFS8     ;8 MHz
    ;    _IOSCFS_4MHZ     ;4 MHz
    ;    _IOSCFS4     ;4 MHz
    ;
    ;  Brown-out Reset Selection bits
    ;    _BOREN_ON     ;BOR enabled
    ;    _BOD_ON     ;BOR enabled
    ;    _BOR_ON     ;BOR enabled
    ;    _BOREN_NSLEEP     ;BOR enabled during operation and disabled in Sleep
    ;    _BOD_NSLEEP     ;BOR enabled during operation and disabled in Sleep
    ;    _BOR_NSLEEP     ;BOR enabled during operation and disabled in Sleep
    ;    _BOREN_OFF     ;BOR Disabled
    ;    _BOREN_OFF     ;BOR Disabled
    ;    _BOD_OFF     ;BOR Disabled
    ;    _BOR_OFF     ;BOR Disabled
    ;
    ;
    ;/MPASM
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Warning I'm not a teacher

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Please help configure 16F616

    Quote Originally Posted by richard View Post
    is only setting a partial number of config bits for that chip ,the bits that are omitted will revert to their default state , it may cause your [totally unspecified] problem, or it may be in the unposted code or both


    this is the device info file from your ?:\PBP3\DEVICE_REFERENCE folder
    Thanks for your help, Richard. Yes, that's the device. I'll post the code and a schematic. I was reluctant to because it's pretty long and I'm not sure I can fully explain all the things I'm trying to do.

Similar Threads

  1. Replies: 11
    Last Post: - 5th March 2012, 21:40
  2. CONFIGURE & OSCCON & meProg configure
    By SUNFLOWER in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th February 2011, 22:25
  3. PIC 16F616 Interrupt Enable/Disable?
    By Tobias in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 17th May 2009, 09:17
  4. 16F616 A to D
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 1st May 2009, 17:37
  5. Configuring 16F616
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th February 2009, 17:28

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