DT_INTS-14.bas Reset Flag


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012
    Location
    Georgia, USA
    Posts
    20

    Default DT_INTS-14.bas Reset Flag

    Question,
    When using Darrel Taylor's
    "DT_INTS-14.bas"
    What does the Reset Flag Do?
    When using with PIC 16F877
    HSERIN
    I have seen examples both ways, and did not understand how what it was used for.

    Thanks
    LarryD

    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler RX_INT, _Getbytes, PBP, no
    endm
    INT_CREATE ; Creates the interrupt processor
    ENDASM

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: DT_INTS-14.bas Reset Flag

    Hi,
    When the the ResetFlag "switch" in the interrupt declaration is set to YES it tells the interrupt system to clear the interrupt request flag when returning from the interrupt service routine.

    However, the interrupt request flag for the USART RX is automatically cleared by the hardware when you read the FIFO buffer (which is what happens when HSERIN execute) so there's no need to have the software to clear it as well.
    I can't say if it's valid for all devices but on the 16F1825 for example the RCIF is read only and can't BE cleared by software so having the ResetFlag "switch" set to yes makes no sense.

    /Henrik.

  3. #3
    Join Date
    Dec 2012
    Location
    Georgia, USA
    Posts
    20

    Default Re: DT_INTS-14.bas Reset Flag

    Henrik,
    Thank you so much.
    I have been trying to understand how to use with HSERIN, and had seen it both ways,
    and wanted to understand how it works.
    Thanks again.

    Larryd

Similar Threads

  1. Replies: 2
    Last Post: - 8th December 2012, 06:50
  2. pulsin problem using IOC with DT_int14.bas
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 5th December 2012, 10:00
  3. DT_INTS-14 /interrupts enable bits / flag bits
    By bogdan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th May 2009, 19:42
  4. DS18B20 Busy Flag
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th November 2006, 14:21
  5. Replies: 6
    Last Post: - 20th August 2006, 23:00

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