PDA

View Full Version : Can I connect 2 Quadrature Encoders to a XMC4500 Relax Kit Lite?



nettercm
Apr 29th, 2013, 07:18 AM
I have a motor control application and I am evaluating the XMC4500. I'm using the Relax Lite Kit.

My requirements:
* Interface with 2 brushed DC gearmotors. Both motors have an integrated optical quadrature encoder
* Control speed and direction of each motor
* Measure velocity, position and direction of each motor, via 2 quadrature encoders (A & B signal, no index)

Setting up PWM outputs for my application is straight forward it seems - I have no qustion about that.

However, I'm not sure how to interface 2 quadrature encoders. It seems the Relax Kit (Lite) does not expose the POSIF1 pins.

Am I missing something or not interpreting something right?

The POSIF1 pins seem to be going to the Ethernet Phy IC, which is not present on my Relax Kit Lite. I suppose I could solder onto the expose surface mount pads, but the pitch is way to small for me.

Is there any other way to interace with a quadrature encoder? Do I have to go through POSIF? Can I use CCU4 / CCU8 inputs directly, perhaps in conjuction with an ISR?
I don't really need all the features that the POSIF offers. All I really need is to increment / decrement a 16-bit or 32-bit encoder tick counter as per A/B input state transition. I think based on my application requirements and motor/encoder spec, I will get about 20000 encoder ticks per second.

Thanks.

Chris.

nettercm
Apr 29th, 2013, 07:24 AM
Just to be clear - I know how to interface w/ one encoder using POSIF0. The POSIF0 pins are routed to the 2x20 connectors on the Relax Kit. The 2nd encoder is the problem.