Wired remote for Alpine


Closed Thread
Results 1 to 39 of 39

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    I made some changes ....
    Code:
    VolUp:
        GOSUB SendPreAmble
        ' 01010111 10101010 1
        ' Each individual byte reversed
        OutBuffer[0] = %11101010
        OutBuffer[1] = %01010101  ; modified
        OutBuffer[2] = %00000001
        
        BitsToSend = 17
        
        GOSUB SendBits
        GOSUB SendPostAmble
        
        OutBuffer[0] = %11101010
        OutBuffer[1] = %01010101  ; modified
        OutBuffer[2] = %00000001
        
            BitsToSend = 17
        
        GOSUB SendBits
        GOSUB SendPostAmble
        
        OutBuffer[0] = %11101010
        OutBuffer[1] = %01010101  ; modified
        OutBuffer[2] = %00000001
        
            BitsToSend = 17
        
        GOSUB SendBits
        GOSUB SendFinalAmble    
    RETURN
    and added this :
    Code:
    SendFinalAmble:
    ' 01111111 11111111 11111111 11111111 11111111 11111111 11111111 111111
        OutBuffer[0] = %11111110
        OutBuffer[1] = %11111111
        OutBuffer[2] = %11111111
        OutBuffer[3] = %11111111
        OutBuffer[4] = %11111111
        OutBuffer[5] = %11111111
        OutBuffer[6] = %11111111
        OutBuffer[7] = %11111111
        
        BitsToSend = 54
        
        GOSUB SendBits
    RETURN
    ...and in Proteus look fine !

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Are you sure you actually have to send the command three times? Personally I have NO knowlage about these things but I would've guessed (if this is captured from a remote for example) that it just kept repeating the command and postamble untill the button was released and then issued the 'FinalAmble'. So perhaps Preamble, Command, FinalAmble is all you actually need? Oh well, like I said, I have no idea really - just guessing, you'll figure it out.

    /Henrik.

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    My informations are from one user of AVFORUMS.COM.
    "Every time you send the device and command codes, you should repeat the device and command codes three times, but pause between them for about 20ms." I think it's true...

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Still beta-testing ...
    I wonder...It's one way to obtain EXACTLY 536.5 us ?!?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Depends.... What's you oscillator speed? At 20Mhz an instruction cycles is 200ns so, in theory, doing something like
    Code:
    PauseUs 536
    @ NOP
    @ NOP
    should get you pretty close (536.4us). If the timing is that critical then it's probably not going to work the way I wrote it since there will be "gaps" between the preamble, command, postamble etc. You'd need to build the complete message in a larger array and then send it but that gets a bit complicated due to the variation in length of the commands (they won't line up at even byte boundries).

    /Henrik.

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Thank You for support !
    The oscillator is 4 MHz...

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Hi,
    Well, at 4Mhz each instruction cycle is 1us so the smallest time possible to resolve at that speed is just that - 1us. I don't think I can come up with any way to get higher resolution without increasing the oscillator speed.

    /Henrik.

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