Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4787

DT_Interupts with 18F2525

$
0
0
Been trying to get RX_INT to work with 18F2525, I can get it with 18F1320 but I seem to be missing something. Any help would be great...
Here is what I have

Code:

   
    INCLUDE "modedefs.bas"
    Include "ALLDIGITAL.pbp"
    INCLUDE "DT_INTS-18.bas"    ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas"    ; Include if using PBP interrupts
    OSCCON =$60 'clock speed
    DEFINE OSC 4
   
    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
ASM
INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
        INT_Handler    RX_INT,    _read_serial,  PBP,  yes
       

  endm
    INT_CREATE            ; Creates the interrupt processor
ENDASM

@  INT_ENABLE  RX_INT    ; enable external (RX) interrupts

The Fuses are set as:
__CONFIG _CONFIG1H, _OSC_INTIO67_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
__CONFIG _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
__CONFIG _CONFIG4L, _LVP_OFF_4L & 0bfh ;_XINST_OFF_4L


Thanks in advance

Viewing all articles
Browse latest Browse all 4787

Trending Articles