Wired remote for Alpine


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Exactly, take the complete bitstream and fill the array with that, make sure you have the correct numbers of bits and then call SendBits. Because the actuall commads seem to be of different length the n*8 may not be true, make sure to count the actual number of bits in the packet.

    Regarding the other comment....It totaly depends on the actual hardware you're using but since you indicate that you're using a transistor between the PIC and the actual unit I think you need to DRIVE that transistor base high AND low, not float it by setting TRIS - again, depends on how your hardware is done.

    /Henrik.

  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

    Since I have no results with this code, I made this "PICKit2 IR capture tool" , from here : PIC Kit 2 IR capture tool « Spiralbrain's Blog
    The signals captured with this tool are totally different !!! I build even an IR widget for analyzing the IR signal...My conclusions : my remote, JVC RM-RK252, send a different code than that presented till now in this topic......I post the picture of all my captures, using AND an IR_Widget with IR_Scope (yes, I build this one too !)
    So : this is how the volume_up signal is ! The red part (in pdf) it's the part common for all commands ; the black part is proper command.
    Can I use Mr.Henrik examples for writting the new code ?! I have some questions : 415, 560 and 1400 are values by itselfs ...How can I put them in code ? Using something like this : "Data 560, 1400 ( this in hex ?), 560,1400,560,415,560,415, so on, so on ...." ?
    Thanks in advance for support and I apologize for my ignorance ...
    Attached Images Attached Images   
    Attached Images Attached Images

  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

    Can be done in this way ???:
    Code:
    ;
    ;          testing code for new JVC Remote
    ;                       march, 31
    
    @ DEVICE PIC16F684, HS_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_OFF, PROTECT_ON
    DEFINE OSC 20
    include "ALLDIGITAL.pbp"
                              
    PORTA= 000011
    TRISA= 000011
    
    PORTC= 000000
    TRISC= 111110
                    
    CMCON0 = 000111              'Disable analog comparators.     
    VRCON  = 000000               ' Disable Comparator Voltage Reference
    ANSEL  = 000000               ' Set pin (AN2) to analog input, the rest to digital
    ADCON0 = 000000               ' Set up A/D converter - Right Just., VDD REF., CH 3, ON
    
    Pause 1000
    
    
    i VAR BYTE
    j VAR BYTE
    pulse con 560
    
    main:
    
    if porta.0 = 0 then gosub VolUp
    
    Pause 100 ' do it for 0.1 sec
    
    goto main
    
    
    VolUp :
    TRISC.0 = 1
    pauseus 4000
    TRISC.0 = 0
    pauseus 1900
    TRISC.0 = 1
    pauseus pulse
    TRISC.0 = 0
    pauseus 1400
    TRISC.0 = 1
    pauseus pulse
    TRISC.0 = 0
    pauseus 1400
    TRISC.0 = 1
    pauseus pulse
    
    for i = 0 to 30
              Lookup i,[$BE,$8C,$8C,$2A,$2A,$2A,$2A,$2A,$2A,_
                        $8C,$2A,$2A,$2A,$2A,$2A,$2A,$2A,$2A,_
                        $8C,$2A,$2A,$2A,$8C,$2A,$2A,$2A,$2A,_
                        $2A,$2A,$8C,$8C] ,j 
    TRISC.0 = 0 
    PauseUs j*10
    TRISC.0 = 1 
    PauseUs pulse  
    next i 
    Return
    In Proteus it's ok ; just the "preamble" part so far.
    Any advice will be wellcome !
    Last edited by fratello; - 31st March 2012 at 17:01.

  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

    This code :
    Code:
    i VAR BYTE
    j VAR BYTE
    pulse con 560
    
    main:
    
    if porta.0 = 0 then  gosub volup
    TRISC.0 = 1
    goto main
    
    
    VolUp :
    Gosub Preamble
    FOR I = 0 TO 17
                Lookup i,[$8C,$2A,$2A,$8C,$2A,$2A,$2A,$8C,$2A,$8C,_
                          $2A,$2A,$2A,$2A,$8C,$8C,$8C,$8C ] ,j
    TRISC.0 = 0 
    PauseUs j*10
    TRISC.0 = 1 
    PauseUs pulse  
    next i
    PauseUs 4500 
    RETURN
    
    Preamble :
    TRISC.0 = 1
    Pauseus 4000
    for i = 0 to 30
              Lookup i,[$BE,$8C,$8C,$2A,$2A,$2A,$2A,$2A,$2A,_
                        $8C,$2A,$2A,$2A,$2A,$2A,$2A,$2A,$2A,_
                        $8C,$2A,$2A,$2A,$8C,$2A,$2A,$2A,$2A,$2A,$2A,_
                        $8C,$8C ] , j
    TRISC.0 = 0 
    PauseUs j*10
    TRISC.0 = 1 
    PauseUs pulse  
    next i 
    Return
    give me, in Proteus (!), the code I need ...The next step it's hardware testing !

  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 put all the values into one command :
    Code:
    pulse con 567
    
    MAIN :
    if porta.0 = 0 then  
    PORTC.0 = 0
    pauseus 4032
    
    for i = 0 to 48
    lookup i,   [value, value, value, ....], j
    PORTC.0 = 1 
    PauseUs j
    PORTC.0 = 0 
    PauseUs pulse
    next i
    
    PORTC.0 = 0
    PauseUs 4500
    PORTC.0 = 1
    ENDIF
    
    PAUSE 25
    goto main
    ...but testing hardware I have no results , despite the "full similarity" with code captured with IR_Scope !
    Somebody has more experience with IR remote control ? It's the "lenght" of each pulse so critical ?
    I don't understand what I do wrong ...

  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

    Still no good news ... Cycle " for ...next" generate a "big" delay ?

  7. #7
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Hi fratello;

    I dind't read the hole thread, but are you trying to reproduce a IV remote control??
    If so, i see on your last post that your reproducing the pulses, but you are not using modulation, and you must use modulation when using IV. Probably 36Khz, or 38Khz, or 40Khz.
    Thanks and Regards;
    Gadelhas

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Alpine

    Hi,
    The actual FOR-NEXT construct will add some additional delay due to the fact that it is a jump isntruction and it has to make the comparison. Add to that the execution time of the LOOKUP instruction you're using. Why don't you just measure it and adjust the pulse constant so it matches the capture of the working remote?

    /Henrik.

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