16F1827 Changed INC File by Microchip?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115

    Default 16F1827 Changed INC File by Microchip?

    If anyone has still an older installation of MPLAB (say 8.5x) I'd like a copy of the P16F1827.inc file.

    I suspect that Microchip has changed the file without warning.

    I had a configuration line working just fine like this:

    #config
    __config _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_ON & _MCLRE_ON & _CP_ON & _CPD_OFF & _BOREN_ON & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
    __config _CONFIG2, _WRT_OFF & _PLLEN_ON & _LVP_OFF & _STVREN_OFF & _BORV_25
    #endconfig

    But a few days ago, I updated to MPLAB 8.91 and the red part does not compile. Just because there is no reference in the *.inc file now.

    Just curious about it.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 Changed INC File by Microchip?

    Hi Ioannis,
    I can't help you with the file as I'm on v8.85 myself but why not change your CONFIG to & _BORV_HI? That should be the same thing as _BORV_25 as far as I can see. Or if you "must" stick with your current syntax add
    Code:
    _BORV_25         EQU  H'FBFF'    ; Brown-out Reset Voltage (Vbor), high trip point selected.
    to the current .INC file? Doing the later will of course be "reversed" the next time you update.

    /Henrik.

  3. #3
    Join Date
    Oct 2011
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 Changed INC File by Microchip?

    This is from version 8.73a
    Phil


    ;----- CONFIG2 Options --------------------------------------------------
    _WRT_ALL EQU H'FFFC' ; 000h to FFFh write protected, no addresses may be modified by EECON control
    _WRT_HALF EQU H'FFFD' ; 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control
    _WRT_BOOT EQU H'FFFE' ; 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control
    _WRT_OFF EQU H'FFFF' ; Write protection off

    _PLLEN_OFF EQU H'FEFF' ; 4x PLL disabled
    _PLLEN_ON EQU H'FFFF' ; 4x PLL enabled

    _STVREN_OFF EQU H'FDFF' ; Stack Overflow or Underflow will not cause a Reset
    _STVREN_ON EQU H'FFFF' ; Stack Overflow or Underflow will cause a Reset

    _BORV_25 EQU H'FBFF' ; Brown-out Reset Voltage (VBOR) set to 2.5 V
    _BORV_19 EQU H'FFFF' ; Brown-out Reset Voltage (VBOR) set to 1.9 V

    _LVP_OFF EQU H'DFFF' ; High-voltage on MCLR/VPP must be used for programming
    _LVP_ON EQU H'FFFF' ; Low-voltage programming enabled

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 Changed INC File by Microchip?

    Thanks both for the replies.

    OK, now I can confirm that I am not hallucinated. I was sure that my file compiled fine before.

    Now as Phil confirmed that specific line is omitted from the new version of the MPLAB 8.91.

    Henrik, I have removed the & _BORV_25 from my configuration and all are fine, as I am sure, not specifing it is the same as having the old _BORV_25.

    Just was annoyed by this things Microchip is doing now and then.

    Ioannis

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 Changed INC File by Microchip?

    Hi,
    Yes, I'd assume (which is NEVER a good thing but I can't actually find it in the datasheet) that all CONFIG bits are zero by default so since the HI threshold requires the BORV bit to be zero simply not setting it would be the same as specifically clearing it. Personally I'd change my CONFIG to match the new name, ie BORV_HI instead of BORV_25.

    I suspect Microchip found out that the thresholds may not have been as close to 1.9V and 2.5V to warrant having the voltage as part of the the constant names so they changed it to high and low instead. Or it might have caused users to assume (see, never a good a thing) that they could set the threshold to any arbitrary voltage by simply changing 19 to 33 or whatever - I don't know.

    Anyway, glad you're back up and running. I'm currently playing with a 16F1825 for the first time, what a nice, cheap little chip it is.

    /Henrik.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 Changed INC File by Microchip?

    Just like other flash memory in the chip, the config bits are all 1's when the chip is erased.
    By not putting a BORV option in the code, it defaults to 1.9V.

    Just change it to _BORV_HI
    DT

Similar Threads

  1. MPASM configs changed for 18F4550
    By Demon in forum General
    Replies: 2
    Last Post: - 11th September 2012, 08:56
  2. LCD problems when EBIT is changed
    By passion1 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th June 2007, 22:18
  3. Output hex file and Microchip direct
    By enigma in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th May 2006, 22:54

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