Hserin and Timer0


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1

    Default Hserin and Timer0

    Hi,

    I have a question,I use Timer0 to Refresh my Real Time all is ok all work fine but my problem is when I use this:

    On Interrupt goto IntHandler ''''''''''''''''''''''''''''''''''''''''''''''''In terrupt Routine
    LoopHauptMenu:

    HSerin 10000,Main_RFID,[Menupunkt]

    .......
    .......
    Disable
    IntHandler:
    IF TMR0IF then Timer
    Resume
    Timer:
    TMR0IF = 0 '''''''''''''''''''''''''''''''''''''''''''''Clear Timer 0 Interrupt
    TMR0H = $3C
    TMR0L = $AF
    Gosub ReadTime
    Gosub Read_BCD
    Lcdout $fe,$80," RFID Leser "
    Lcdout $fe,$C0," ",DEC2 Stunde[0],":",DEC2 Minute[0],":",DEC2 Sekunde[0]," "
    Resume
    Enable
    Every 10 Seconds my Time is Refreshing!

    And when I use this :

    On Interrupt goto IntHandler ''''''''''''''''''''''''''''''''''''''''''''''''In terrupt Routine
    LoopHauptMenu:

    HSerin 1000,LoopHauptMenu,[Menupunkt]

    .......
    .......
    Disable
    IntHandler:
    IF TMR0IF then Timer
    Resume
    Timer:
    TMR0IF = 0 '''''''''''''''''''''''''''''''''''''''''''''Clear Timer 0 Interrupt
    TMR0H = $3C
    TMR0L = $AF
    Gosub ReadTime
    Gosub Read_BCD
    Lcdout $fe,$80," RFID Leser "
    Lcdout $fe,$C0," ",DEC2 Stunde[0],":",DEC2 Minute[0],":",DEC2 Sekunde[0]," "
    Resume

    All is ok is refreshing every seconds why is this so?!

    Thank you for any answer.

    Regards Pesti

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Ok

    I found on the PBP book the Answer ,but not the solution.

    Where Can I found a good Assembler Interrupt example ?

    regards Pesti

  3. #3
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Where Can I found a good Assembler Interrupt example ?
    you could take a look at Darrel Taylors instant interrupts routines, http://darreltaylor.com/DT_INTS-18/home.html
    if you are using 18F's
    They have made interrupts so much easier, especially for me.

    HTH

    Duncan

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Hi

    I have try Darrels Instant Interrups ,but all the time show the Error 108.

    Warning[207] C:\PICHEX\USBWIZ.ASM 1849 : Found label after column 1. (warning)
    Error[108] C:\PICHEX\USBWIZ.ASM 1849 : Illegal character (")


    I can not found the Errors!

    Rgards Pesti

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pesticida View Post
    Hi
    I have try Darrels Instant Interrups ,but all the time show the Error 108.
    Warning[207] C:\PICHEX\USBWIZ.ASM 1849 : Found label after column 1. (warning)
    Error[108] C:\PICHEX\USBWIZ.ASM 1849 : Illegal character (")
    I can not found the Errors!
    Rgards Pesti
    Do you have an extra ' <- yes, that character right there, the little extra tick
    in between a couple of quotation marks. They hide very well. Or maybe an extra quote mark somewhere?

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Pesti,
    I get errors like those if I have spaces where they do not belong, I am sure you are using MPASM 'cause I think you have to for 18F parts, but Darrel's Instant Interrupts also require them. One more thing is Darrel has different DT_Instant interrupts for 16f and 18F series.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. HSERIN2 not working on PIC18F97J60 ???
    By mikebar in forum Serial
    Replies: 8
    Last Post: - 4th May 2008, 15:20

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