Menu

Interrupt event not working on pic18F47K42

Phil
2018-07-25
2018-07-26
  • Phil

    Phil - 2018-07-25

    Hi Guys n Gals, Well this is a curiosity. I'm trying to get a uart interrupt to goto a sub-routine using
    "On Interrupt UsartRX1Ready Call readUSART" but when it comes to compile for hex file I keep getting the error "Error: Invalid interrupt event: USARTRX1READY" which in my opinion is wrong. Has anybody else had this issue? If so what was the fix. I have had this working with other pic chips but not with PIC18F47K42. Thanks in advance :)

     
    • Anobium

      Anobium - 2018-07-25

      We need to know the part you are using. Each part may have different USART or ESART interrupts. So, know the part helps.

      Oh no. You are using the K42. Welcome to the land of newness.

      Someone sent me a note last night telling me to share the K42 is in beta support or No support. Please send me a personal message so we can converse offline. If you are not wanting to do this David Stephenson is the man to ask.

       
    • Chris Roper

      Chris Roper - 2018-07-25

      The main problem with the K series is that you have wait until the erata comes out.
      They are very bleeding edge, with Microchip trying to add the PIC16 enhanced Core Independent Peripherals into the older PIC18 Architecture.
      With the K chips a lot of what is in the datasheet always turns out to be optimistic in the end, so unfortunately, until the errata comes out we can only provide what the datasheet says and hope that it works.
      Consider using K series devices as Beta Testing and be prepared to do some research and use workarounds, or better yet wait for the K series to mature.

       
  • Anobium

    Anobium - 2018-07-25

    DavidS/MadPhil

    For the K42 parts the interrupts are defined as the following:

    UART1FramingErrorInterrupt:U1EIE,U1EIF
    UART1Interrupt:U1IE,U1IF
    UART1ReceiveInterrupt:U1RXIE,U1RXIF
    UART1TransmitInterrupt:U1TXIE,U1TXIF
    

    You may want to use UART1ReceiveInterrupt like On Interrupt UsartRX1Ready Call readUSART.

    Enjoy

     
    • Anobium

      Anobium - 2018-07-25

      REPLY at https://sourceforge.net/u/madphil1234/profile/send_message

      Hi again, Yes I guess these are rather new, but the temptation of 8K ram and 128K program space was just too much. Oh and runs at 64mhz.

      I'd setup the usart pins using the PPS tool which seems to work fine as can use the Hserprint or Hsersend. It seems that there are quite alot of the "on interrupt 's that dont seem to work with this chip. I was looking at the DAT file which has a listing for interrupts such as UART1ReceiveInterrupt:U1RXIE,U1RXIF. As a guess i tried using "ON Interrupt UART1ReceiveInterrupt call routine" which the compiler accepted, but does not call the routine. That's about all the knowledge I have on that so now I'm stuck. If you could shine some light on this it will be most appreciated.

      regards

      Phil

      I cannot respond as you have email tracking/email sending turned off.

      Phil/DavidS. See above.

       
  • Phil

    Phil - 2018-07-25

    Have turned the email thingy to accept all

     
  • David Stephenson

    I can report that the "on interrupt extint0 call " works on this chip if you remember to set the PPS.

     

Log in to post a comment.