Sony IR Remote


Closed Thread
Results 1 to 40 of 41

Thread: Sony IR Remote

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Instead to party for my Birthday....

    I spend time with this "killer" code. Now I discover another strange phenomenon : anything I do, can't generate "train" of pulse.
    Instead generating for 4 times this sequence : high 2650 ,pause 2500, high 660, pause 100
    I have just ONE sequence for about 42.25 mS !!!
    WHY ?!?
    Code:
    main:
    
    zecime  CON 106    '// = ( 106 * 25uS) = 2650 uS burst
    unu       CON 24     '// = (24 * 25uS) = 0.60 mS burst
    delay     CON 104
    
    
    i 		var byte
    cycles	var byte
    acycles      var byte
    
    ;============================
    Main:
    IF but1=0 then 			; VOLUME UP
        goto ir_send
    endif
    
    Goto Main
    
    '=========================================
    ir_send:
         	cycles=zecime
            acycles=unu
     for i=1 to 4        
            call Pulse
            pauseus  delay        
            call Pulser
     next i     
    Pauseus 100   
    Goto main        ' or Return, have no result !
    
    Pulse:              ' Generate "Cycles" number of 40kHz pulses
    ASM
       bsf gpio, 2     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       goto $+1         ; + 2uS = 13uS   
       bcf gpio, 2     ; 1uS, LED=off
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       decfsz _Cycles,f ; + 1uS = 10S    
       goto _Pulse      ; + 2uS = 12uS
       return           ; Add 2uS for return to caller    
    ENDASM
    
    
    Pulser:              ' Generate "Cycles" number of 40kHz pulses
    ASM
       bsf gpio, 2     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       goto $+1         ; + 2uS = 13uS   
       bcf gpio, 2     ; 1uS, LED=off
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       decfsz _Acycles,f ; + 1uS = 10S    
       goto _Pulser      ; + 2uS = 12uS
       return           ; Add 2uS for return to caller    
    ENDASM
    Thanks again for attention !

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


    Did you find this post helpful? Yes | No

    Default

    On first row: original Blaupunkt remote, volume up command.
    On second row : my remote, volume up command.
    Using same sensor (original Blaupunkt).
    Original-work; my-NO !!! I'm stuck, dissapointed, sad...
    Attached Images Attached Images  

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Could you attach the 2 wav/mp3 files? I'll open them in a sound editor at my end; couldnt quite see the whole pulse train.

    If this forum doesnt permit audio attachments, you could mail them to me at ardhuru_at_gmail.com.

    Also, some remotes send the same frame twice; does your Blaupunkt need that?

    Regards,

    Anand.

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


    Did you find this post helpful? Yes | No

    Default Heeeeeelp, please ...:(....

    I try different variant of PBP code; no result.
    I find the example of Mr.Bruce :
    Code:
      ' IR carrier generator routines. Freq.inc.
    
      Cycles VAR BYTE    ' Number of carrier cycles
      
      GOTO OverFreq  ' jump over pulse routines
      
    ' Generate "Cycles" number of 40kHz pulses
    ASM
    _Pulse40
       bcf IRTX,PIN     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       goto $+1         ; + 2uS = 13uS   
       bsf IRTX,PIN     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       decfsz _Cycles,f ; + 1uS = 10S    
       goto _Pulse40    ; + 2uS = 12uS
       return           ; Return to caller    
    ENDASM
    
    ' Generate "Cycles" number of ~38.4kHz pulses
    ASM
    _Pulse38
       bcf IRTX,PIN     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       goto $+1         ; + 2uS = 13uS   
       bsf IRTX,PIN     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       nop              ; + 1uS = 10uS
       decfsz _Cycles,f ; + 1uS = 11S    
       goto _Pulse38    ; + 2uS = 13uS
       return           ; Return to caller    
    ENDASM
    
    OverFreq:
    so I write my program, for the hardware like in schematic ( for now I test just Volume Up) :
    Code:
    @ DEVICE PIC12F675, intrc_osc, wdt_off, pwrt_off, mclr_off, bod_off
    
    DEFINE OSC  4
    DEFINE OSCCAL_1K 1          ' Set OSCCAL for 1k -HELPS tuning the crystal for more accurate timing
    
    @ #define IRTX GPIO  ; Define port to use for IR out
    @ #define PIN 1      ; Define port pin to use for IR out
    
    INCLUDE "Freq.inc" ' 
    but  var gpio.5
    
    GPIO.5=1
    TRISIO.5=1
    GPIO.1 = 1       ' IR LED off   -----|<|----/\/\/\----+5
    TRISIO.1 = 0     ' Output for IR signal
    WPU     = %00111101
      CMCON = 7        ' Comparators disabled
      ANSEL = 0        ' A/D disabled
    
    
    Loops VAR BYTE
    
           
    Main:
    
    if but=0 then
            
            FOR Loops = 1 TO 10 
              Cycles = 102      ' 102 * 26 = 2652 uS
              CALL Pulse38
              
              Pauseus 2580      ' accurate pause of 2580 uS ?!?
              
              Cycles = 25       ' 25 * 26 = 650 uS ; maybe must EXACTLY 660 uS - how ?!?
              CALL Pulse38
    
              pauseus 50000
              pauseus 50000
             Next loops
    endif          
    GOTO Main
      
      END
    but, OF COURSE ?!?, no results. Somebody, just one little help ? Please...
    Attached Images Attached Images  

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    Are you sure your IR LED lights? I mean of course you cannot see it. But with camera or your mobil phone maybe you can see if the LED is lighting.

    Do not trust this very much, since my SONY DSC-W17 does not see any IR at all! So test this first with a known IR transmitter to be sure.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    I test the function of my schematic with two phones camera (Nokia & S-E) ; and with InfraX soft too. I capture the signal with TSOP 1738 on serial port, for "original" remote and for "PIC" remote...Works fine...but without results on my RC ! Thanks for support !
    Attached Images Attached Images   

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    I see a 55us diffrence in the two shots. May be this is the problem.

    Ioannis

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