I am reverse engineering a industrial SCARA robot my work let me take home. The servo drives output a RS-422 encoder signal that I am running through a little converter module (switching the differential signaling to ttl).
The data is coming in good, unfortunately the data is 16 bit and I have two frames of information I need to receive (32 bits [4 bytes] total). This is a problem because reading can start anywhere in this sequence, so when I want a byte order of 1A,1B,2A,2B, I may get 1B,2A,2B,1A or 2A,2B,1A,1B.
Does anyone have any ideas how I can keep my data in order? I have no ability to change how the drive outputs this information, I have to work with what I got. Or worst case scenario is there another platform that will natively read a 16 bit signal?
Attached is the timing diagram of the signal. I've translated the Japanese manual as best I can in RED. The only bits I see are the 15 data bits and the frame flag. Things like start signal and CRC check are trimmed off somewhere along the way.
There is a 17uS gap between each frame. If there was some way I could pick up on that, then with the frame flag I could determine what is what, but unfortunately I'm kinda spinning my wheels on how to pick that up reliably. Or if there was some sort of start message interrupt, but i dunno...