Interupts and Command string


Results 1 to 14 of 14

Threaded View

  1. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Something to mess 'round with i guess this weekend for me.. one more

    How about that untested version
    Code:
    USARTInterrupt:
        '    Here's the interrupt routine
    
        HSERIN [DEC Qualifier]
        Branch QUALIFIER,[Sub1,Sub2,Sub3]
    
    Sub1:
        HSERIN [DEC2 hours, DEC2 Minutes, DEC2 Seconds, DEC2 suseconds]
        Write 5, hours
        Write 6, minutes
        Write 7, seconds
        write 8, suseconds
        HSEROUT ["You sent Red", DEC2 hours, DEC2 Minutes, DEC2 Seconds, DEC2 suseconds]
        Goto GetOutOfHere
    
    Sub2:
        HSEROUT ["You sent Blue"]
        Goto GetOutOfHere
    
    Sub3:
        HSEROUT ["You send Green"]
    GetOutOfHere:
    Resume
    enable interrupt
    And be sure you have some delay between each PC send.. i Mean wait between QUALIFIER and the rest of the process. Some VBTimer are really usefull in those case.

    Personnally, i never mess with string handling. Just use BRANCH and send the according value. Time saving and work anyway.
    Last edited by mister_e; - 17th March 2006 at 16:08.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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