Group - ungroup of commands


Results 1 to 16 of 16

Threaded View

  1. #3
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Group - ungroup of commands

    Thank You !
    Unfortunately, my code it's a little ... special and this procedure dont work ...
    My code :
    Code:
    Main:
    ;reading buttons on line 2    
        Portb.0 = 0
        TrisA.1 = 1
        pause 10
        status_3 = PortA & 011100
        Portb.0 = 1
        TrisA.1 = 0
        select case status_3
                    case 12
                    Gosub Starting  ; this is "header"
                    Gosub Sursa     ; ths is "body"
                    case 20
                    Gosub Starting  ; this is "header"
                    Gosub VolUp     ; this is "body", composed by Adresa + VolUp
                    case 24
                    Gosub Starting
                    Gosub VolDn 
        end select                       
    Goto main
    
    STARTING:
    PORTB.4 = 0
    pauseus 8400
    PORTB.4 = 1
    pauseus 4200
    Return
    
    ADRESA:
        For i = 0 to 7
        lookup2 i, [a,a,a,a,b,b,b,a], j
        PORTB.4 = 0
        PauseUs 526
        PORTB.4 = 1
        PauseUs j
        next i 
    Return
    
    VolUp:
    GOSUB ADRESA
        for i = 0 to 7
        lookup2 i, [b,b,a,b,b,b,b,a], j
        PORTB.4 = 0
        PauseUs 526
        PORTB.4 = 1
        PauseUs j
        next i
    Pause 12    
    Return
    Last edited by fratello; - 4th May 2012 at 16:49.

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