16F1827 setup


Closed Thread
Results 1 to 26 of 26

Thread: 16F1827 setup

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Question

    Alain,

    I recopied the code from your post. Still getting

    Symbol not previously defined (PortC)
    Symbol not previously defined (TRISC)
    etc etc etc

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Lightbulb Bingo !!!

    Hi,

    Got it ...

    Devices affected: 16F1826, 16F1827
    Date encountered: 08/2009
    Error class: safe (always reported)

    There are invalid port aliases in the PBP header file for these parts. The following assembly errors will be generated:

    Symbol not previously defined (PORTC)
    Symbol not previously defined (TRISC)
    Workaround:

    Edit the files 16F1826.BAS and 16F1827.BAS (found in the PBP install folder) as follows:

    PORTL VAR PORTB
    PORTH VAR PORTA ' PORTC invalid, change to PORTA
    TRISL VAR TRISB
    TRISH VAR TRISA ' TRISC invalid, change to TRISA
    This is from a Melab's errata sheet Darrel Pointed at some times ago ....
    I made the mod a while ago ... so couln't see what's wrong.

    Have a nice evening

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3


    Did you find this post helpful? Yes | No

    Question

    Alain,

    Ok getting somewhere now. When I comment out all the fuse configurations between the ASM and ENDASM I get no errors. With all the mods that you suggested.

    I am down to 3 errors.

    overwriting previous address contents (8007)
    symbol not previously defined (_CAPEN_OFF)
    overwriting previous address contents (8008)

    What other files do I have to modify to get rid of these errors?

    Nick

  4. #4


    Did you find this post helpful? Yes | No

    Question

    Alain & Bruce,

    I almost resolved all the errors by modifying the files you and Bruce suggested, except for 1. I went into 16F1827.INC (PBP file) and commented out existing fuse settings and let the main code define those functions. So of the 3 remaining errors, 1 is left _VCAPEN_OFF symbol not previously defined.

    I opened up the P16F1827.INC (MPASM file) to see if there is an address for _VCAPEN_OFF....it is not listed at all...not even under Config1 or Config2.

    Wow this has been an uphill battle getting this thing to compile. Any suggestions on how to resolve this last issue would be appreciated.

    thanks,
    Nick

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


    Did you find this post helpful? Yes | No

    Default

    Just remove _VCAPEN_OFF from your config line.

    It's definitely in my P16F1827.INC file, but if Microchip has updated include files, it may
    not be in the one you have. It should work either way.
    Regards,

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

  6. #6


    Did you find this post helpful? Yes | No

    Wink

    Bruce,

    Thanks for the help. It compiled without errors. Now off to testing! I will post back my results later.

    Nick

  7. #7
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Thumbs up

    I'll bet this thread has already saved me much frustration and gnashing of teeth.

    I assume that, when the device is erased, the CONFIGx registers are all 1s; and that all I have to specify are the parameters that would require a 0 to get what I want. Anything wrong with that assumption?
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  8. #8
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Macgman2000 View Post
    Bruce,

    Thanks for the help. It compiled without errors. Now off to testing! I will post back my results later.

    Nick
    Hello Macgman2000

    Were you ever able to get anything working? If so how?

    I've followed the suggestions in this thread, although all my files were already updated in my v2.60a. I still get the errors. I have the latest and greatest Mplab and Bruces' code simply will not compile.

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,116


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 setup

    Quote Originally Posted by Bruce View Post
    It's definitely in my P16F1827.INC file, but if Microchip has updated include files, it may
    not be in the one you have. It should work either way.
    Hi Bruce.

    I searched on two MPLAB installations for this VCAPEN thing.

    It is not in my *.inc files and also it is absent from the DS41391C pdf file too.

    I wonder what is this for. Just curious.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: 16F1827 setup

    Hi Ioannis,

    In an early data sheet (and silicon I assume?) this was a config2, bit 4 option like in the 16F193x series for the voltage regulator capacitor enable/disable.

    It magically vanished when the newer data sheet & .inc files were released, so I would just ignore it.

    If you look in the CONFIG 2 section you'll see where they changed bit #4 to Reserved. Not sure what happened?
    Regards,

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

Similar Threads

  1. 16F913 setup
    By Andre_Pretorius in forum General
    Replies: 31
    Last Post: - 17th April 2010, 23:45
  2. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  3. ADCIN setup for PIC16F688
    By PixController in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th February 2008, 18:38
  4. ADCIN setup help need
    By dangill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th February 2008, 15:22
  5. Use Button For setup
    By tump in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st November 2007, 19:43

Members who have read this thread : 2

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