Need help with config


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    I have read the suggested post again. All examples in this post appear to set each option in the config seperatly, ie pic type, mclr, pwrt as seperate comands but the datasheet for the 16f688 shows a config register called 11.1 (page 100) with each option as seperate bits either set or cleared. Can I just send this as a binary string (or hex equivelent)? if so how?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrenmac View Post
    Can I just send this as a binary string (or hex equivelent)? if so how?
    It never worked that way for me, every newbie reads that and tries it,(I did) and it has never worked that I heard of. You can string the commands together though, like so:
    Code:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_ALL & _DATA_CP_ON
    The data sheet shows you what happens in those registers, but you can access them only at program time and require you to use the proper syntax as shown in Melanies post.
    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.

  3. #3
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    Ok that clears that up a bit. I guess its more reading and experementing. Thanks

  4. #4
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    I have tried some of the examples in the suggested post but I get compile errors.
    Here are some of what I have tried

    @ CONFIG FOSC = HS
    opcode expected instead of config

    ASM
    CONFIG OSCS=OFF ; Oscillator switch OFF
    ENDASM
    Same error

    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
    Same error

    I am using Picbasicpro with microcode studios

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Looks like you're still stuck...

    I need some information... are you using Microchip's MPASM or MeLab's PM as the Assembler? or don't you know?

    If you don't know, then I'll have to install MicroCode Studio which I don't ever use and see what the default's are when trying to compile for this chip.

    Oh, finally, what version of PBP are you running?

  6. #6
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    I thought that MElabs PBP was the compiler. I have ver 2.5.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink R.t.f. Datasheet !!!

    IF you use MPASM as assembler,

    The Config. fuses ***NAMES*** FOR THE '688 are:

    ( do not care of the EQU H" xxxx" )

    Code:
    ;==========================================================================
    ;
    ;       Configuration Bits
    ;
    ;==========================================================================
    
    _FCMEN_ON                    EQU     H'3FFF'
    _FCMEN_OFF                   EQU     H'37FF'
    _IESO_ON                     EQU     H'3FFF'
    _IESO_OFF                    EQU     H'3BFF'
    _BOD_ON                      EQU     H'3FFF'
    _BOD_NSLEEP                  EQU     H'3EFF'
    _BOD_SBODEN                  EQU     H'3DFF'
    _BOD_OFF                     EQU     H'3CFF'
    _CPD_ON                      EQU     H'3F7F'
    _CPD_OFF                     EQU     H'3FFF'
    _CP_ON                       EQU     H'3FBF'
    _CP_OFF                      EQU     H'3FFF'
    _MCLRE_ON                    EQU     H'3FFF'
    _MCLRE_OFF                   EQU     H'3FDF'
    _PWRTE_OFF                   EQU     H'3FFF'
    _PWRTE_ON                    EQU     H'3FEF'
    _WDT_ON                      EQU     H'3FFF'
    _WDT_OFF                     EQU     H'3FF7'
    _LP_OSC                      EQU     H'3FF8'
    _XT_OSC                      EQU     H'3FF9'
    _HS_OSC                      EQU     H'3FFA'
    _EC_OSC                      EQU     H'3FFB'
    _INTRC_OSC_NOCLKOUT          EQU     H'3FFC'
    _INTRC_OSC_CLKOUT            EQU     H'3FFD'
    _EXTRC_OSC_NOCLKOUT          EQU     H'3FFE'
    _EXTRC_OSC_CLKOUT            EQU     H'3FFF'
    _INTOSCIO                    EQU     H'3FFC'
    _INTOSC                      EQU     H'3FFD'
    _EXTRCIO                     EQU     H'3FFE'
    _EXTRC                       EQU     H'3FFF'
    IF Using PM assembler they are :

    Code:
    					; *** DEVICE Fuses Definitions
    EXTRC		equ	3FF80007h       ; XX XXXX XXXX X111
    EXTRC_OSC_CLKOUT equ    3FF80007h       ; XX XXXX XXXX X111
    EXTRCIO		equ	3FF80006h       ; XX XXXX XXXX X110
    EXTRC_OSC_NOCLKOUT equ  3FF80006h       ; XX XXXX XXXX X110
    EXTRC_OSC       equ     3FF80006h       ; XX XXXX XXXX X110
    INTOSC		equ	3FF80005h       ; XX XXXX XXXX X101
    INTRC_OSC_CLKOUT equ    3FF80005h       ; XX XXXX XXXX X101
    INTOSCIO	equ	3FF80004h       ; XX XXXX XXXX X100
    INTRC_OSC_NOCLKOUT equ  3FF80004h       ; XX XXXX XXXX X100
    INTRC_OSC       equ     3FF80004h       ; XX XXXX XXXX X100
    EC_OSC          equ     3FF80003h       ; XX XXXX XXXX X011
    HS_OSC          equ     3FF80002h       ; XX XXXX XXXX X010
    XT_OSC          equ     3FF80001h       ; XX XXXX XXXX X001
    LP_OSC          equ     3FF80000h       ; XX XXXX XXXX X000
    WDT_ON          equ     3FF70008h       ; XX XXXX XXXX 1XXX
    WDT_OFF         equ     3FF70000h       ; XX XXXX XXXX 0XXX
    PWRT_OFF        equ     3FEF0010h       ; XX XXXX XXX1 XXXX
    PWRT_ON         equ     3FEF0000h       ; XX XXXX XXX0 XXXX
    MCLR_ON         equ     3FDF0020h       ; XX XXXX XX1X XXXX
    MCLR_OFF        equ     3FDF0000h       ; XX XXXX XX0X XXXX
    PROTECT_ON      equ     3FBF0000h       ; XX XXXX X0XX XXXX
    PROTECT_OFF     equ     3FBF0040h       ; XX XXXX X1XX XXXX
    CPD_ON          equ     3F7F0000h       ; XX XXXX 0XXX XXXX
    CPD_OFF         equ     3F7F0080h       ; XX XXXX 1XXX XXXX
    BOD_ON          equ     3CFF0300h       ; XX XX11 XXXX XXXX
    BOD_NSLEEP      equ     3CFF0200h       ; XX XX10 XXXX XXXX
    BOD_SBODEN      equ     3CFF0100h       ; XX XX01 XXXX XXXX
    BOD_OFF         equ     3CFF0000h       ; XX XX00 XXXX XXXX
    IESO_ON         equ     3BFF0400h       ; XX X1XX XXXX XXXX
    IESO_OFF        equ     3BFF0000h       ; XX X0XX XXXX XXXX
    FCMEN_ON        equ     37FF0800h       ; XX 1XXX XXXX XXXX
    FCMEN_OFF       equ     37FF0000h       ; XX 0XXX XXXX XXXX
    These sets of fuse NAMES are particular to the Pic you use ...

    SO ...

    THIS
    Code:
    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
    doesn't mean ANYTHING with a 16F688 ...

    Capito ???

    Alain
    Last edited by Acetronics2; - 20th February 2008 at 20:55.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    Does this need to be in assembler or in straight basic

Similar Threads

  1. Run-Time Config
    By Darrel Taylor in forum PBP Extensions
    Replies: 1
    Last Post: - 1st February 2012, 17:26
  2. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 02:48
  3. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd November 2008, 00:51
  4. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 18:20
  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