Another "silly?" question - #CONFIG


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Question Another "silly?" question - #CONFIG

    Okay so in the book on page 100 there are examples of using #CONFIG. Do a compile in MicroCode Studio Plus and you get multiple "ASM WARNINGS" : Found directive in column 1. (__CONFIG). If the example in the book shows this is okay then why would the assembler complain?

    Again Thanks in advance. Ed

    Include "Modedefs.bas"
    define Loader_Used 1


    ;18F1320 EXT OSC RUNNING AT 20MHZ TO 40MHZ MCLR AS INPUT AND OSC PINS AS INPUTS
    #config
    __CONFIG _CONFIG1H, _HS_OSC_1H & _FSCM_OFF_1H & _RC_OSC_1H
    __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
    __CONFIG _CONFIG3H, _MCLRE_OFF_3H
    __CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_ON_4L & _STVR_ON_4L
    __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
    __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
    __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
    __CONFIG _CONFIG7H, _EBTRB_OFF_7H
    #endconfig

    >>

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    Hi,
    Look closer...the lines between #CONFIG and #ENDCONFIG are indented so that the __CONFIG directive does not end up in column 1 - which is what the warning says.
    Code:
    #CONFIG
        __CONFIG _CONFIG1H, _HS_OSC_1H & _FSCM_OFF_1H & _RC_OSC_1H
        __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L
        __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
        __CONFIG _CONFIG3H, _MCLRE_OFF_3H
        __CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_ON_4L & _STVR_ON_4L
        __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
        __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
        __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
        __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
        __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
        __CONFIG _CONFIG7H, _EBTRB_OFF_7H
    #ENDCONFIG
    /Henrik.

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    157


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    Quote Originally Posted by Ramius View Post
    Okay so in the book on page 100 there are examples of using #CONFIG.
    This brings up a question I have had.

    I am very new to PBP, and have the manual downloaded from the site (PBP_Manual_0609_260.pdf) and have found nothing about #config in it. I was wondering how to do that (I have quite a bit of experience using assembler for PICs).

    Page 100 in my manual is I2CWRITE. Should I be buying the printed manual? Or is there another manual that I'm just not seeing on the site (using the experimenter edition).

    Thanks for any help

    Andy

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    Thanks Henrik!
    I just got new glasses (really!) and I guess they are not helping!
    It a bit like the guy with the rounded shoulders and flat forehead.
    You ask me a question and I shrug my shoulders and the when you tell me the answer I slap my forehead and go "That's right!!!" Lol

    Hi Andy!
    I just upgraded to PBP3 Gold and #Config is on page 100.
    Looks like you have version 2.6 which is a little different.
    I am just getting used to 3.0.

  5. #5
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    157


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    Quote Originally Posted by Ramius View Post
    Hi Andy!
    I just upgraded to PBP3 Gold and #Config is on page 100.
    Looks like you have version 2.6 which is a little different.
    I am just getting used to 3.0.
    Hmm, I downloaded that PDF from the website and never looked at what was installed with the software! I've got V3 (I think), so I'm going down to the workshop to see what is on that computer.

    Thanks!

    ****EDIT*** Well what do 'ya know? I looked on the shop computer and the PBP 3 manual was right there all along - and page 100 is all about #CONFIG!! Thanks Ramius!
    Last edited by andywpg; - 7th March 2012 at 03:24.

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    You are very welcome Andy!
    Not sure what project(s) you are working on and for me it is a radio controlled model submarine the Typhoon, 6' long and 8" in diameter. Yes it does have working torpedoes and missiles. One of my first PIC projects was a compass for the sub and if you need a highly accurate compass (1/10 of 1 degree) then you can see the PIC Basic code at http://www.robsonco.com/Dinsmore/Untitled_5.html. The current project is a depth sensor that I think the code was written by a Brian T on this site. While some people think I should have started from scratch it made no sense to try and "re-invent" the wheel. Glad you have access to the latest version and if there is anything you or anyone needs my primary knowledge is in electronics.

    Best, Ed

    P.S. Ramius is from the movie "The Hunt for Red October" and the sub is the same!

  7. #7
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    157


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    Quote Originally Posted by Ramius View Post
    You are very welcome Andy!
    Not sure what project(s) you are working on and for me it is a radio controlled model submarine the Typhoon, 6' long and 8" in diameter. Yes it does have working torpedoes and missiles. One of my first PIC projects was a compass for the sub and if you need a highly accurate compass (1/10 of 1 degree)
    This begs a question: Does being submerged have any effect on an electronic compass? Do the magnetic lines of flux 'bend' in the water like light does?

    Quote Originally Posted by Ramius View Post
    Glad you have access to the latest version and if there is anything you or anyone needs my primary knowledge is in electronics.
    Thanks, I may avail myself of your knowledge at some point. I am currently building a clock from Numitron tubes - I just love those retro displays!


    Quote Originally Posted by Ramius View Post
    P.S. Ramius is from the movie "The Hunt for Red October" and the sub is the same!
    I knew that, I'm a big Tom Clancy fan - I missed your name at the end of the first message (didn't have my darn glasses on!). BTW, the Numitron tubes I bought are from Russia!

    Cheers,

    Andy

  8. #8
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Another "silly?" question - #CONFIG

    No, water has no effect. Normally people use GPS until you submerge and then GPS stops working! Numitrons? Oh you mean Nixies! Good part is you can use TTL with them! Yes almost all "thermally stablized semiconductors" (tubes) are now only made in Russia which is a wonderful country, been there many times and loved it especially the girls!

Members who have read this thread : 1

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