DT_INTS and 18F26k22


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    Ohio, USA
    Posts
    57


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    Terribly Sorry Richard, though it might be a fuse setting

    PBP ver = 2.60A
    DT_INTS ver = 3.3

    So far I have just a debug statement and a high/ low/ pause on PORTB.2
    I added the Include and it threw the error

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,702


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    if you don't create at least one valid interrupt no interrupt handler is created
    hence
    Symbol not previously defined (INT_ENTRY_H) error occurs

    the dt_ints include has nothing to work with and just can't cope
    Warning I'm not a teacher

  3. #3
    Join Date
    Jul 2009
    Location
    Ohio, USA
    Posts
    57


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    Thank you for cluing me in

  4. #4
    Join Date
    Jul 2009
    Location
    Ohio, USA
    Posts
    57


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    I have had some issues with the different versions of PBP so I upgraded to Vs PBPX 3.1.0.4

    This program compiles just fine but it does not enter the interrupt on RX
    Code:
        INCLUDE "modedefs.bas"
        include "ALLDIGITAL.pbp"
        INCLUDE "C:\PBP\DT_INTS-18.bas"     ; Base Interrupt System
        INCLUDE "C:\PBP\ReEnterPBP-18.bas"     ; Include if using PBP interrupts
           
        Define PULSIN_MAX 1000
        DEFINE HSER_RCSTA 90h   'Hser receive status init
        DEFINE HSER_TXSTA 24h   'Hser transmit status init
        DEFINE HSER_BAUD 9600  'Hser baud rate
        DEFINE HSER_SPBRG 25
        DEFINE HSER_CLROERR 1 
        DEFINE OSC 4
        OSCCON =$D2 'clock speed
         mem1 var byte  
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,     Type, ResetFlag?
            INT_Handler    RX1_INT,    _read_serial,   PBP,  yes
            
    
       endm
        INT_CREATE             ; Creates the interrupt processor
    ENDASM   
    
    @  INT_ENABLE   RX1_INT     ; enable external (RX) interrupts 
    
       
     MAIN:
     
     SEROUT2 PORTB.0 ,16468,["here",cr,cr]
    
     pause 500
    GOTO MAIN  
     
     read_serial:
     hserin 250 , NoRS232,[mem1,mem1]
     
     serout2 PORTB.0,16468,["got it",cr]
     Pause 1000
    
    @ INT_RETURN 
    
    NoRS232:
    
    serout2 PORTB.0,16468,["No rs232",cr]
    
    @  INT_RETURN
    The exact same code runs in the 18F1320 except the OSCCON is $60 for the 18F1320 and $D2 for the 18F26K22.

    Does anyone know where I might be needing to look?


    Mike

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    A few things I learned about the DT_INT routines is:

    1 - You must have a copy of the DT_INT and ReEnterPBP code in the file where you save your current program. PBP3 will not search the computer and create a path. Thus, I have multiple copies of the code on my computer.

    2 - It is helpful to open the DT_INT in PBP3 and look at how the "RX1_INT" is structured in the code, and where it is looking for PIE, PIR, etc. The K22 family is relatively new, and as you stated, OSCCON SFR is structured differently than for older chips. You may have to alter the DT_INT itself, or alter the way you INT_LIST your IntSource.

    3 - At the top of the DT_INT (I believe for the PIC12F/16F) there are multiple wsave options that you have to comment out or uncomment, depending. I don't remember the -18 requiring that, but I may be wrong. On the lower chips, you must include one of the wsave options in your variable declarations of your main code (wsave VAR BYTE $20 SYSTEM for example).

    I'd wager a guess the issue you're having is #1, your interrupt routines are not in the folder you're saving your current program.

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    mpgmike, I have been using DT_INTS-18 for quite a while with 18F26K22 parts as soon as Microchip released them. It's been a few years now. I have never had to change anything to do with Darrels code. What are you talking about?
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    Quote Originally Posted by mpgmike View Post

    1 - You must have a copy of the DT_INT and ReEnterPBP code in the file where you save your current program. PBP3 will not search the computer and create a path. Thus, I have multiple copies of the code on my computer.
    FYI: You can specify a relative path. I have a separate folder for all my includes. It is located in the same root folder of all my projects:


    Code:
    C:\
         ---Somewhere
               ---MyPBPProjects
                    ---MyIncludes
                    ---Project1
                    ---Project2
                    ---Project3
    Here my include folder is named _Include
    Code:
    INCLUDE  "..\_Include\DT_INTS-18\DT_INTS-18.bas"   ' Base Interrupt System
    INCLUDE  "..\_Include\DT_INTS-18\ReEnterPBP-18.bas"   ' Include if using PBP interrupts
    
    ...
    
    INCLUDE "..\_Include\DT_INTS-14_V110\DT_INTS-14.bas"   ' Base Interrupt System
    INCLUDE "..\_Include\DT_INTS-14_V110\ReEnterPBP.bas"   ' Include if using PBP interrupts
    
    ...
    
    INCLUDE "..\_Include\ESP8266_Base.pbp"
    INCLUDE "..\_Include\NMEA_base.pbp"
    'etc

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS and 18F26k22

    Michel, That is exactly the way I have been doing mine for years....
    Dave Purola,
    N8NTA
    EN82fn

Similar Threads

  1. DT_Ints w/18F26K22 stop if incorrect baud rate
    By Dave in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 8th September 2017, 14:54
  2. PROBLEM ICD 18F26K22 no work
    By FRAN200 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 4th July 2016, 13:55
  3. 18F26K22 slow startup
    By Tobias in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th January 2014, 23:10
  4. Compiling for 18F26K22 - Does anyone have a solution for me?
    By Balachandar in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th August 2012, 13:49
  5. Anyone found a Bootloader for 18F26K22?
    By Dave in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th August 2011, 19:23

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts