• AVR Freaks

Hot!Are PPS Input Definitions Supplied Somewhere?

Page: 12 > Showing page 1 of 2
Author
GlennP
Super Member
  • Total Posts : 780
  • Reward points : 0
  • Joined: 2009/03/29 15:04:55
  • Location: El Paso County, CO, USA
  • Status: offline
2020/07/13 22:32:31 (permalink)
0

Are PPS Input Definitions Supplied Somewhere?

I've searched for the values to put in the PPS Registers in symbolic form and haven't found them.  Does anyone know if they are supplied somewhere and I'm just too dumb to find them?
 
I don't know if it matters, but this is for the Quadrature Encoder Interface which seems to be an orphan WRT MCC.
 
In lieu of finding them - and to explain what I'm looking for - this code shows what I've done (the commented lines are for Pins not supported in the 28-pin package):
 

    #define PPS_IN_VSS      0x00
    #define PPS_IN_C1OUT    0x01
    #define PPS_IN_C2OUT    0x02
    #define PPS_IN_C3OUT    0x03
    #define PPS_IN_C4OUT    0x04

    #define PPS_IN_PTGO30   0x06
    #define PPS_IN_PTGO31   0x07
    #define PPS_IN_FINDX1   0x08
    #define PPS_IN_FHOME1   0x09


    #define PPS_IO_A04      0x14

//  #define PPS_IN_A08      0x18
//  #define PPS_IN_A09      0x19

//  #define PPS_IN A11      0x1B
//  #define PPS_IN A12      0x1C


    #define PPS_IN_B00      0x20
    #define PPS_IN_B01      0x21
    #define PPS_IN_B02      0x22
    #define PPS_IO_B03      0x23
    #define PPS_IO_B04      0x24
    #define PPS_IO_B05      0x25
    #define PPS_IO_B06      0x26
    #define PPS_IO_B07      0x27
    #define PPS_IO_B08      0x28
    #define PPS_IO_B09      0x29
    #define PPS_IO_B10      0x2A
    #define PPS_IO_B11      0x2B
    #define PPS_IN_B12      0x2C
    #define PPS_IN_B13      0x2D
    #define PPS_IN_B14      0x2E
    #define PPS_IN_B15      0x2F


//  #define PPS_IN_C03      0x33
//  #define PPS_IN_C04      0x34
//  #define PPS_IN_C05      0x35
//  #define PPS_IO_C06      0x36
//  #define PPS_IO_C07      0x37
//  #define PPS_IO_C08      0x38
//  #define PPS_IO_C09      0x39
//  #define PPS_IN_C10      0x3A


//  #define PPS_IN_E14      0x5E
//  #define PPS_IN_E15      0x5F


//  #define PPS_IN_F00      0x60
//  #define PPS_IO_F01      0x61


//  #define PPS_IO_G06      0x76
//  #define PPS_IN_G07      0x77
//  #define PPS_IO_G08      0x78
//  #define PPS_IN_G09      0x79



void PPS_Initialize (void) {
//  INPUT Pins:

//  QEI1: Quadrature Encoder Input Signals.
    RPINR14bits.QEA1R  = PPS_IN_B15;    // QEI1A: RB15.
    RPINR14bits.QEB1R  = PPS_IN_B14;    // QEI1B: RB14.
    RPINR15bits.INDX1R = PPS_IN_VSS;    // QEI1I: Vss. Index is UNUSED.
    RPINR15bits.HOME1R = PPS_IN_VSS;    // QEI1H: Vss.  Home is UNUSED.

//  OUTPUT Pins:

    return;
}

 
Win10, MPLabX 5.40, XC16 1.50, dsPIC33EP64MC202.
 
Thanks,
GP
#1

