Interrut Driven Oscillator


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Ben,

    Maybe a few more comments in the ASM routine will help.
    Code:
    ASM
        RST?RP                         ;        Set to BANK0
        BCF     T1CON,TMR1ON           ;        Turn off timer
        MOVF    _TMR1Reload ,W         ;  1      Get LOW byte of TMR1Reload 
        ADDWF   TMR1L,F                ;  1      add it to LOW byte of TMR1
        BTFSC   STATUS,C               ;  1/2    If addition caused a carry
        INCF    TMR1H,F                ;  1      add carry to HIGH byte of TMR1
        MOVF    _TMR1Reload+1,W        ;  1      Get HIGH byte of TMR1Reload
        ADDWF   TMR1H,F                ;  1      add it to HIGH byte of TMR1
        BSF     T1CON,TMR1ON           ;  1     Turn TIMER1 back on
    ENDASM
    HTH,
        Darrel
    Last edited by Darrel Taylor; - 2nd January 2005 at 00:38.

Similar Threads

  1. PBP and 18F2550
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 15th January 2012, 06:34
  2. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  3. Oscillator Troubles
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th December 2007, 17:15
  4. Advice please - Warning message
    By malc-c in forum mel PIC BASIC Pro
    Replies: 50
    Last Post: - 23rd January 2007, 13:20
  5. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41

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