Help with configuring


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Help with configuring

    Anyone?????
    ___________________
    WHY things get boring when they work just fine?

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: Help with configuring

    if you enable interrupts and provide no code to service the interrupt and worse still provide no code to reset the interrupt flag what do you expect to happen ?

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Help with configuring

    Here you are:
    Code:
    ISR:
    asm
            movwf   wsave           ; Save WREG
            swapf   STATUS, W
            clrf    STATUS          ; Point to bank 0
            movwf   ssave           ; Save STATUS
            movf    FSR,w
            movwf   fsave          ; save FSR
            movf    PCLATH, W       ; Save PCLATH
            movwf   psave
    
    
            ; get ready to jump within the ISR page
            movlw   ((INTHAND) >> 8) ; Set PCLATH for jump
            movwf   PCLATH
            btfsc   INTCON, INTF
            goto    ZeroCrossingInt
    
    T0Overflow
            bcf     INTCON, T0IF    ; clear the timer overflow flag
    
            goto    EndInt
    
    ZeroCrossingInt
            bcf     INTCON, INTF    ; clear the interrupt
    
    EndInt  ; restore the machine state and return from interrupts
            movf    fsave,w
            movwf   FSR             ; restore FSR
            movf    psave,w
            movwf   PCLATH          ; restore PCH
            swapf   ssave,w
            movwf   STATUS          ; restore Status
            swapf   wsave,f
            swapf   wsave,w         ; restore WREG
            retfie
    endasm
    ___________________
    WHY things get boring when they work just fine?

Similar Threads

  1. configuring AD converter in a 12F615
    By tekart in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 1st June 2011, 04:38
  2. Configuring 16F616
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th February 2009, 17:28
  3. Configuring register problem
    By shawn in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd January 2005, 21:03
  4. configuring the internal oscillator
    By bartman in forum General
    Replies: 12
    Last Post: - 30th November 2004, 01:41
  5. need help configuring 16F628
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd March 2004, 19:59

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