Hi. I tried multiple waits (didn't know you could do this). it works a little better, but still not perfect.
I set it up to snoop the data and post it on hyperterminal.
This is what I get
?Q0 ' echo of my command to post 32bit encoder value into mailbox
0B02 'the encoder value -*88
00 'the 2 digit hex return, its the MSB so its zero in this example, but still can't get it
+ 'confimation sent from controller.
I believe the issue is after I send the request to read the *88 register, by the time i get to the next line I may have missed some of it, I tried just waiting for a CR, but sometime I get down and read the CR before the *88, so then it gets out of sequence. My guess is the controller does not consistently respond back at the same time intertvals, so sometimes I get it all other times its quicker than my program (which is just one line). I also played around with putting a pauseus for different ammounts after the tx before the rx, but it did not seem to help.
Another idea would be just to grab the encoder value versus each bit, but I don't know how to do this. its 32bit hex, but only the significant values are sent so I am not sure what to get. I am just relaying this information back to a VB program that I am sure I could use to convert the number to a decimal. I feel I may miss the first part of the response in some cases too.
Thanks
Bookmarks