Close

Oh goody...

A project log for Tiny CAN Positioning Motor Controller

A 12A/28V DC brush motor controller with position feedback that speaks CAN-BUS... in one square inch.

Pierce NicholsPierce Nichols 09/06/2018 at 07:400 Comments

It appears that in order to get one of the existing MCP2515/25625 libraries to play nice with the ASF drivers in the project created by Atmel START, I need to port it over to plain C. This isn't completely horrible, since the one I picked mostly just use C++ for encapsulation and I'm not trying to run multiple chips. Still a pain in the neck to refactor, and I'm not entirely sure how to set up Atmel Studio to suck in the files in any way that does not involve just copying them in.

In better news, I think I have my configuration finished, and I think I found a way to use the event system to use Timer/Counter B to capture the time of each encoder pulse. That wraps up way too much hemming and hawing just in time for the boards to show up. One possible wrinkle, however, is that the pulses off the edge detector as built are very short as it uses the main clock to drive the clock input of the flip-flop. Therefore, I am not 100% sure it will capture all pulses and I won't have the opportunity to find out until I have the boards in hand and assembled.

Discussions