Log in

View Full Version : Writing custom Jaguar motor controller firmware


ferret_guy
20-11-2012, 13:19
I was thinking about writing custom Jaguar motor controller firmware in order to use the limit switch inputs as encoder inputs. This would allow the Jaguar to handle more elements of control and also simplify wiring at least for me. But is there an SDK to do this?

StevenB
20-11-2012, 22:01
The Jaguar source code is available from TI (at least for now): http://www.ti.com/tool/rdk-bdc24-cd. More details in this thread (http://www.chiefdelphi.com/forums/showthread.php?t=100135).

I have to ask, though - Why isn't the built-in encoder input sufficient?
Also, be aware that last year it wasn't legal to use custom Jaguar firmware, per [R61] (http://frc-manual.usfirst.org/viewSingleItemMap/702). I would be surprised if that changes this year.

slijin
20-11-2012, 22:21
I suggest you study the RDK's specs on the limit switch GPIOs to verify that they can actually handle the frequency resolution that effective encoder input demands.

Also, on top of Steven's question, is there a reason you can't handle encoder processing through another interface? I can't see it would simplify your wiring either, or even why the Jaguar would need to juggle input from two encoders.

Ether
20-11-2012, 23:26
I suggest you study the RDK's specs on the limit switch GPIOs to verify that they can actually handle the frequency resolution that effective encoder input demands.

FWIW, from LM3S2616 datasheet p348:

Each GPIO port is a separate hardware instantiation of the same physical block. The LM3S2616 microcontroller contains five ports and thus five of these physical GPIO blocks.

The Jag encoder inputs are on port C, and the limit switches are on port B.

ferret_guy
21-11-2012, 00:06
I don't really want to write it because the functionality is not there mostly for the experience. Hopefully this year you will be allowed to customize your control system more this year.

s1900ahon
21-11-2012, 01:54
What are your plans for handling the unpublished FIRST-specific CAN protocol extensions? In the past the encoders were not permitted without CAN.

If it is for fun and not FRC it is totally doable. Just watch the interrupt priorities to avoid starving the important stuff.