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: Ready for a new challenge ?! Just a joke, of course !

    I have all information about code for JVC remote : http://www.avforums.com/forums/car-e...l#post16560076
    The code is ... SO BIG ....
    This is how commands look :
    Code:
    11111111000000000000000011111111
    01110111011101110101010111<C>0111
    11111111111111111111111111111111
    01110111011101110101010111<C>0111
    11111111111111111111111111111111
    01110111011101110101010111<C>0111
    11111111111111111111111111111111
    where the <C>s should be replaced by:
    Code:
    0x04 Vol+                     01010111101010101
    0x05 Vol-                     01111010111101010101       
    0x08 Source                   01010101111010101 
    0x0D Sound                    01111010111101111010101    
    0x0E Mute                     01011110111101111010101     
    0x12 Skip fwd or Right        01011110101011110101   
    0x13 Skip back or left        01111011110101011110101 
    0x14 Skip fwd hold or Up      01010111101011110101  
    0x15 Skip back hold or down   01111010111101011110101
    How #*&^%$#@"_)_ can write this in PBP ? I can figure out...Any help will be wellcome ! Thanks !
    Last edited by fratello; - 9th March 2012 at 08:31.

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    In front of each <Command> it's this : 00000000000000001111111101110111011101110101010111 <C>
    How can be writting, more "elegant" this :
    Code:
    timp con 536
    ...
    portb.x = 0
    pauseus 8584 ; 16 x 536,5 us
    portb.x = 0
    pauseus 4292 ;   8 x 536,5 us
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus 1610 ;   3 x 536,5 us
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus 1610
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus 1610
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus 1610
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus timp
    portb.x = 0
    pauseus 1610

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Hi,
    As last time this is completely untested. This builds and sends the command in steps which means that there will be some delay between the "preamble", "command" and "postamble". I don't know how tight the timing has to be so doing it this way may or may not work.
    Code:
    '****************************************************************
    '*  Name    : Fratello_JVC.pbp                                  *
    '*  Author  : Henrik Olsson                                     *
    '*  Notice  :                                                   *
    '*          :                                                   *
    '*  Date    : 2012-03-12                                        *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    i VAR BYTE
    j VAR BYTE
    OutBuffer VAR BYTE[8]
    BitsToSend VAR BYTE
    
    
    Main:
        For j = 0 to 10
            GOSUB VolUp
            Pause 1000
        NEXT
    
        FOR j = 0 to 10
            GOSUB VolDn
            PAUSE 1000
        NEXT
    GOTO Main
    
    
    SendPreamble:
    ' 00000000  00000000  11111111  01110111 01110111 01010101  11
    ' Each individual byte reversed:
        OutBuffer[0] = %00000000
        OutBuffer[1] = %00000000
        OutBuffer[2] = %11111111
        OutBuffer[3] = %11101110
        OutBuffer[4] = %11101110
        OutBuffer[5] = %10101010
        OutBuffer[6] = %00000011
    
        BitsToSend = 50
        
        GOSUB SendBits
    RETURN
    
    '-----------------------------------------------------------------------
    SendPostAmble:
    ' 01111111 11111111 11111111 11111111 11110111 01110111 01110101 010111
        OutBuffer[0] = %11111110
        OutBuffer[1] = %11111111
        OutBuffer[2] = %11111111
        OutBuffer[3] = %11111111
        OutBuffer[4] = %11101111
        OutBuffer[5] = %11101110
        OutBuffer[6] = %10101110
        OutBuffer[7] = %00111010
        
        BitsToSend = 54
        
        GOSUB SendBits
    RETURN
    '-----------------------------------------------------------------------
    '-----------------------------------------------------------------------
    VolUp:
        GOSUB SendPreAmble
        ' 01010111 10101010 1
        ' Each individual byte reversed
        OutBuffer[0] = %11101010
        OutBuffer[1] = %01010101
        OutBuffer[2] = %00000001
        
        BitsToSend = 17
        
        GOSUB SendBits
        GOSUB SendPostAmble
    RETURN
    '-----------------------------------------------------------------------
    '-----------------------------------------------------------------------
    VolDn:
        GOSUB SendPreAmble
        ' 01111010 11110101 0101
        ' Each individual byte reversed
        OutBuffer[0] = %01011110
        OutBuffer[1] = %10101111
        OutBuffer[2] = %00001010
        
        BitsToSend = 20
        GOSUB SendBits
        GOSUB SendPostAmble
    RETURN
    '-----------------------------------------------------------------------
    '-----------------------------------------------------------------------
    SendBits:
        BitsToSend = BitsToSend - 1
        For i = 0 to BitsToSend 
            PortB.0 = OutBuffer.0[i]
            PauseUs 536
        NEXT
    RETURN
    '-----------------------------------------------------------------------
    Again, not tested so take it for what it is.

    /Henrik.

  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

    WOW ! Amazing ! Thank YOU so much !!!
    I discover, every time when someone, like YOU, post such a great example of code, how far I am from understanding this great art of programming !!!
    I made the tests and post the results. Best regards !

  5. #5
    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 !

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    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.

  7. #7
    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...

Members who have read this thread : 1

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