Problem with ASM IRQ using FSR0 on PIC18F252


Results 1 to 11 of 11

Threaded View

  1. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hey Michael,

    This doesn't really explain your problem, but in this section...
    Code:
    ; save the FSR value because it gets changed below
        movf       Low FSR0, W
        movwf      fsave
        movf       High FSR0, W
        movwf      fsave+1
    It's really just saving address 00 instead of saving the contents of the FSR0 registers. (FE9 and FEA)

    The symbol FSR0 equates to 0x0h. It's for use with LFSR etc.

    I believe it should be like this.
    Code:
    ; save the FSR value because it gets changed below
        movf       FSR0L, W
        movwf      fsave
        movf       FSR0H, W
        movwf      fsave+1
    It's the same again when trying to restore it.

    HTH,
       Darrel
    Last edited by Darrel Taylor; - 14th June 2005 at 07:14.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 13:43
  3. Problem using ASM instruction
    By ewandeur in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd April 2008, 15:26
  4. pic18f252 hserout problem
    By edysan in forum Serial
    Replies: 4
    Last Post: - 16th June 2006, 20:46
  5. problem with asm interrupt
    By servo260 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th December 2004, 17:02

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