Step 4Update....
I updated the program in the PIC to flash the power LED when the battery on the main camera is low and to flash the record LED if the tape is at the end.
I have added a newer wiring diagram and source code.
The only difference in the wiring diagram is that the Status LED (was power led) is now connected to RA5 instead of +5v
| « Previous Step | Download PDFView All Steps | Next Step » |







































In the code, when the 8 bytes have been processed, you check whether the camera is recording or not and after that you jump back to '_Start2'.
Isn't that wrong as the subroutine '_Start2' again checks which button is being pressed even though in between the program has already checked whether the button has been released or not....!!! I mean, we should not be pressing 'Stop' button multiple times to execute the command.....
Please let me know....
It was a long time ago when I made this. I used this website for reference
http://www.boehmel.de/lanc.htm
Basically, my program waits for the long gap. When it sees the first bit change of byte 0, the program waits 1/2 a bit length (then you know you are in the middle of the bit) it then reads it, waits a whole bit length and the reads again etc. etc.
To write on the LANC, you simply wait for the long gap, and when it sees the first bit, simply output your byte, bit at a time at the correct bit length.
If you download the .asm file you should be able to see how it works. I have documented nearly every line of code.