• AVR Freaks

Hot!New to XC8 & I have a question ...

Author
eatlp
New Member
  • Total Posts : 29
  • Reward points : 0
  • Joined: 2007/03/09 16:35:35
  • Location: 0
  • Status: offline
2020/10/21 23:08:47 (permalink)
0

New to XC8 & I have a question ...

Hello ... I have been forced to move over to XC8 from assembly (because of MPASM has been discontinued) & have been working my way test programs in C to change my existing controllers over.  Presently I am using a pic16f18877 where I am setting up a CCP2 with the MCC ... everything is working BUT where are the aliases which MCC uses defined?  Most of them are in the header files but I cannot find the aliases for the SFRs (like CCPR2L) or aliases pointing to bits within SFRs like CCPTMRS0 where MCC will use CCPTMRS0bits.C2TSEL?  I can see that they are referring to BUT it would be nice to be able to look it up what MCC is using.
I am sure I am overlooking something But I have gone through every header referenced in the MCC generated code & cannot find it.
 
#1

8 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 4019
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: New to XC8 & I have a question ... 2020/10/22 00:15:06 (permalink)
    0
    You've gone through every header MCC is referencing - including xc.h ? Still asking ?
     
    To cut things short: the compiler comes with a processor-specific include file for each and every derivative. Usual names are either the full derivative's name (picC16fxxxxx.h) or a shortened form "p16fxxxxx.h". The same scheme applies for the assembly includes *.inc. All to be found in the compiler's installation path.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    eatlp
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2007/03/09 16:35:35
    • Location: 0
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/22 04:41:17 (permalink)
    0
    thanks ... opened my eyes & looked again & found it (xc.h > pic.h > pic_chip_select.h > pic16f18877.h)
    #3
    WeHongKongers
    Super Member
    • Total Posts : 268
    • Reward points : 0
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/22 04:54:51 (permalink)
    0
    Eatlp,
    MPLAB X IDE looks very huge because it includes every MCU's hardware specific header files in one project.
     
    So you should only choose your target MCU when you install it.  MPLAB also includes many plugins. Disable those plugins which you don't need.
    #4
    du00000001
    Just Some Member
    • Total Posts : 4019
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: New to XC8 & I have a question ... 2020/10/22 06:20:13 (permalink)
    0
    eatlp
    thanks ... opened my eyes & looked again & found it (xc.h > pic.h > pic_chip_select.h > pic16f18877.h)



    ;-)

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #5
    NKurzman
    A Guy on the Net
    • Total Posts : 19039
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/22 07:09:08 (permalink)
    0
    You jumped from ASM to MCC?
    You could have set up and used your peripherals the same way you did in ASM.
    #6
    mpgmike
    Super Member
    • Total Posts : 493
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/23 11:46:49 (permalink)
    -1 (1)
    What would stop you from staying with MPLABX v5.35 or older?

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #7
    eatlp
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2007/03/09 16:35:35
    • Location: 0
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/25 19:23:35 (permalink)
    0
    Hello ...
    NKurzman
    You jumped from ASM to MCC?
    You could have set up and used your peripherals the same way you did in ASM.



    Ya, this is what I am doing ... As I haven't written C programmes for 30 years & never for microchips with peripherals, I am presently working through all the peripherals & getting each working ... gives me a chance to refresh my memory about C.  As for MCC, I find it convenient & I haven't had the problems which some have had (thankfully).
     
    mpgmike
    What would stop you from staying with MPLABX v5.35 or older?


    The necessity to make the jump from ASM to C came about because I upgraded my MAC & MPASM isn't available anymore, even with the older version (I am presently using v3.35).   I can run an older operating system in an emulator like parallels BUT it is so slow, it isn't practical.  Besides, I am looking to add more functionality for my controllers & possibly moving to PIC24 ... putting off the move to C has been long enough.
     
     
     
     
    #8
    Hen
    Super Member
    • Total Posts : 115
    • Reward points : 0
    • Joined: 2018/10/24 04:01:44
    • Location: 0
    • Status: offline
    Re: New to XC8 & I have a question ... 2020/10/25 21:50:51 (permalink)
    -1 (1)
    eatlp
     
    The necessity to make the jump from ASM to C came about because I upgraded my MAC & MPASM isn't available anymore, even with the older version (I am presently using v3.35).   I can run an older operating system in an emulator like parallels BUT it is so slow, it isn't practical.  Besides, I am looking to add more functionality for my controllers & possibly moving to PIC24 ... putting off the move to C has been long enough.

    I thought the natural next step from 8-bit PIC:s was the Cortex family..
     
    BTW, I dont feel it particularily slow working thru a virtual machine, maybe I'm slow too LoL: LoL
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5