Announcement

Collapse
No announcement yet.

Support for new 18F chips

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

  • Support for new 18F chips

    Hi Charles.

    Will PBP support the new chip like 18FxxK40 series?

    Thanks,
    Ioannis

  • #2
    I plan to add them in a few weeks. I haven't studied the data yet, so I can't make promises, but I don't think they'll be much different than the K22 parts. I also plan to add several new parts in the enhanced mid-range families.

    I've become very dependent on the files that Microchip supplies in their MPLABX SDK. In the last release, they did some unexpected fun stuff with filenames and formats. My first attempt to harvest the K40 data didn't go well. I've made the required alterations in my database and parsing software (I think). Adding the new parts is next on my list after I clear the current project off my desk.
    Charles Leo
    ME Labs, Inc.
    http://melabs.com

    Comment


    • #3
      Thanks Charles.

      Although I have the "Instantly, using email" selected and the appropriate tick box checked, I never got an email notification of your reply.

      Ioannis

      Comment


      • #4
        I think the forum's ip address gets blacklisted. I'll have another go at fixing it, but I don't know when that will be.
        Charles Leo
        ME Labs, Inc.
        http://melabs.com

        Comment


        • #5
          It is now 20 hour since your reply and still no notification received.

          Ioannis

          Comment


          • #6
            Originally posted by Ioannis View Post
            Hi Charles.

            Will PBP support the new chip like 18FxxK40 series?

            Thanks,
            Ioannis
            +1 for the 18FxxK40 series. Just bought PBP Gold and I want to play with those new PICs

            Comment


            • #7
              No notifications still!

              Still no notifications are sent when new post is sent or Private message.

              Ioannis

              Comment


              • #8
                Update:

                We're very close to having PBP and Programmer support for the K40 parts. I'll post links to beta versions here once we beat it into shape.

                The parts have been a challenge for PBP. The current methods for automatically setting TRIS registers had to be rewritten. The chips have a very powerful method for locating peripheral ins and outs on a choice of 16 pins. You can even duplicate outputs from a single peripheral on multiple pins (at least for PWM output, haven't tested others).

                I'll keep working through the weekend. I hope to have something for you in a few days.
                Charles Leo
                ME Labs, Inc.
                http://melabs.com

                Comment


                • #9
                  I think I have working libraries in PBP and a working programming algorithm for meProg. We're waiting on a versioning fix for the PBP executable and a reply from Microchip to resolve a discrepancy in the programming spec concerning EEPROM addressing.

                  In the meantime, the notes for the K40 changes in PBP, as it stands currently, are below:
                  Code:
                  The function of the 18FxxK40 devices differs somewhat from other PIC18 parts.
                  Because of this, the following commands are configured a bit differently when
                  executed on the 18FxxK40 devices.
                  
                  --------------------------------------------------------------------------------
                  HPWM
                  
                  Use the following PBP DEFINE statements to specify the output pins for HPWM.
                  Check the Microchip datasheet (Peripheral Pin Select PPS) for the pins allowed
                  on each CCP/PWM channel.  The PPS peripheral will automatically be configured
                  for the specified output pin upon execution of HPWM.  When used on devices other
                  than the 18FxxK40, these defines will only control the Data Direction SFRs (TRIS).
                  
                  These defines are intended for use when the HPWM output pin is static.  If you 
                  wish to change the PWM output pin at runtime by changing PPS SFRs, you should 
                  not use the HPWM command, but rather set the appropriate SFRs manually.
                  
                  
                  DEFINE CCP1_REG PORTC   'Channel-1 port
                  DEFINE CCP1_BIT 2       'Channel-1 bit
                  DEFINE CCP2_REG PORTC   'Channel-2 port
                  DEFINE CCP2_BIT 1       'Channel-2 bit
                  DEFINE CCP3_REG PORTC   'Channel-3 port
                  DEFINE CCP3_BIT 3       'Channel-3 bit
                  DEFINE CCP4_REG PORTG   'Channel-4 port
                  DEFINE CCP4_BIT 3       'Channel-4 bit
                  DEFINE CCP5_REG PORTG   'Channel-5 port
                  DEFINE CCP5_BIT 4       'Channel-5 bit
                  DEFINE CCP6_REG PORTE   'Channel-6 port
                  DEFINE CCP6_BIT 6       'Channel-6 bit
                  DEFINE CCP7_REG PORTE   'Channel-7 port
                  DEFINE CCP7_BIT 7       'Channel-7 bit
                  
                  CCP and PWM peripherals are both supported by HPWM.
                  
                  Default output pins if no DEFINE is used:
                  
                                  2xK40   4xK40   6xK40
                  CCP1            RC2     RC2     RC2
                  CCP2            RC1     RC1     RC1
                  CCP3/PWM3       RC6*    RD1     RC3
                  CCP4/PWM4       RA7     RA7     RG3
                  CCP5                            RG4
                  PWM6                            RE6
                  PWM7                            RE7
                  
                  * Note that default CCP3/PWM3 setting on 28-pin devices conflicts with the default
                   TX1 setting described below.
                  
                  --------------------------------------------------------------------------------
                  HSEROUT/HSEROUT2
                  
                  Use the following PBP DEFINE statements to specify the output pins for HSEROUT
                  and HSEROUT2.  Check the Microchip datasheet (Peripheral Pin Select PPS) for the
                  pins allowed on each EUSART.  The PPS peripheral will automatically be configured
                  for the specified RX/TX pins only once after reset or power up.  This allows the
                  PPS SFRs to be changed at runtime to relocate the RX/TX pins as needed.  These 
                  defines will have no effect when code is executed on devices other than the
                  18FxxK40.
                  
                  DEFINE HSER_RXREG PORTC
                  DEFINE HSER_RXBIT 7
                  DEFINE HSER_TXREG PORTC
                  DEFINE HSER_TXBIT 6
                  DEFINE HSER2_RXREG PORTB
                  DEFINE HSER2_RXBIT 7
                  DEFINE HSER2_TXREG PORTB
                  DEFINE HSER2_TXBIT 6
                  
                  
                  Default output pins if no DEFINE is used:
                  
                                 2xK40   4xK40   6xK40
                  RX1            RC7     RC7     RC7
                  TX1            RC6*    RC6     RC6
                  RX2            RB6     RB6     RG2
                  TX2            RB7     RB7     RG1
                  
                  * Note that default TX1 setting on 28-pin devices conflicts with the default
                   CCP3/PWM3 setting described above.
                   
                  --------------------------------------------------------------------------------
                  I2CREAD/I2CWRITE
                  
                  The memory map of the 18F4xK40 forces PBP to reduce the I2CREAD/I2CWRITE clock
                  frequency slightly to allow I2C operation on PORTE pins.  If you aren't using 
                  I2CREAD/I2CWRITE on PORTE, you may use the following define to maximize the 
                  clock frequency on ports A, B, C and D.
                  
                  DEFINE I2C_ONLYABCD 1
                  
                  This define has no effect on 18F2xK40 and 18F6xK40 devices.
                  Charles Leo
                  ME Labs, Inc.
                  http://melabs.com

                  Comment


                  • #10
                    We're still having some versioning issues with the PBP executable, so I've compiled a special build of 3.0.9 with the additional K40 support. This should be considered a beta version. If you find issues with the K40 parts, post reports here or email me directly at support@melabs.com.

                    Download the K40 build here:
                    http://pbp3.com/downloads/PBP3_309_with_K40_Setup.exe

                    New libraries have been created for the K40. I've tested briefly on the 47K40 and simulated some of the other K40 parts. When testing, pay close attention to the following commands, as the routines have been modified significantly:

                    HSERIN, HSEROUT, HSERIN2, HSEROUT2, I2CREAD, I2CWRITE, HPWM, OWIN, OWOUT, READ, WRITE, READCODE, WRITECODE

                    Verify that all commands that set TRIS registers automatically are doing so correctly.
                    Charles Leo
                    ME Labs, Inc.
                    http://melabs.com

                    Comment


                    • #11
                      I've published a new meProg beta 4.63:
                      Edit: this link deleted, see below for a newer one.

                      The K40 parts are supported by U2 firmware version 6.3. You must update the firmware for K40 support.

                      The K40 are only supported in the U2 at this time. Field Programmer firmware will be available after we test and get some feedback.

                      Microchip seems to have changed the addressing for EEPROM data space in their hex files. We don't have confirmation from them yet, so I decided that meProg and PBP should disregard the programming spec and mimic their tools. I've tested against MPLABX with a PICKit3 and 47K40. It appears to be consistent, allowing meProg to handle the files that MPLABX produces and MPLABX to handle the files that PBP produces.
                      Charles Leo
                      ME Labs, Inc.
                      http://melabs.com

                      Comment


                      • #12
                        Bump. I think I fixed the email notifications. There are beta updates for K40 parts here.
                        Charles Leo
                        ME Labs, Inc.
                        http://melabs.com

                        Comment


                        • #13
                          No e-mail updates yet.

                          Hi Charles.

                          Wow..! Thanks for the work you did, in the middle of holidays!

                          Hopefully I will have in hand the new chips to test the libraries.

                          I did not check for a week or more this thread and did not see your posts. Unfortunately the notifications do not work.

                          Ioannis

                          Comment


                          • #14
                            Originally posted by Ioannis View Post

                            Unfortunately the notifications do not work.

                            Ioannis
                            They work NOW! I'm ordering some chips too and will do some tests.

                            Thank you Charles!

                            Comment


                            • #15
                              Confirmed! Now they work fine.

                              Thanks Charles,
                              Ioannis

                              Comment

                              Working...
                              X