Announcement

Collapse
No announcement yet.

Support for new 18F chips

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

  • #31
    No, I believe the previous beta supported the full list. I didn't do any testing beyond the K40 devices, though.

    My intent is to differentiate the beta and discourage its long-term use. It bothers me that the beta is still identifying itself as 3.0.9. Technical support is difficult enough without having to guess as to the real version of software.

    I had hoped to have the new exe and versioning system in place by now, but the software gods are angry for some reason. We've migrated the PBP project to a modern (Microsoft) development environment. I'm happy about that because it makes things much better going forward, but it introduced a few minor, annoying issues.

    On the business side, we're considering whether to release this as PBP 3.1.0 and ask you, our current users, for a $50 fee to upgrade. I normally resist this when the improvements are limited to device support, but this last round of development cost a lot more than anyone anticipated.
    Charles Leo
    ME Labs, Inc.
    http://melabs.com

    Comment


    • #32
      I asked because I replaced on my office PC the installation with the beta one, not thinking that this is a temporary release.

      Whatever you decide on the policy, I support you. Preferably, of course, is the free update. As you said adding new chips should be within the free support of compiler. But then I do understand its cost.

      Ioannis

      Comment


      • #33
        Looking at PIC trends, I'd say the K40 is probably typical of new products to come. They will introduce a K29 with many similar features and structure, then a K37 and so forth. I vote for the 3.1 since it is radically departing from previous architecture, yet will probably be used with more of the newer offerings here on out. I suppose those not wanting to pay the $50 upgrade fee can still program everything short of the K40s for now, but will inevitably have to suck it up as the current fleet ages.

        Thanks again for all your efforts to remain the go-to company for PIC 8-bits. I did some work with the new K40s and can appreciate the massive undertaking involved.

        Mike
        We can crack this cotton PIC'n thang!

        Comment


        • #34
          Ship it with a document and the necessary files/plugins/tools/whatever showing how to properly set it up and work with in MPLABX and I'd be more than happy to pay $50 for it.

          /Henrik.

          Comment


          • #35
            Up to this moment I was not able to test the beta version with my K40 chip. I have some programming issues with the ICD3 and Pickit3 along with the unbelievable IPE of the MPLABX package.

            Ioannis

            Comment


            • #36
              meProg

              Hi all,
              I´ve been doing some testing with PIC18F27K40 and i found an issue that may need verification.
              When using internal OSC with config 64MHZ/1:1 and disabling ExtOsc (CONFIG FEXTOSC = OFF), seems that meProg does not assume the disabling of external OSC. I tried to use RA7 (CLKIN) as normal input connected to a key, and was not suceeding. Only after i programmed with PicKit3 it started working as normal Input.
              MeProg also don't show the option "Disabled" on "External Oscillator" configuration options, that´s why i suspect it is not disabling ExtOsc...
              Can you please verify this?
              Thanks,
              Sérgio

              (I´m using latest version of PBP with MPLABX and U2 programmer.)
              Last edited by sergio_tx; 03-08-2017, 04:00 PM.

              Comment


              • #37
                I'm trying to use some interrupts. TMR1_INT works but RX2_INT doesn't. The processor jump somewhere else. I made sure the USART worked by polling RC2REG. I'm using mpgmike's version of DT's interrupt.

                Any hints?

                Code:
                '****************************************************************
                '*  Name    : UNTITLED.BAS                                      *
                '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
                '*  Notice  : Copyright (c) 2017 [select VIEW...EDITOR OPTIONS] *
                '*          : All Rights Reserved                               *
                '*  Date    : 2017-03-10                                        *
                '*  Version : 1.0                                               *
                '*  Notes   :                                                   *
                '*          :                                                   *
                '****************************************************************
                'PIC18F27K40
                
                #config
                  CONFIG RSTOSC = HFINTOSC_64MHZ
                  CONFIG WDTE = OFF
                ;  CONFIG PWRT = ON
                ;  CONFIG BOREN = OFF
                ;  CONFIG PBADEN = OFF
                  CONFIG MCLRE = EXTMCLR
                ;  CONFIG LVP = OFF
                ;  CONFIG DEBUG = OFF
                ;  CONFIG XINST = OFF
                #endconfig
                
                DEFINE OSC 64
                DEFINE NO_CLRWDT 1  ' Don't waste cycles clearing WDT
                
                Clear   ' Clear RAM before entry
                
                TIMEOUT_1sec    CON 30
                TIMEOUT_500msec con 15
                
                CharBuff2       VAR BYTE
                TmrTick         VAR WORD    '~30 tick/secc
                Timeout         VAR WORD
                
                TempB           VAR BYTE
                TempW           VAR WORD
                PtrB            VAR BYTE
                
                '----[ ALIAS }-------------------------
                
                TMR1IF      var PIR4.0          'TMR1 Overflow Interrupt Flag bit
                TMR1ON      VAR T1CON.0         'TMP1 ON bit
                TMR1IE      var PIE4.0          'TMR1 Overflow Interrupt Enable bit
                TMR1IP      var IPR4.0          'TMR1 Overflow Interrupt Priority bit
                
                RC1IE       var PIE3.5          'EUSART1 Receive Interrupt Enable bit
                RC2IE       var PIE3.7          'EUSART2 Receive Interrupt Enable bit
                
                RC1IP       var IPR3.5          'EUSART1 Receive Interrupt Priority bit
                RC2IP       var IPR3.7          'EUSART2 Receive Interrupt Priority bit
                
                RC1IF       var PIR3.5          'EUSART1 Receive Interrupt Flag bit
                RC2IF       var PIR3.7          'EUSART2 Receive Interrupt Flag bit
                
                
                GIEH        VAR INTCON.7        ' high priority interrupts
                GIEL        VAR INTCON.6        ' low priority interrupts
                IPEN        var INTCON.5        'Interrupt Priority Enable bit
                INTEDG2     var INTCON.2        'External Interrupt 2 Edge Select bit
                INTEDG1     var INTCON.1        'External Interrupt 1 Edge Select bit
                INTEDG0     var INTCON.0        'External Interrupt 0 Edge Select bit
                
                OERR1       var RCSTA1.1    'Overrun Error bit 
                FERR1       var RCSTA1.2    'Framing Error bit
                CREN1       var RCSTA1.4    'Continuous Receive Enable bit
                SPEN1       var RCSTA1.7    'Serial Port Enable bit
                
                OERR2       var RCSTA2.1    'Overrun Error bit 
                FERR2       var RCSTA2.2    'Framing Error bit
                CREN2       var RCSTA2.4    'Continuous Receive Enable bit
                SPEN2       var RCSTA2.7    'Serial Port Enable bit
                
                '----[ Interrups handling ]-------------------------
                
                'INCLUDE  "..\_Include\DT_INTS-18\DT_INTS-18K40.pbp"   ' Base Interrupt System
                INCLUDE  "..\_Include\DT_INTS-18\DT_INTS-18_3_4.pbp"   ' Base Interrupt System
                INCLUDE  "..\_Include\DT_INTS-18\ReEnterPBP-18.bas"   ' Include if using PBP interrupts
                
                
                
                ASM
                INT_LIST  macro    ; IntSource, Label,          Type, ResetFlag?
                        INT_Handler  RX2_INT,   _RX2_Handler, PBP,  yes
                        INT_Handler  TMR1_INT,   _TmrIntr,   PBP,  yes
                        ;INT_Handler  RX1_INT,   _Rx1_Handler, PBP,  yes
                    endm
                    INT_CREATE               ; Creates the interrupt processor
                ENDASM
                
                goto OverIntHandlers
                
                TmrIntr:
                    '~30 tick/sec
                    
                '    TMR1ON = 0 ' Stop the Clock
                '    TMR1H = $3C
                '    TMR1L = $B1
                '    TMR1ON = 1 ' Restart the Clock
                
                    TmrTick = TmrTick + 1
                
                    TMR1IF = 0 ' Reset TMR1's Interupt Flag
                
                @ INT_RETURN
                
                '----[ RX2_Handler ]-------------------------------------------------------
                RX2_Handler:
                    
                    PORTB.3 = 1    
                    
                    IF (FERR2 = 1) or (OERR2 = 1) THEN
                        ' A framing/overrun error occurred.
                        ' Read RCREG to clear the error but don't use the data.
                        CREN2 = 0
                        CharBuff2 = RC2REG
                        CREN2 = 1
                
                    ELSE
                       ' No framing error occurred. Get caracter.
                        CharBuff2 = RC2REG
                        
                '        if (CharBuff2 = "$") then
                '            '$ = Start of Transmission
                '            '4 = EOT = End of Transmission
                '            BuffPtrWS = 0
                '        endif
                        
                '        BufferWS(BuffPtrWS) = CharBuff2
                
                '        'Cicular buffer
                '        BuffPtrWS = BuffPtrWS + 1
                        
                '        if BuffPtrWS >= BFLN_WS_BUF then
                '            BuffPtrWS = 0
                '        endif
                        
                    ENDIF
                
                @ INT_RETURN
                
                OverIntHandlers:
                
                TmrTick = 0
                Timeout = TIMEOUT_1sec
                
                '----[ A/D ]-------------------------------------------------------
                ANSELA = 0
                ANSELB = 0
                ANSELC = 0
                CCP1CON = 0
                CCP2CON = 0
                ADCON0 = 0
                ADCON1 = 0  'A/D VREF+ connected to internal signal, FVR BUF2
                ADCON2.7 = 1    'A/D Conversion Result Format : Right justified
                
                
                '----[ I/O ]-------------------------------------------------------
                
                TRISB.7 = 1 'RX2
                TRISB.6 = 1 'TX2
                TRISB.3 = 0
                
                '----[ UART 2 = Debug ]-------------------------------------------------------
                Init_UART2:
                    RCSTA2 = $90   ' Enable serial port & continuous receive
                    TXSTA2 = $24   ' Enable transmit, BRGH = 1
                    SPBRG2 = 130   ' 9600 Baud @ 64MHz, -0.02%
                    SPBRGH2 = 6
                    BAUDCON2.3 = 1 ' Enable 16 bit baudrate generator
                
                
                    'Empty EUSART2 input buffers
                    CREN2 = 0
                    CharBuff2 = RC2REG
                    PAUSE 50
                    CREN2 = 1
                    SPEN2 = 1
                    RC2REG = 0
                    
                    RC2IP = 1       'EUSART2 Receive Interrupt Priority bit : high priority
                    RC2IE = 1       'Enable RX2 Interrupts  
                @ INT_ENABLE  RX2_INT  ; Enable RX2 Interrupts  
                
                '----[ Timer1 init ]-------------------------------------------------------
                Timer1_init:
                    TMR1CLK = %00000001 'Fosc/4 (p.230)
                    T1GCON = 0          'Gate control - Timer1 is always counting (p.229)
                    T1CON = %00110100   'Timer0 off, 8bits read, 1:8, freq=30.517 Hz, overflow @ 32.7684 mSec
                
                    TMR1H = 0
                    TMR1L = 0
                    TMR1ON = 1
                
                    TMR1IP = 0      ' TMR1IP TMR1 Overflow Interrupt Priority bit : Low priority
                    TMR1IE  = 1     ' Enable TMR1 overflow interrupt
                    TMR1IF  = 0     ' Clear  TMR1 interrupt flag
                   
                @ INT_ENABLE  TMR1_INT    ; enable timer 1 interrupts
                
                   
                '----[ Interrupt control ]-------------------------------------------------------
                GIEL = 1     ' Enable peripheral interrupts
                GIEH = 1     ' Enable global interrupts
                
                NVMCON1.7 = 1   'ref.: http://support.melabs.com/threads/1178-Support-for-new-18F-chips?p=3538&viewfull=1#post3538
                
                PORTB.3 = 1
                pause 2000
                PORTB.3 = 0
                
                hserout2 [13,10,13,10, "PIC18F27K40 test serial", 13,10]
                
                main:
                
                	if TmrTick >= Timeout then
                        Timeout = TmrTick + TIMEOUT_1sec
                        hserout2 ["TmrTick=", dec TmrTick, 13, 10]
                        PORTB.3 = 0
                	endif
                
                    if CharBuff2 <> 0 then
                        hserout2 ["CharBuff2=", CharBuff2, 13, 10]
                        CharBuff2 = 0
                        Timeout = TmrTick + TIMEOUT_500msec
                    endif
                    
                
                goto main

                Comment


                • #38
                  Originally posted by MichelJasmin View Post
                  I'm trying to use some interrupts. TMR1_INT works but RX2_INT doesn't. The processor jump somewhere else. I made sure the USART worked by polling RC2REG. I'm using mpgmike's version of DT's interrupt.

                  Any hints?

                  Code:
                  '****************************************************************
                  '*  Name    : UNTITLED.BAS                                      *
                  '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
                  '*  Notice  : Copyright (c) 2017 [select VIEW...EDITOR OPTIONS] *
                  '*          : All Rights Reserved                               *
                  '*  Date    : 2017-03-10                                        *
                  '*  Version : 1.0                                               *
                  '*  Notes   :                                                   *
                  '*          :                                                   *
                  '****************************************************************
                  'PIC18F27K40
                  
                  #config
                    CONFIG RSTOSC = HFINTOSC_64MHZ
                    CONFIG WDTE = OFF
                  ;  CONFIG PWRT = ON
                  ;  CONFIG BOREN = OFF
                  ;  CONFIG PBADEN = OFF
                    CONFIG MCLRE = EXTMCLR
                  ;  CONFIG LVP = OFF
                  ;  CONFIG DEBUG = OFF
                  ;  CONFIG XINST = OFF
                  #endconfig
                  
                  DEFINE OSC 64
                  DEFINE NO_CLRWDT 1  ' Don't waste cycles clearing WDT
                  
                  Clear   ' Clear RAM before entry
                  
                  TIMEOUT_1sec    CON 30
                  TIMEOUT_500msec con 15
                  
                  CharBuff2       VAR BYTE
                  TmrTick         VAR WORD    '~30 tick/secc
                  Timeout         VAR WORD
                  
                  TempB           VAR BYTE
                  TempW           VAR WORD
                  PtrB            VAR BYTE
                  
                  '----[ ALIAS }-------------------------
                  
                  TMR1IF      var PIR4.0          'TMR1 Overflow Interrupt Flag bit
                  TMR1ON      VAR T1CON.0         'TMP1 ON bit
                  TMR1IE      var PIE4.0          'TMR1 Overflow Interrupt Enable bit
                  TMR1IP      var IPR4.0          'TMR1 Overflow Interrupt Priority bit
                  
                  RC1IE       var PIE3.5          'EUSART1 Receive Interrupt Enable bit
                  RC2IE       var PIE3.7          'EUSART2 Receive Interrupt Enable bit
                  
                  RC1IP       var IPR3.5          'EUSART1 Receive Interrupt Priority bit
                  RC2IP       var IPR3.7          'EUSART2 Receive Interrupt Priority bit
                  
                  RC1IF       var PIR3.5          'EUSART1 Receive Interrupt Flag bit
                  RC2IF       var PIR3.7          'EUSART2 Receive Interrupt Flag bit
                  
                  
                  GIEH        VAR INTCON.7        ' high priority interrupts
                  GIEL        VAR INTCON.6        ' low priority interrupts
                  IPEN        var INTCON.5        'Interrupt Priority Enable bit
                  INTEDG2     var INTCON.2        'External Interrupt 2 Edge Select bit
                  INTEDG1     var INTCON.1        'External Interrupt 1 Edge Select bit
                  INTEDG0     var INTCON.0        'External Interrupt 0 Edge Select bit
                  
                  OERR1       var RCSTA1.1    'Overrun Error bit 
                  FERR1       var RCSTA1.2    'Framing Error bit
                  CREN1       var RCSTA1.4    'Continuous Receive Enable bit
                  SPEN1       var RCSTA1.7    'Serial Port Enable bit
                  
                  OERR2       var RCSTA2.1    'Overrun Error bit 
                  FERR2       var RCSTA2.2    'Framing Error bit
                  CREN2       var RCSTA2.4    'Continuous Receive Enable bit
                  SPEN2       var RCSTA2.7    'Serial Port Enable bit
                  
                  '----[ Interrups handling ]-------------------------
                  
                  'INCLUDE  "..\_Include\DT_INTS-18\DT_INTS-18K40.pbp"   ' Base Interrupt System
                  INCLUDE  "..\_Include\DT_INTS-18\DT_INTS-18_3_4.pbp"   ' Base Interrupt System
                  INCLUDE  "..\_Include\DT_INTS-18\ReEnterPBP-18.bas"   ' Include if using PBP interrupts
                  
                  
                  
                  ASM
                  INT_LIST  macro    ; IntSource, Label,          Type, ResetFlag?
                          INT_Handler  RX2_INT,   _RX2_Handler, PBP,  yes
                          INT_Handler  TMR1_INT,   _TmrIntr,   PBP,  yes
                          ;INT_Handler  RX1_INT,   _Rx1_Handler, PBP,  yes
                      endm
                      INT_CREATE               ; Creates the interrupt processor
                  ENDASM
                  
                  goto OverIntHandlers
                  
                  TmrIntr:
                      '~30 tick/sec
                      
                  '    TMR1ON = 0 ' Stop the Clock
                  '    TMR1H = $3C
                  '    TMR1L = $B1
                  '    TMR1ON = 1 ' Restart the Clock
                  
                      TmrTick = TmrTick + 1
                  
                      TMR1IF = 0 ' Reset TMR1's Interupt Flag
                  
                  @ INT_RETURN
                  
                  '----[ RX2_Handler ]-------------------------------------------------------
                  RX2_Handler:
                      
                      PORTB.3 = 1    
                      
                      IF (FERR2 = 1) or (OERR2 = 1) THEN
                          ' A framing/overrun error occurred.
                          ' Read RCREG to clear the error but don't use the data.
                          CREN2 = 0
                          CharBuff2 = RC2REG
                          CREN2 = 1
                  
                      ELSE
                         ' No framing error occurred. Get caracter.
                          CharBuff2 = RC2REG
                          
                  '        if (CharBuff2 = "$") then
                  '            '$ = Start of Transmission
                  '            '4 = EOT = End of Transmission
                  '            BuffPtrWS = 0
                  '        endif
                          
                  '        BufferWS(BuffPtrWS) = CharBuff2
                  
                  '        'Cicular buffer
                  '        BuffPtrWS = BuffPtrWS + 1
                          
                  '        if BuffPtrWS >= BFLN_WS_BUF then
                  '            BuffPtrWS = 0
                  '        endif
                          
                      ENDIF
                  
                  @ INT_RETURN
                  
                  OverIntHandlers:
                  
                  TmrTick = 0
                  Timeout = TIMEOUT_1sec
                  
                  '----[ A/D ]-------------------------------------------------------
                  ANSELA = 0
                  ANSELB = 0
                  ANSELC = 0
                  CCP1CON = 0
                  CCP2CON = 0
                  ADCON0 = 0
                  ADCON1 = 0  'A/D VREF+ connected to internal signal, FVR BUF2
                  ADCON2.7 = 1    'A/D Conversion Result Format : Right justified
                  
                  
                  '----[ I/O ]-------------------------------------------------------
                  
                  TRISB.7 = 1 'RX2
                  TRISB.6 = 1 'TX2
                  TRISB.3 = 0
                  
                  '----[ UART 2 = Debug ]-------------------------------------------------------
                  Init_UART2:
                      RCSTA2 = $90   ' Enable serial port & continuous receive
                      TXSTA2 = $24   ' Enable transmit, BRGH = 1
                      SPBRG2 = 130   ' 9600 Baud @ 64MHz, -0.02%
                      SPBRGH2 = 6
                      BAUDCON2.3 = 1 ' Enable 16 bit baudrate generator
                  
                  
                      'Empty EUSART2 input buffers
                      CREN2 = 0
                      CharBuff2 = RC2REG
                      PAUSE 50
                      CREN2 = 1
                      SPEN2 = 1
                      RC2REG = 0
                      
                      RC2IP = 1       'EUSART2 Receive Interrupt Priority bit : high priority
                      RC2IE = 1       'Enable RX2 Interrupts  
                  @ INT_ENABLE  RX2_INT  ; Enable RX2 Interrupts  
                  
                  '----[ Timer1 init ]-------------------------------------------------------
                  Timer1_init:
                      TMR1CLK = %00000001 'Fosc/4 (p.230)
                      T1GCON = 0          'Gate control - Timer1 is always counting (p.229)
                      T1CON = %00110100   'Timer0 off, 8bits read, 1:8, freq=30.517 Hz, overflow @ 32.7684 mSec
                  
                      TMR1H = 0
                      TMR1L = 0
                      TMR1ON = 1
                  
                      TMR1IP = 0      ' TMR1IP TMR1 Overflow Interrupt Priority bit : Low priority
                      TMR1IE  = 1     ' Enable TMR1 overflow interrupt
                      TMR1IF  = 0     ' Clear  TMR1 interrupt flag
                     
                  @ INT_ENABLE  TMR1_INT    ; enable timer 1 interrupts
                  
                     
                  '----[ Interrupt control ]-------------------------------------------------------
                  GIEL = 1     ' Enable peripheral interrupts
                  GIEH = 1     ' Enable global interrupts
                  
                  NVMCON1.7 = 1   'ref.: http://support.melabs.com/threads/1178-Support-for-new-18F-chips?p=3538&viewfull=1#post3538
                  
                  PORTB.3 = 1
                  pause 2000
                  PORTB.3 = 0
                  
                  hserout2 [13,10,13,10, "PIC18F27K40 test serial", 13,10]
                  
                  main:
                  
                  	if TmrTick >= Timeout then
                          Timeout = TmrTick + TIMEOUT_1sec
                          hserout2 ["TmrTick=", dec TmrTick, 13, 10]
                          PORTB.3 = 0
                  	endif
                  
                      if CharBuff2 <> 0 then
                          hserout2 ["CharBuff2=", CharBuff2, 13, 10]
                          CharBuff2 = 0
                          Timeout = TmrTick + TIMEOUT_500msec
                      endif
                      
                  
                  goto main
                  I found an error regarding IPEN on DT-INTs posted by mpgmike..
                  "OverCREATE
                  bsf RCON,IPEN, 0 ; Enable Interrupt Priorities
                  bsf INTCON,GIEL, 0 ; Enable Low Priority Interrupts
                  endm"
                  on PIC18F27k40 IPEN is on INTCON register, not RCON
                  Don´t know if it has any kind of influence on your issue...

                  Comment


                  • #39
                    Originally posted by sergio_tx View Post
                    I found an error regarding IPEN on DT-INTs posted by mpgmike..
                    "OverCREATE
                    bsf RCON,IPEN, 0 ; Enable Interrupt Priorities
                    bsf INTCON,GIEL, 0 ; Enable Low Priority Interrupts
                    endm"
                    on PIC18F27k40 IPEN is on INTCON register, not RCON
                    Don´t know if it has any kind of influence on your issue...
                    Tanks for the tip, I've implemented it on mpgmike's version of DT's interrups. I've worked on it a couple of hours yesterday and it doesn't correct the problem. Will continue today.

                    Comment


                    • #40
                      Originally posted by Charles Leo View Post
                      I've posted a new beta with the NVMCON1 workaround:
                      http://pbp3.com/downloads/PBP3_310_BETA_Setup.exe

                      This installation only allows compilation for the new chips that need testing, so you shouldn't replace your existing PBP installation. Rather, install to a separate folder.

                      We're still chasing a pesky versioning bug in the new exe file, so this one will still identify as 3.0.9. You'll know it's the beta because the list of available devices will be short.

                      This also has fixes for READ/WRITE commands in the 16F183xx series.

                      Hi Charles,
                      Can you please confirm if this version has implemented the WRITE and READ commands for 18F27K40? I´m trying to Write and Read from EEprom without success.
                      Thanks,
                      Sérgio

                      Comment


                      • #41
                        Originally posted by sergio_tx View Post
                        Hi Charles,
                        Can you please confirm if this version has implemented the WRITE and READ commands for 18F27K40? I´m trying to Write and Read from EEprom without success.
                        Thanks,
                        Sérgio
                        Yes, as far as I know READ and WRITE are working. I tested briefly on the 18F47K40, but that was before I added the NVMCON1.7 workaround. I will test again when I get time.
                        Charles Leo
                        ME Labs, Inc.
                        http://melabs.com

                        Comment


                        • #42
                          TMR1_INT works but RX2_INT doesn't. The processor jump somewhere else
                          I haven't tried the updated DT-INTs, but the issue could be related to the fact that on the K40 all of the PIR, PIE, and IPR registers aren't located in the access bank anymore... they're in bank 14 so they'd need banksel instructions to access them.

                          I don't recall seeing this on other chips.

                          Comment


                          • #43
                            Here's a stab at an updated version of mpgmike's DT-INT for the K40. I added the IPEN fix, changed register accesses to use banksel, and cleaned up the whole K40 device selection code.

                            It compiles, but I don't have a K40 to test it on...
                            Attached Files

                            Comment


                            • #44
                              I am struggling to make Pickit 3 work with the IPE environment and program the K40 thing...

                              I 'll try your fix as soon as I am able to use the Pickit.

                              Unfortunately I have also another programmer but is obsolete now (Pikprog+ by Elnec) and does not support new chips. Classic, buy our new shiny programmer...!

                              Ioannis

                              Comment


                              • #45
                                Originally posted by Ioannis View Post
                                I am struggling to make Pickit 3 work with the IPE environment and program the K40 thing...
                                If you use the pickit3 with other software you must make sure that the IPE correctly reprograms the PK3.

                                Remove any target connections and hit 'Connect'
                                If you get a 'Connection failed' message keep hitting 'Connect' until it downloads all three sections.
                                For me it takes 4 tries...

                                downloading bootloader...
                                downloading RS...
                                downloading AP...

                                Finally you should end up with:
                                Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.

                                Things should work normally after this.

                                Comment

                                Working...
                                X