cbthans Posted April 5, 2016 Share Posted April 5, 2016 Our application requires PMAC2-Style Servo IC to be setup with Compare Register A and Register B to be more than 24bits from each other. Because of the 24bit rollover the signal toggles at the wrong time. What is the best way to handle the 24bit rollover problem? Link to comment Share on other sites More sharing options...
curtwilson Posted April 6, 2016 Share Posted April 6, 2016 The hardware auto-increment feature in the ASIC is intended to handle update times that are short enough to be difficult or impossible to handle in software. That obviously is not the case here. It looks like you will need a two-step software process. In the first step, you flag that you want to write new values to CompA and CompB. In this step, you monitor motor position to see when you come within 2^24 (16M counts) of the positions you want for CompA and CompB. Once you see you have passed this threshold, you can execute the second step of writing the desired 24-bit values to CompA and CompB. You should have the auto-increment register CompAdd set to 0. Link to comment Share on other sites More sharing options...
cbthans Posted April 20, 2016 Author Share Posted April 20, 2016 Thank you! That did the trick. Link to comment Share on other sites More sharing options...
Recommended Posts