PPS understanding on 16F15313


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    looking at PBP3_PPS_NOTES for ccp i see no mention of seting ccp inputs at all, its outputs

    reassigning ccpx inputs will be a manual effort

    the dt_ints-14 will not work in standard form , all the ccp ints are in pie/r 6

    i would just insert a new int to the file

    Code:
      #define CCP1_INT     PIR1,CCP1IF, PIE1,CCP1IE    ;-- CCP1 
      #define CCP2_INT     PIR2,CCP2IF, PIE2,CCP2IE    ;-- CCP2 
      #define CCP3_INT     PIR3,CCP3IF, PIE3,CCP3IE    ;-- CCP3                *
      #define CCP4_INT     PIR3,CCP4IF, PIE3,CCP4IE    ;-- CCP4                *
      #define CCP5_INT     PIR3,CCP5IF, PIE3,CCP5IE    ;-- CCP5                *
      #define CCP1_15313_INT     PIR6,CCP1IF, PIE6,CCP1IE    ;-- CCP1 
    
    Warning I'm not a teacher

  2. #2
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    Richard,
    Thanks, I'll work on it again tonight and update as I sort it out.

    btw, thanks for taking up the torch around here. It probably seems tiring helping all the time, but it is appreciated.

    bo

  3. #3
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    Other than adding the define, is there anything else that needs to be addressed in DT_INTs to make it work?

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    Other than adding the define, is there anything else that needs to be addressed in DT_INTs to make it work?
    other than
    Code:
    asm
    INT_LIST macro
          INT_Handler  CCP1_15313_INT,   _myisr,    PBP,  yes
          
          endm
          INT_CREATE
    
    
    ENDASM
    thats about all i recall . http://dt.picbasic.co.uk/ might have some detail i have missed
    Warning I'm not a teacher

  5. #5
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    I have been to http://http://dt.picbasic.co.uk/ a number of times to refresh myself, but I admit, I haven't mined it thoroughly. I went back and found a couple of nuggets. One was in "DT's other code examples" that gave a better explanation of IOC interrupts, the other was by mpgmike named http://dt.picbasic.co.uk/INT16/Customisation.

    I had found his explanation on the forums of the PIC18's, but couldn't quite sort it for the lesser PIC's.

    bo

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    found his explanation on the forums of the PIC18's, but couldn't quite sort it for the lesser PIC's.
    i agree, its not very clear which "mods" apply to which dt-ints version
    a simple example adding 1 extra or modified dt-int to each version would be clearer
    adding a swag of int sources you will never use is an overkill for a pretty simple process

    you could use conditional asm constants to add a more generalised approach and standard notation
    like this
    ifdef PIR6
    #define CCP1_INT PIR6,CCP1IF, PIE6,CCP1IE ;-- CCP1
    #define CCP2_INT PIR6,CCP2IF, PIE6,CCP2IE ;-- CCP2
    else
    #define CCP1_INT PIR1,CCP1IF, PIE1,CCP1IE ;-- CCP1
    #define CCP2_INT PIR2,CCP2IF, PIE2,CCP2IE ;-- CCP2
    endif
    but who can be bothered to see if every pic16 chip with a PIR6 has a ccp1 + 2 and conforms to these settings.
    and what about new chips
    its just not worth the effort these days
    Warning I'm not a teacher

  7. #7
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: PPS understanding on 16F15313

    With your suggestions I was able to get it working. I will post the basics in case someone else needs to get through this. Having a better understanding of PPS will help a lot moving forward and allow me to take advantage of a lot of new features, some of which I didn't even know existed like an Angular Timer and a Math Accelerator with Proportional-Integral-Derivative (PID). Very interesting blocks to work with.

    bo

Similar Threads

  1. PIC18F27J13 Peripheral Pin Select (PPS)
    By Aussie Barry in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th April 2015, 12:51
  2. DIV32 Understanding
    By enauman in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th January 2013, 20:44
  3. Help in Understanding the Math
    By Ramius in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th March 2012, 15:49
  4. So many option but little understanding
    By PickyBiker in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 23rd April 2010, 09:45
  5. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts