Brand new to Arduino. I write C/C++, but I've never used it for anything like this. I have a stepper motor drive that requires an RS422 or open-collector signal, with a 2.5 - 5 V differential voltage. The maximum frequency of the control pulses is 250 KHz, and the minimum pulse length is 2 microseconds, with less than 40 milliseconds between pulses. I was going to base my code and wiring off this example I found:
I would then run the signal through a TTL-to-RS422 converter and into my drive. Basically just wanted to make sure no one saw any glaring problems with this. Thanks for any help.
You can definitely create pulses of those durations and the outputs of the arduino are wired directly to the microcontroller, so you will have 5v TTL to work with.
So like I said, my motor's power stage takes RS422 control pulses, with a differential voltage of between 2.5 and 5 V. Below, I've attached what I came up with for a schematic. The resistor there is probably 100 ohms. The potentiometer is up to 10k ohms. The op-amp represents the Texas Instruments DS9638 Dual High Speed Differential Line Driver:
Actually, strictly speaking, "TTL" is 3.3 V logic, not 5 V.
Only if you think it's OK for 3.3V logic to output ~4V for "high."
The legal states for "real" TTL are something like LOW:: 0.8V or less, capable of sinking 1.6mA or more. HIGH: 2.2V or greater, doesn't sink current. This makes TTL inputs compatible with most CMOS logic outputs (almost all modern microcontrollers are CMOS) running at between 3 and 5V, but it's not necessarily safe to connect TTL outputs to 3.3V logic families.
(a typical "real" TTL gate has a low output about 1 Vce above ground (~0.4v), and a HIGH output of 1 Vce + 1 diode drop (0.4 + 0.7) below Vcc.)
(and of course you shouldn't forget that it's been a long time since even "TTL Logic" was REAL TTL. Most TTL Logic you see these days is some variant of "5V CMOS with part numbers that match the 74xx series." and even at the dawn of microcontrollers, you were probably more likely to see LSTTL than real TTL.)