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


            • #51
              Which is the latest MPLABX IDE that is compatible with the latest PBP?

              Ioannis

              Comment


              • #52
                MPLABX Version 5.35.
                We can crack this cotton PIC'n thang!

                Comment


                • #53
                  Over the life of the 8-bit PIC processors, Microchip has made some radical moves. First was changing the IDE from MPLAB to MPLABX. The last MPLAB Version was 8.92. MPLAB was developed in-house by Microchip and only works on Windows based OS's. The move to MPLABX used Netbeans for the foundation, which extended MPLABX to Mac and Linux OS's. In MPLABX Version 4.0 they changed the XC8 ANSI from C89 to C99. That had virtually no effect on PBP, as it only needed the MPASM compiler. HOWEVER, for MPLABX Version 5.40 they ditched the familiar MPASM in favor of "pic-as". The two are about as different as XC8 and PBP! For PBP to continue working, it relies on MPASM; again, used in MPLABX Versions 5.35 and older.

                  The switch from MPLAB to MPLABX came with lots of gripes and complaints; mostly resistance to change. After a year or 3, once folks became more familiar with how MPLABX works, many (if not most) actually prefer it over the older MPLAB. This is definitely not the case with pic-as versus the older MPASM. Charles would have to first learn the new pic-as, then totally rewrite ALL of the code for PBP(maybe PBP4 at that point??). Just so you know, PBP hasn't been profitable in years. At best it pays the light bill. Charles has made a promise to us to continue support. He is working on keeping PBP competitive, not for the sake of money, but because of his love for us. He really doesn't get proper credit for the work he invests into keeping us going in this evolving world.

                  I hope this helps explain things.
                  We can crack this cotton PIC'n thang!

                  Comment


                  • #54
                    Thanks Mike. Yeah, I guess that the base of PBP users has shrunk enough to make it non profitable. I do respect and appreciate Charles work (and anyone else of course) for sure. God bless him. Hope this great compiler will not die.

                    I am trying to move to a new laptop and just installed 5.35 IDE. Also tried to install MCC plug in but it won't! I guess it needs the latest version...

                    PIC's are getting too complicated to search so many settings registers. I need a couple of days if I am lucky, to set a new chip. Now I try to test the new comer 47Q43 but have yet to make my way... Every attempt failed and I am keep reading the giga-sized pdf file. Hoped I could try MCC but not today.

                    Ioannis

                    Comment


                    • #55
                      Till now a I cannot make it pass the while OSCSTAT.0=0:wend line. Though the system clock is set at 64MHz on the 47Q43. What am I missing?

                      Commenting the while line it does pulse the PortB.5 at 250ms.

                      Code:
                      #CONFIG
                      CONFIG RSTOSC = HFINTOSC_64MHZ
                      CONFIG CLKOUTEN = OFF
                      CONFIG PR1WAY = OFF
                      CONFIG CSWEN = OFF
                      CONFIG FCMEN = OFF
                      CONFIG MCLRE = INTMCLR
                      CONFIG PWRTS = PWRT_64
                      CONFIG MVECEN = OFF
                      CONFIG IVT1WAY = OFF
                      CONFIG LPBOREN = OFF
                      CONFIG BOREN = ON
                      CONFIG BORV = VBOR_2P85
                      CONFIG ZCD = OFF
                      CONFIG PPS1WAY = OFF
                      CONFIG STVREN = OFF
                      CONFIG LVP = OFF
                      CONFIG XINST = OFF
                      CONFIG WDTCPS = WDTCPS_3
                      CONFIG WDTE = ON
                      CONFIG WDTCCS = LFINTOSC
                      CONFIG SAFEN = OFF
                      CONFIG DEBUG = OFF
                      CONFIG WRTB = OFF
                      CONFIG WRTC = OFF
                      CONFIG WRTD = OFF
                      CONFIG WRTSAF = OFF
                      CONFIG WRTAPP = OFF
                      CONFIG CP = OFF
                      #endCONFIG
                      
                      
                      DEFINE OSC 64
                      
                      while OSCSTAT.0=0:wend
                      
                      while 1
                          toggle latb.5
                          pause 250
                      wend
                      Ioannis

                      Comment


                      • #56

                        OSCSTAT.0 is pll ready , the hfintosc does not use pll that i can see , try bit 6 hfor ready

                        Comment


                        • #57
                          Ooops...

                          Thanks Richard,
                          Ioannis

                          Comment

                          Working...
                          X