Support Options
MCP-1200 Support Documents
- Summary of Improvements
- MCP-1200 Technical Data
- Evaluation Board
- Using the MCP-1200 Exception Handler
- Controlling Stepper Motors with the MCP-1200
- Upgrading to the MCP-1200 IC
- Multi-Axis Synchronization
- Setting Register Timers for Stepper Control
- Interface Code for Communicating to the MCP-1200
MCP-04 Support Document
P-CNC Support Document
Frequently Asked Questions
- What are the advantages to upgrading existing designs?
- Can I control a stepper motor with encoder feedback?
- Is a smaller package size available?
- How can I use the Limit input for homing to an encoder index pulse?
- How can I correct for small offsets in the 12-bit DAC output?
- What triggers the Exception Handler in the MCP-1200?
- Should I use the PID filter or Lead compensator for the control law?
- How long must I wait after a Reset before writing to the MCP-1200?
- When during the sample cycle should I write to the MCP-1200?
- Is there a required byte sequence when writing/reading position registers?
- Is there an easy way to increment the command position in control mode?
1. What are the advantages to upgrading existing designs?
With only minor modifications, your existing designs can make huge improvements in performance by using the MCP-1200. If you hook-up address bit 6 you will have access to all the advanced feature registers.
2. Can I control a stepper motor with encoder feedback?
Yes, the MCP-1200 has full stepper motor control capabilities and uses the encoder feedback as a check to detect stall conditions. You set the Maximum Error Fault Control register to the position error value that will trigger an error condition.
3. Is a smaller IC package size available?
The MCP-1200 is also available in a QFN (Micro-Lead-frame) package that shrinks the footprint to a 7 mm square. Please contact Mektronix regarding the availability and cost.
4. How can I use the Limit input for homing to an encoder index pulse?
The homing sequence can use the Limit switch to cause a deceleration to zero. By using the Exception Handler as well as the Flag register, the sequence can then begin to move off the Limit and start looking for the encoder index pulse using the Breakpoint capture register. The index pulse polarity and enable settings are in the Position Capture register.
5. How can I correct for small offsets in the 12-bit DAC output?
The DAC Offset register is an 8-bit, 2's complement adjustment to the most significant bits of the 12-bit DAC output. Keep in mind that a RESET will clear the DAC Offset register effectively disabling this feature.
6. What triggers the Exception Handler in the MCP-1200?
Either a Max Error, Stop or Limit signal, or position breakpoint will cause the Exception Handler to be invoked when enabled. You may also choose to ignore any of these conditions. The power of using the Exception Handler is being able to see very fast events with precision at a very low level.
7.Should I use the PID filter or Lead compensator for the control law?
If your design can take advantage of using the advanced control registers (6-bit address space), we recommend you use the advanced capabilities of the PID control law. Additional terms are the velocity and acceleration feed-forward gains, the integrator limit, and derivative span. The PID control law is well understood and used in practice whereas the Lead compensator is non-standard and difficult to understand.
8. How long must I wait after a Reset before writing to the MCP-1200?
Upon power-up or a hardware Reset, the processor initializes many internal registers. The same holds true for a software Reset which will begin at the next sample cycle. The recommended method is for the host system to monitor the IDLE signal since Idle mode is the final state after a Reset. You have the choice of either monitoring the IDLE pin or Idle flag in the Flag register looking for the transition from low-to-high. When switching from a control mode to Idle mode the same precautions should be followed. As a general rule, the host system should verify (via the Flag register or the IDLE pin) that the chip is actually in Idle mode before changing mode dependent registers.
9. When during the sample cycle should I write to the MCP-1200?
Keep in mind that most functions of the chip are performed once per sample time. Examples of these functions include reading the actual position, calculating the position error, applying filter parameters, updating the motor output, and checking for error conditions. Once these functions are complete, the internal processor simply waits for the sample period to time out before repeating the process. The Busy signal indicates the state of this process and may be monitored in the Status register or at the BUSY pin.
Many registers are read and written by the internal processor when Busy is high. In most cases the host system can read or write registers at any time without concern for the state of Busy. However, multi-byte values should be read during the wait time to insure that all registers have been updated. Logging data values such as position error or actual velocity can use the Busy signal to trigger the read. Similarly, there are multi-byte registers that should only be written when the Busy is low to prevent the chance of modifying a byte after another byte has been read by the internal processor. Such registers include High Resolution Velocity, Final Position, Breakpoint, and Max Error registers which normally do not change during a motion move.
10. Is there a required byte sequence when writing/reading position registers?
The 24-bit Command Position and Position Count registers require a proper sequence to prevent a "run away" condition during control mode. When writing the Command Position or Position Count, the values of the Most Significant Byte (MSB) and the Middle Byte (MID) are held in temporary locations until the Least Significant Byte (LSB) is written. At that time the full 3-byte value is written to the registers. When reading the Position Count, a read of the LSB causes the MID and MSB to be fetched and stored in temporary read registers. This insures that a valid 3-byte value is always read. AS A RULE, ALWAYS WRITE THE MSB FIRST AND ALWAYS READ THE LSB FIRST OF MULTI-BYTE POSITION REGISTERS.
11. Is there an easy way to increment the command position in control mode?
There is an 8-bit Command Position Adder register that increments the position without having to write to the full 24-bit Command Position register. This provides a fast and efficient way to produce custom profiles or synchronization between multiple axes.