Hello all, I'm a complete novice when it comes to programming an arduino, but I'm pretty sure what I'm looking to do is relatively simple, but not-so-simple being relatively inexperienced.
I have a video tape recorder that accepts RS422 commands (which is basically RS232 with two paired transmit (+ and -) and receive lines (+ and -) that have opposite levels to each other at all times. The main purpose of that is to have long distance communication of more than a kilometer which I clearly do not need for my application haha.
I'm only interested in sending a single command out of the entire protocol - the serial command for "Stop". Basically what I want the arduino to do is when two pins on the arduino are shorted with a switch, I want it to send the "Stop" command. I am fairly certain that the system will work without prior handshaking or needing to hear a response back saying that the command was received, so receive lines shouldn't matter at all here.
My hope is that it's possible to have two of the digital outputs just send what essentially is the equivalent of RS422 data (doesn't need to understand what it is sending, just needs to know timing of high/low pulses and have two of the digital outputs that have a high and low state that is opposite of each other at all times), that should work here I think. If it "can't" be done that way, I'm also ok with hooking up a simple RS232 to RS422 converter inline, but I'd like to avoid that if it isn't absolutely necessary to keep complexity/components to a minimum.
The arduino I have to work with is a genuine Teensy 2.0.
The protocol itself is called the Sony "9-Pin protocol" with this site explains the exact formatting of the commands:
Screenshot below from the link above gives a general idea of the formatting:
Basically says commands are RS422A, No synchronization, 1 start bit, 8 data bits, 1 stop bit, Data rate of 38400 bps, Odd parity, start bit is "Space", stop bit is "Mark". It also has a checksum, and the actual stop command itself is Send: "20 00 20"
There is another arduino project that has the full protocol built in here, that may be useful to reference: GitHub - hideakitai/Sony9PinRemote: RS422 Sony 9-Pin Protocol Remote Controller of VTRs for Arduino
-In that project's implementation, they wanted to be able to receive responses back and full support for all features which I do not need here.
Again, since I don't actually need to get a response back from the device, I think just sending the correctly formatted high/low pulse string almost like you would with an infrared remote and not exactly knowing if it was received will work fine here.
If anyone is willing write this code up for me to try with a Teensy 2.0 and tell me which two pins to short for the "switch" and what the output pins (TX+, TX-, and GND) are assigned to .... and it actually works, I'd absolutely be willing to send a donation for your time/effort and buy you "several" coffees Any explanation of how the code actually works would be great, but I don't want to take up too much of your valuable time for the effort in helping me. Having working code to look at will be good enough for me to study for educational purposes and I think I can figure out how to add other commands later if need be.