Assembly Interrupts for PIC 18F27K42


Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Mar 2020
    Posts
    9

    Default Assembly Interrupts for PIC 18F27K42

    The attached file demonstrates implementing non-vectored interrupts in assembly for a PIC 18F27K42. For this exercise, Timer1 and Timer3 are configured to run concurrently and each generates an interrupt on rollover. The interrupt service routine (ISR) demonstrates how to: disable additional interrupts during processing the current interrupt; determine which timer generated the interrupt; increment a rollover counter; reset the interrupt flag; re-enable interrupts; and return to the main program. All Timer and interrupt configuration is handled in the main code. The Main code includes a forever loop that toggles indicator LEDs when each timer counter equals a predefined trigger value. I do not code in Assembler, so there are likely better ways to do this. It works for my application, which is measuring time values for a tach measuring RPM from <100 to >11K. References for my approach include Section 6.3 of the PBP3 compiler reference manual; Section 41 Instruction Set Summary of the PIC18F27K42 datasheet; and various internet sources, including discussions on this forum.
    Attached Files Attached Files

Similar Threads

  1. Replies: 2
    Last Post: - 8th February 2009, 05:10
  2. assembly in Pic
    By lerameur in forum Off Topic
    Replies: 11
    Last Post: - 1st May 2008, 20:06
  3. decoding PIC assembly -- need help
    By uchiprox in forum General
    Replies: 1
    Last Post: - 12th February 2007, 04:19
  4. Simultaneous equation using PIC assembly
    By mankan in forum General
    Replies: 2
    Last Post: - 11th September 2006, 19:16
  5. PIC to PIC communication and interrupts
    By lwindridge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd June 2004, 05:59

Members who have read this thread : 2

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

Tags for this Thread

Posting Permissions

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