Announcement

Collapse
No announcement yet.

18FxxQ43 support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    No sure I understand what you mean.
    Yes, you can read U1RXB, that's what I'm doing in my first example posted yesterday (the one that works since it's not using HSERIN).

    HSERIN uses the UART receive interrupt flag to determine if there's a byte in the recevice buffer, problem is it looks at the wrong interruptflag.

    Comment


    • #47
      Originally posted by Henrik Olsson View Post
      With that said I'm no expert at the ASM-level (which is why I have PBP) so it's quite possible I've got it all wrong.
      /Henrik.
      You've got it right, and the right registers too.

      The library file pbp_pic18FxxQ43.lib has a number of errors for HSERIN, HSERIN2, and HSEROUT2:
      Code:
      HSERIN
      HSERINTO
      reference: PIR3
      should be: PIR4, U1RXIF (bit 0)
      
      HSEROUT
      reference: PIR4, U1TXIF (ok)
      
      
      HSERIN2TO
      HSERIN2
      reference: PIR6, U2RXIF (bit 0)
      should be: PIR8, 0
      
      HSEROUT2
      reference: PIR6, U2TXIF (bit 1)
      should be: PIR8, 1


      Comment


      • #48
        Originally posted by Henrik Olsson View Post
        No sure I understand what you mean.
        Yes, you can read U1RXB, that's what I'm doing in my first example posted yesterday (the one that works since it's not using HSERIN).

        HSERIN uses the UART receive interrupt flag to determine if there's a byte in the recevice buffer, problem is it looks at the wrong interruptflag.
        I missed that snipet that was based on U1RXB direclty. Sorry.

        Seems tumbleweed got it spot on!

        Comment


        • #49
          I've made corrections to the lib files for the HSER commands. Replace two files from this zip:
          http://pbp3.com/downloads/q43_libs_20210907.zip

          Charles Leo
          ME Labs, Inc.
          http://melabs.com

          Comment


          • #50
            Can confirm that changed .lib files work for HSERIN. Only tried with LONGs enabled and only with HSERIN, not HSERIN2 yet.
            I'll report further findings (if any) as I continue to play around with this chip - when time permits.

            Thank you Charles!

            /Henrik.

            Comment

            Working...
            X