Wired remote for Pioneer HU


Closed Thread
Results 1 to 23 of 23

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 Pioneer HU

    Now it's ok ?
    Code:
       '// Define port pins as inputs and outputs ...
       TRISA  = %00000111
       TRISB  = %00000000
    
    
    include "c:\pbp\keypad2.pbp" ' see http://www.picbasic.co.uk/forum/showthread.php?t=3250
    
    main:
    gosub keypadscan
    gosub check
    goto main
    
    check:
    select case key 
    case 1     ; volume down
    portb.2=0
    pause 500 ; i put the resistor on portb.2 to ground for 0.5 sec
    portb.2=1

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Pioneer HU

    Code:
    PORTB=0
    TRISB = 255 ' Disconnect all resistors from the circuit
    ' Some code here
    DoItAgain: SELECT CASE XYZ CASE ABC TRISB.0 = 0 ' Connect PORTB.0 resistor to the circuit CASE DEF TRISB.0 = 0 ' Connect PORTB.0 resistor to the circuit TRISB.1 = 0 ' Connect PORTB.1 resistor to the circuit CASE GHI TRISB.0 = 0 ' Connect PORTB.0 resistor to the circuit TRISB.2 = 0 ' Connect PORTB.2 resistor to the circuit TRISB.3 = 0 ' Connect PORTB.3 resistor to the circuit END SELECT PAUSE 500 TRISB = 255 ' Disconnect all resistors GOTO DoItAgain
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Pioneer HU

    THANK YOU ALL !
    Code:
    @ DEVICE pic16F628A, INTRC_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON, LVP_OFF, CPD_OFF, PROTECT_OFF 
    
       
       Include "modedefs.bas"   ' Serial Protocol
       Define   OSC 4           ' 4MHz 
       CMCON = 7                ' Disable on-chip comparator, PORTA in digital mode
                  
       '// Define port pins as inputs and outputs ...
    TRISA  = %00000111
    PORTB=0
    TRISB = 255 ' Disconnect all resistors from the circuit
    
    
    include "c:\pbp\keypad2.pbp" ' see http://www.picbasic.co.uk/forum/showthread.php?t=3250
    
    main:
    gosub keypadscan
    gosub check
    goto main
    
    
    check:
    select case key 
    case 1     ; volume down
        trisb.2=0
    
    case 2    ; track -
        trisb.3=0
       
    case 3    ; volume up
        trisb.4=0
       
    case 4    ; mute
        trisb.5=0
       
    case 5    ; source
        trisb.6=0
       
    case 6    ; track +
        trisb.7=0
       
    end select
    Pause 500 ' do it for 0.5 sec
    TRISB = 255
    Return
    
    end 'of story !

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Pioneer HU

    Time to celebrate!




    This code is...


    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default Re: Wired remote for Pioneer HU

    Scheme, as conceived above, does not work !!! I put opto-couplers at PIC outputs and work fine ...
    What could cause it does not work in this hardware ? Need to manage some (others) PIC registers ? Regards !

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