Configuration...again...?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    64

    Default Configuration...again...?

    Dear friends:
    I am working with a 16F886 in PM,PBP2.50b,and I have no problem with the configuration,until
    I try to set the BOD voltage to 2.1Volts.
    Here is the config..
    @ device pic16f886 , HS_OSC
    @ DEVICE pic16f886 , PWRT_OFF
    @ DEVICE pic16F886 , PROTECT_ON
    @ DEVICE PIC16F886 , WDT_OFF
    @ DEVICE PIC16F886 , LVP_OFF
    I added the next line to set the BrownOut Voltage to 2.1 Volts
    @ device PIC16F886 , BOR21V , as the inc file states...But when it compiles and goes to
    the USB melabs programmer,the fuses still shows BOD = 4 V.
    A closer look at the INC file states that this parameter is for the "device2" directive,but if
    I add the 2 after the device the PM compiler rejects this line.
    Any help...?
    Thanks in advance...
    Ruben de la Pena V.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Don't know if it makes a differences or not, but the BOR21V line, you don't have the DEVICE capitalized.
    Also, just for grins, try setting it to BOR4V and see what happens...
    And just to make sure that you're doing things correctly, try changing a different setting and see if the read back matches your changes...

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    @ DEVICE2 BOR21V should get you there.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Aug 2004
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Conf ... Again...?

    Thanks Bruce:
    Your last mail works. But is a little weird to have to change the "format" of the device directive. "Omit in the DEVICE2 the PIC name".
    By the way, I test the DEVICE with upper and lower chars and always work.
    Thanks again and greetings...
    Ruben de la Pena V.

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


    Did you find this post helpful? Yes | No

    Default

    You don't really need a new line for every config directive unless you want to place a
    comment on each line explaining what each config statement is.

    This works, and saves a boat-load of typing;

    @ DEVICE PIC16F886, HS_OSC, PWRT_OFF, PROTECT_ON, WDT_OFF, LVP_OFF
    @ DEVICE2 BOR21V

    The @ DEVICE2 line doesn't work with or need the target PIC, and placing PIC16F886 on
    each new line is just redundant information.

    This also works, but why bother typing in the same thing over, and over again?

    @ DEVICE PIC16F886, HS_OSC
    @ DEVICE HS_OSC, PWRT_OFF
    @ DEVICE HS_OSC, PWRT_OFF, PROTECT_ON
    @ DEVICE HS_OSC, PWRT_OFF, PROTECT_ON, WDT_OFF
    @ DEVICE HS_OSC, PWRT_OFF, PROTECT_ON, WDT_OFF, LVP_OFF
    @ DEVICE2 BOR21V
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Warning: Some configuration words not in hex file
    By Byte_Butcher in forum General
    Replies: 2
    Last Post: - 14th December 2009, 06:25
  3. Configuration error
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 20th September 2009, 00:10
  4. 16F726 configuration
    By Byte_Butcher in forum General
    Replies: 2
    Last Post: - 8th February 2009, 17:53
  5. 4-20mA to 0-5V configuration
    By leonel in forum General
    Replies: 0
    Last Post: - 31st August 2005, 12:33

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