Camera LANC Controller
jonyjib
Posts: 20
in Propeller 1
Hi Guys,
The 'amazing' Jon McPhalen (JonnyMac) wrote some code to control Sony LANC cameras' zoom, focus and such, using PST and keyboard to command.
It is based on an 8 byte packet standard LANC protocol, of which bytes 0 & 1 are the 'common command codes' sent to the camera, while bytes 2 & 3 are not used and bytes 4, 5, 6 & 7 are data coming back from the camera. This works great on Sony Cameras and pretty good on Canon & JVC cameras that use this protocol.
The newer Canon cameras employ a different protocol. They call it 'Extended LANC' and it is 16 bytes. The first 8 bytes come from the camera and the second 8 bytes are commands sent to the camera.
I am trying to modify this 8 byte code and Spin object to work with the 16 byte protocol and I'm not having much luck. I have the basic structure in place...
Would anyone like to take a crack at this? (Jon is too busy right now) There are $ available...
I attached the original 8 byte code, my non working 16 byte code and the other required objects.
Thanks in Advance...
John Huffman
209-202-7740
The 'amazing' Jon McPhalen (JonnyMac) wrote some code to control Sony LANC cameras' zoom, focus and such, using PST and keyboard to command.
It is based on an 8 byte packet standard LANC protocol, of which bytes 0 & 1 are the 'common command codes' sent to the camera, while bytes 2 & 3 are not used and bytes 4, 5, 6 & 7 are data coming back from the camera. This works great on Sony Cameras and pretty good on Canon & JVC cameras that use this protocol.
The newer Canon cameras employ a different protocol. They call it 'Extended LANC' and it is 16 bytes. The first 8 bytes come from the camera and the second 8 bytes are commands sent to the camera.
I am trying to modify this 8 byte code and Spin object to work with the 16 byte protocol and I'm not having much luck. I have the basic structure in place...
Would anyone like to take a crack at this? (Jon is too busy right now) There are $ available...
I attached the original 8 byte code, my non working 16 byte code and the other required objects.
Thanks in Advance...
John Huffman
209-202-7740
Comments
I took a stab at it, but I have never used LANC and I don't have any LANC equipment.
Sorry John, I just really don't have the time right now to get my head around how this all works.
Bean
If you'll point me to a detailed spec for the Extended LANC protocol, I will have a look -- at first blush it doesn't seem like it should be much trouble (but I haven't seen the spec). I'm looking at purchasing a new camera (Black Magic) that has a LANC port, but I don't know what protocol version it uses.
Wait... does putting 'amazing' in quotes mean you're being sarcastic about my abilities?....
No, on the contrary, after working with you for years and seeing how ‘fluent’ you are in this stuff, you are truly ‘amazing’!
The new protocol isn't in Wiki yet. The net is pretty quiet about it. Curious myself.
I confess that what I know about LANC hardware control methods would easily fit into any of the early PROM chips, and those were Programmable Read Only Memory chips. (About 2K in size.) So here goes:
I do know that basically the whole idea in the beginning is correct. Since I don't grok at all the whole idea using such technology to control cameras, I wasn't aware that it was possible to do that much further.
Anyway this site ELM Electronics taught me more than enough to understand the way it works. They sell a chip who does grok the whole idea behind it. Plus two others who do other related functions.
So to understand the process further where I would go to read up on it?
---
As always this is being sponsored by the friends of one Donald Duck.
The Extended LANC uses 16 bytes at 19.2K (instead of 8 at 9600). Reading and accepting the data won't be a problem, it's knowing what things mean that is in question at the moment as there is no released specification.
Does just changing baud and making commands 16 bit work?
If you modify your object and LANC commander structure to receive 8 bytes and send 8 bytes, then I think I can decipher the codes and make it talk to the camera. We have many of the codes figured out already via serial sniffer...
I don't really care if it works 100% as long as the LANC interface works.
Thanks,
Bean
What you actually need is a sniffer tool so that you can examine the packets going between the controller and a compatible camera. You could do this in Spin (with FDS) using the circuit below.
1) Wait for 5m idle period on serial line
2) Capture and display 16 bytes
3) GOTO 1
I seem to have pulled down the schematic (referenced in my code). Here it is. This can be connected to a device or to the line between a controller and camera for sniffing.
You should be able to pick one up for around $50. Just make sure when you check the model that is has the LANC jack in the specs. Selected Sony, JVC and Canon model camcorders use the LANC protocol. (not Panasonic)
John
Yep, that works! It allows me to see what is coming out of the camera. I'll need to send the handshake commands back to the camera in order to control it.
Canon never delivered on the official request for their Extended LANC protocol so we ended up using the basic LANC protocol... : (