HSERIN & Interupts (aka controlling PIC programs from a remote PC)


Results 1 to 17 of 17

Threaded View

  1. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default It's all in DT-Ints.

    Code:
    '::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    <font color=red>INT_Handler RX_INT, _Get_char,  PBP,  yes</font color>
    endm
    INT_CREATE ; Creates the interrupt processor
    ENDASM
    
    '::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    
    <font color=blue>@ INT_ENABLE RX_INT ; enable UART RX interrupt
    </font color>
    The code in red is the receive interrupt, open DT-INTS and READ the options available, in amongst those are RB and INT choices, add them the way Darrel wrote them, into your interrupt macro, then enable them as done in Blue.
    Example:
    Code:
    '::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler RX_INT, _Get_char, PBP, yes
    INT_HANDLER INT_INT, _MyNewLabel, PBP,yes
    endm
    INT_CREATE ; Creates the interrupt processor
    ENDASM
    
    '::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    
    @ INT_ENABLE RX_INT ; enable UART RX interrupt
    @ INT_ENABLE INT_INT ;enable External Interrupts
    Here is your selection snipped from DT-Ints14
    Code:
      #define INT_INT   INTCON,INTF     ;-- INT External Interrupt
      #define RBC_INT   INTCON,RBIF     ;-- RB Port Change Interrupt
      #define TMR0_INT  INTCON,T0IF     ;-- TMR0 Overflow Interrupt 16F
      #define TMR1_INT  PIR1,TMR1IF     ;-- TMR1 Overflow Interrupt
      #define TMR2_INT  PIR1,TMR2IF     ;-- TMR2 to PR2 Match Interrupt
      #define TX_INT    PIR1,TXIF       ;-- USART Transmit Interrupt
      #define RX_INT    PIR1,RCIF       ;-- USART Receive Interrupt
      #define CMP_INT   PIR2,CMIF       ;-- Comparator Interrupt
      #define EE_INT    PIR2,EEIF       ;-- EEPROM/FLASH Write Operation Interrupt
      #define BUS_INT   PIR2,BCLIF      ;-- Bus Collision Interrupt
      #define PSP_INT   PIR1,PSPIF      ;-- Parallel Slave Port Read/Write Interrupt
      #define AD_INT    PIR1,ADIF       ;-- A/D Converter Interrupt
      #define SSP_INT   PIR1,SSPIF      ;-- Master Synchronous Serial Port Interrupt
      #define CCP1_INT  PIR1,CCP1IF     ;-- CCP1 Interrupt
      #define CCP2_INT  PIR2,CCP2IF     ;-- CCP2 Interrupt
    INT_Handler RX_INT, _Get_char, PBP, yes tells the PIC<b> WHICH</b> interrupt to use and <b>WHICH</b> label to jump to.
    Last edited by Archangel; - 16th June 2009 at 18:03.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Replies: 26
    Last Post: - 2nd October 2017, 11:35
  2. Direct PIC to PC without MAX232
    By acjacques in forum Serial
    Replies: 14
    Last Post: - 23rd October 2014, 21:32
  3. Send data PIC to PC
    By konter in forum Off Topic
    Replies: 6
    Last Post: - 25th December 2009, 22:04
  4. Replies: 67
    Last Post: - 8th December 2009, 02:27
  5. Controlling power to a PIC with another PIC
    By jswayze in forum Off Topic
    Replies: 3
    Last Post: - 28th May 2005, 19:44

Members who have read this thread : 0

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