22 Replies Related Threads

    MBedder
    Circuit breaker
    • Total Posts : 6901
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 01:09:09 (permalink)
    +1 (1)
    Have you seen the PPS.h file in MLA?
    #2
    GlennP
    Super Member
    • Total Posts : 780
    • Reward points : 0
    • Joined: 2009/03/29 15:04:55
    • Location: El Paso County, CO, USA
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 02:05:26 (permalink)
    +1 (1)
    No, thanks.  I've downloaded it but need to find a junk machine to install it on.
     
    Update: See Post 17.  Installed "latest" MLA: No pps.h to be found.
     
    It's over a 1.5 years old.  I was hoping for something that came with and was kept up-to-date with the XC16 or MPLabX distributions.  Like a file I missed in my tree-GREPs of XC16 and/or MPLabX.
     
    I will take a look, but it may be after the US Income Tax deadline (15th).  My wife thinks that I procrastinate, but I tell her that I'm "deadline-driven".
     
    Thanks again,
    GP
    post edited by GlennP - 2020/07/15 12:53:47
    #3
    marcov
    Super Member
    • Total Posts : 282
    • Reward points : 0
    • Joined: 2006/10/08 01:59:40
    • Location: Eindhoven, NL.
    • Status: online
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 10:50:33 (permalink)
    -1 (3)
    Peripheral libs (as said pps.h) doesn't exist for e.g. dspic Cs.
     
    I use an own header generator, and have a per cpu file that has just tables copied from the manuals. Also pindef.
    post edited by marcov - 2020/07/14 13:08:56
    #4
    MBedder
    Circuit breaker
    • Total Posts : 6901
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 11:13:49 (permalink)
    0 (2)
    marcovPeripheral libs (as said pps.h) doesn't exist for e.g. dspics.
    Do not tell bullshit.


    #5
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11936
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 12:56:41 (permalink)
    +1 (1)
    I have these files on my machine:
    /opt/microchip/xc16/v1.11/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.21/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.22/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.24/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.25/support/peripheral_30F_24H_33F/pps.h

    #6
    marcov
    Super Member
    • Total Posts : 282
    • Reward points : 0
    • Joined: 2006/10/08 01:59:40
    • Location: Eindhoven, NL.
    • Status: online
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/14 13:09:27 (permalink)
    0
    MBedder
    marcovPeripheral libs (as said pps.h) doesn't exist for e.g. dspics.
    Do not tell bullshit.



    My bad, should have been dspicC
    #7
    GlennP
    Super Member
    • Total Posts : 780
    • Reward points : 0
    • Joined: 2009/03/29 15:04:55
    • Location: El Paso County, CO, USA
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 01:20:32 (permalink)
    0
    jtemples
    I have these files on my machine:
    /opt/microchip/xc16/v1.11/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.21/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.22/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.24/support/peripheral_30F_24H_33F/pps.h
    /opt/microchip/xc16/v1.25/support/peripheral_30F_24H_33F/pps.h



    I'm sure you do.  But:
     
    D:\Program Files\Microchip\xc16\v1.50>dir /s pps.h
     Volume in drive D is Kingston 240GB
     Volume Serial Number is E88F-A7BC
    File Not Found

     
    I don't see them anywhere under v1.50.  So either:
    1. The are no longer supplied, OR
    2. I didn't do something needed to get them, OR
    3. You have better magic than I do.
     
    Edit 1: This machine has never had XC16 prior to v1.50.
     
    GP
    post edited by GlennP - 2020/07/15 01:23:59
    #8
    MBedder
    Circuit breaker
    • Total Posts : 6901
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 01:38:56 (permalink)
    +1 (1)
    The PPS.h (along with many others periferal support files) is a part of separately installable Microchip Libraries for Applications (MLA), not of the C30/XC16. Look in a folder where you have installed the MLA, not in an XC16 folder.
    post edited by MBedder - 2020/07/15 01:40:34
    #9
    GlennP
    Super Member
    • Total Posts : 780
    • Reward points : 0
    • Joined: 2009/03/29 15:04:55
    • Location: El Paso County, CO, USA
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 02:08:24 (permalink)
    0
    MBedder
    The PPS.h (along with many others periferal support files) is a part of separately installable Microchip Libraries for Applications (MLA), not of the C30/XC16. Look in a folder where you have installed the MLA, not in an XC16 folder.



    So it's option #2 - Something I didn't do.
     
    As I mentioned in #3, I will install MLA sometime soon.
     
    GP
    #10
    my504
    Junior Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2018/01/21 05:29:36
    • Location: Moskow reg., Fryazino
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 06:46:04 (permalink)
    0
    MBedder
    The PPS.h (along with many others periferal support files) is a part of separately installable Microchip Libraries for Applications (MLA)

    In which MLA folder?
    I have the latest current version installed (2018-11-26). I haven’t found it anywhere.
    PS. Искал достаточно тщательно... )))
    post edited by my504 - 2020/07/15 06:48:26
    #11
    MBedder
    Circuit breaker
    • Total Posts : 6901
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 07:30:28 (permalink)
    0
    I have placed the MLA to XC16\support\peripheral_30F_24H_33F during installation.
    #12
    marcov
    Super Member
    • Total Posts : 282
    • Reward points : 0
    • Joined: 2006/10/08 01:59:40
    • Location: Eindhoven, NL.
    • Status: online
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 08:02:29 (permalink)
    0
    I use "peripheral-libraries-for-pic24-and-dspic-v2.00-windows-installer.exe"
     
    #13
    MBedder
    Circuit breaker
    • Total Posts : 6901
    • Reward points : 0
    • Joined: 2008/05/30 11:24:01
    • Location: Zelenograd, Russia
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 08:29:29 (permalink)
    0 (2)
    Then uninstall it and then install this one which is 2 years newer. This time write on the wall where did you install the MLA.
    #14
    Mark Yampolsky
    Super Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2009/04/03 18:50:36
    • Location: Russia Fryazino Moskow reg
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 12:22:55 (permalink)
    +1 (1)
    MBedder
    Then uninstall it and then...

    I believe that the folder with pps.h in support remained undeleted ... Because MLA is about something else. There are no specific peripheral headers. It contains peripheral drivers and protocol stacks for USB and TCP/IP.
    Look at the date the pps.h was created and compare with the date the MLA files were created.
     
    post edited by Mark Yampolsky - 2020/07/15 12:25:12
    #15
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11936
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 12:47:51 (permalink)
    +1 (1)
    The PPS.h (along with many others periferal support files) is a part of separately installable Microchip Libraries for Applications (MLA)

     
    There is no pps.h in any of the MLAs that I have installed.  I'm pretty sure the ones I have came from "16-bit dsPIC33, PIC24E, PIC24H MCUs: Legacy Peripheral Libraries" on the compilers download page.
    #16
    GlennP
    Super Member
    • Total Posts : 780
    • Reward points : 0
    • Joined: 2009/03/29 15:04:55
    • Location: El Paso County, CO, USA
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 12:49:26 (permalink)
    0
    I think Mark is right.  I just installed the new (19+ months old!) MLA on H: in the default location.  No pps.h.
    H:\microchip\mla\v2018_11_26>dir /s pps.h
     Volume in drive H is Elements
     Volume Serial Number is 7696-AEFB
    File Not Found

    Not sure what MBedder is talking about.
    post edited by GlennP - 2020/07/15 12:55:52
    #17
    marcov
    Super Member
    • Total Posts : 282
    • Reward points : 0
    • Joined: 2006/10/08 01:59:40
    • Location: Eindhoven, NL.
    • Status: online
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 12:59:56 (permalink)
    0
    In older compilers peripheral libraries came with the compiler, only since a few years they are a separate download.
     
    This deprecation is probably also the reason why it doesn't support DSPIC C. As said in my first post I therefore have been moving away from pps header, and using a generator with tables copied from the datasheet.
    #18
    du00000001
    Just Some Member
    • Total Posts : 3851
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 13:15:10 (permalink)
    0
    Looks like one just has to install XC16 V1.25 to get the pps.h installed.
    Then you're free to copy it to the location of your liking.
    Whether it really helps in setting up the chip: who knows prior checking its contents...
     
    BTW: I'm now using MCC - as far as it supports the peripherals. (I know: QEI exempt  :(  )

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #19
    GlennP
    Super Member
    • Total Posts : 780
    • Reward points : 0
    • Joined: 2009/03/29 15:04:55
    • Location: El Paso County, CO, USA
    • Status: offline
    Re: Are PPS Input Definitions Supplied Somewhere? 2020/07/15 13:16:03 (permalink)
    0
    marcov  ...
    only since a few years they are a separate download.

    Separate download from where?
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5