Sony LanC Program


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    I have spent a few hours on this and the only way that I can even get it to work sometimes is: read and write with the same pin
    This is the way my Lanc controllers that I build work programmed in assembly.
    or the one I built using the elm interface chip.
    using your starter 33 is the only hex that will record or stop
    on mine I can use 27 or 33 record and 29 or 33 stop not sure what that's all about.
    right now IF it does start recording some times it will flicker between rec and standby. I will try to work on it some more and post were I'm @
    I have 5 different Sony corders I use one a mini dv and they are all interchangeble on my board
    thanks for working and sharing this and I hope what I have posted helps
    " be nice it's people like me that make people like you look smart"
    yes I read the datasheet, of the 300 pages I understood 10

  2. #2
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    167


    Did you find this post helpful? Yes | No

    Default sony

    Ok sounds like you changed the program some to test different hex commands?

    You need the two different pins portb1 and and portb2 one looks for interframe gaps and startbits the other sends commands did you use the pulldown resistor on Portb1 and did you use two resistors one for each pin to the lanc line and of course ground I did it this way for testing so I could put the scope on either lead and check for pulse voltage. I found sometimes I needed the pulldown resistor to get clean pulses that would go 0 to 3vdc not 1.3 to 3vdc. Thanks for testing this, sometimes no matter how much you work on something, when someone tries it, it may or may not work and this is what I wanted to see.

    Now try the program as written turn the camera on first then turn the pic on the camera will shutoff wait 10 seconds turn on wait 10 seconds record wait 20 seconds stop record wait 10 seconds and turn off and go through all this again Im using a DCR-HC20 sony camera. I listed the commands that worked with my camera. Let me know what happens.

    Larry
    Last edited by l_gaminde; - 23rd September 2009 at 03:41.

  3. #3
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    167


    Did you find this post helpful? Yes | No

    Default sony

    I have my camera on the desk Im using a BS2 to read the data stream comming from the camera and It works using serin 9600 and reversing the hex


    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    value VAR Byte(8)
    syncbyte VAR Word
    a VAR Byte
    a = %11111111

    start:
    Sync_byte:
    syncbyte = 0
    DO WHILE syncbyte < 3200
    PULSIN 1, 1, syncbyte
    LOOP

    SERIN 1,84,[value(0),value(1),value(2),value(3),value(4),value (5),value(6),value(7)]
    DEBUG HEX value(0)^a,TAB,HEX value(1)^a,HEX value(2)^a,HEX value(3)^a,HEX value(4)^a,HEX value(5)^a,HEX value(6)^a,TAB,HEX value(7)^a,CR
    'PAUSE 500
    GOTO sync_byte
    'GOTO start

  4. #4
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    Sorry no luck
    I even tried it with my hc42
    the only thing different is I'm using a 16f676 XT_OSC @ 4
    were you @ 10

    right now I'm trying to keep all my camera in the woods. I ran and got a couple to help you test.
    I maybe out of pocket next few days with will try to do more testing later
    " be nice it's people like me that make people like you look smart"
    yes I read the datasheet, of the 300 pages I understood 10

  5. #5
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    167


    Did you find this post helpful? Yes | No

    Default sony

    Grounded Thank you for testing the setup.
    I also tried it and it would turn off and turn back on but nothing else, so I started looking at the program and in the power_on sub you will see at the bottom the counter value is 300, counter is a var byte so it would never return to the program. I use this value when looking at the data stream on the scope this keep the loop running and made it easy to see my timing I could do this at each step.
    So I guess you have to take them out when posting the code MY BAD.
    its things like this that make a project take longer than you expect!!!
    I reposted the correct program take a look when you get a chance

    Thanks Again Grounded

    Larry

  6. #6
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    Right
    and I not sure but:
    should line 58 be pauseus 208
    and should there not be
    pauseus 104 between line 141 and 142

    Code:
    48 Command_byte2: 'tell camera that a command is to follow special commands
    49 gosub sync_byte
    50 pauseus 80 'pause for camera's start bit to finish
    51 input portb.2 'first byte to send (LSB 1ST)Hex 28 %0010,1000
    52 pauseus 312
    53 low portb.2
    54 pauseus 104
    55 input portb.2
    56 pauseus 104
    57 low portb.2
    58 pauseus 104
    59 input portb.2 'Stop bits set high
    60 Return
    61
    62 Start:
    63 counter
    
    
    
    
    
    129
    130 Record_off:
    131 gosub Command_byte2
    132 gosub Sync_bit
    133 low portb.2
    134 pauseus 104
    135 input portb.2 'Start Recording
    136 pauseus 208 'Power on Command 29 (LSB 1ST) %0010,1001
    137 low portb.2
    138 pauseus 104
    139 input portb.2
    140 pauseus 104
    141 low portb.2
    142 input portb.2
    143 pauseus 208
    144 input portb.2 'Stop bits set high
    145 counter = counter +1
    146 if counter = 5 then Return
    147 goto Record_off
    " be nice it's people like me that make people like you look smart"
    yes I read the datasheet, of the 300 pages I understood 10

  7. #7
    Join Date
    Aug 2009
    Location
    Paso Robles California
    Posts
    167


    Did you find this post helpful? Yes | No

    Default sony

    Maybe their not being used that was a test of a second command byte
    command_byte2 can be removed along with record off hex 29
    record on also will stop recording.

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  3. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30

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