Announcement

Collapse
No announcement yet.

18xxK40 and darrels DT_INT-18.BAS support

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

  • 18xxK40 and darrels DT_INT-18.BAS support

    just wondering because of the changes of how microchip changed the registers on the series of chips that all the fuctions of DT_INT_18.BAS are correct for this chip set ?

  • #2
    Short answer, no. Long answer, some of the lines of code need modified for the K40 parts. Furthermore, a modified DT_INT-18 that works with the 28 & 40 pin chips doesn't work with the 60/80 pin versions. What I did was to open Daryl's DT_INT-18.bas and open the XXXK40 Data Sheet, then go line-by-line with the PIE-PIR locations to make them compatible with the K40 chip. In practice, it seemed to work best when I deleted USB and other functions non-applicable to the processor in question. Finally, I saved the modified INCLUDE as DT_INT-18-K40.bas so it didn't get confused with other versions.
    We can crack this cotton PIC'n thang!

    Comment


    • #3
      There is a version of DT_INTS-18 floating around where someone (perhaps that was you mpgmike?) have added support for that family of chips. I have not used it so I can't say if it works properly or not. I have that file but not available to me right now, let me know if you can't find it and I'll post it.

      /Henrik.

      Comment


      • #4
        be good to get it "officially" added to to the support group , if its been done , probably need to also look at the variations of the chip set in the k40 range , and also when charles releases the k42 support as well , although from the registers i looked at for k42 , the support for k40 should be the same

        Comment


        • #5
          perhaps if it is added to the other code location done by darrel repository , with updated description notes ?


          cheers sheldon

          Comment


          • #6
            Here is the thread where we got it working on the 2X_4X-K40 chips. There are some differences on the 6X_8X versions:

            http://support.melabs.com/forum/picb...outine-for-k40
            We can crack this cotton PIC'n thang!

            Comment


            • #7
              can you document the changes required for the 2x_4x , and for the 6x and 8x into the DT_INTS_18_K40 , and submit it
              , also your link indicated the int_rx2 may have some issues ??

              Comment


              • #8
                Originally posted by longpole001 View Post
                can you document the changes required for the 2x_4x , and for the 6x and 8x into the DT_INTS_18_K40 , and submit it
                , also your link indicated the int_rx2 may have some issues ??
                No. If you need it to do something it doesn't, I'm afraid you'll have to go over it with a K40 data sheet and tweak it for your needs. There is a bunch of Assembly code that stores data and addresses before launching the Interrupt Handler. Don't worry about any of that. If you look at the lines pertaining to the DOSOMETHING_INT, you'll see there's a clear pattern. Copy/paste any of the lines of code and alter it to reflect what you need it to do from the data sheet listings for stuff like PIE, PIR, etc. The K40 project required Changing register locations. That's the big difference between the 2/4X K40 and the 6/8X K40, SFR address locations are different. I don't have time to go back over the code and provide what you request.
                We can crack this cotton PIC'n thang!

                Comment


                • #9
                  see http://support.melabs.com/forum/picb...8f-chips/page3 post #43

                  I fixed the K40 support and renamed it DT_INTS-18_3_4b.pbp
                  It should support the 64-pin 6xK40 as well as 2x/4xK40

                  Didn't know there was an 80-pin version...

                  Comment


                  • #10
                    there is no 80 pin chips for k40 series as yet , thanks for the updated version ,

                    I not in the comments on another post that the

                    Code:
                    #if __PROCESSOR__ = "18F24K40" or __PROCESSOR__ = "18F25K40" or _
                        __PROCESSOR__ = "18F26K40" or __PROCESSOR__ = "18F27K40" or _
                        __PROCESSOR__ = "18F45K40" or __PROCESSOR__ = "18F46K40" or __PROCESSOR__ = "18F47K40" or _
                        __PROCESSOR__ = "18LF24K40" or __PROCESSOR__ = "18LF25K40" or _
                        __PROCESSOR__ = "18LF26K40" or __PROCESSOR__ = "18LF27K40" or _
                        __PROCESSOR__ = "18LF45K40" or __PROCESSOR__ = "18LF46K40" or __PROCESSOR__ = "18LF47K40"
                    ]

                    should this not OR 's but AND's ???
                    as seen on this post

                    http://support.melabs.com/forum/picb...outine-for-k40

                    also for your info the files was changed from ver 3_3 when the K22 series came out as microchip changed the timer 4 and other registers , but the fix was documented in the file from what i can see

                    http://www.picbasic.co.uk/forum/showthread.php?t=15344

                    Comment


                    • #11
                      should this not OR 's but AND's ???
                      No. mpgmike's original K40 version used two device comparisons... one using equal/OR and another using not equal/AND.
                      I simplified that into a single comparison and just set a #define flag.

                      Wasn't aware of the K22 version. I'll incorporate that and post it here.

                      Comment

                      Working...
                      X