![]() |
Talons without libraries?
I want to wire some Talons up to my XMOS microcontroller, but I'm unable to use any of the large libraries because of its architecture. Is it possible to simple throw a PWM signal at the Talon and expect a linear output?
I also want to use an incremental encoder with it. Is there a way to bit-bang to get the output speed of an encoder using the quadrature input on the Talon? |
Re: Talons without libraries?
Are you speaking of a Talon SR or SRX? The SR accepts PWM input (that is, pulse duration, not duty cycle) but does not have any sensor inputs, so you can't use it to query the encoder. The SRX is a CAN bus controller which does have sensor inputs, including an encoder port. I have not yet used CAN apart from monitoring current use on the PDB; I have no idea how difficult it would be to create a CAN port on a microcontroller. If you licked that problem, then yes, you would be able to monitor the encoder through the same CAN bus that you used to control the motor. The neat thing about CAN is that if you build a single CAN controller, you can use it to drive several devices. You would not be using PWM, however.
|
Re: Talons without libraries?
Yes to running it on PWM without a CAN bus. Details on implementation and response data is in the user manual.
|
Re: Talons without libraries?
Quote:
Reading sensor inputs on a Talon SRX is not going to be straightforward. I would expect it to be far beyond the scope of your project. |
Re: Talons without libraries?
Quote:
|
Re: Talons without libraries?
Quote:
The Talon SRX is supposed to support SPI and I2C, at least according to the initial information sheet. However, I have never seen any documentation telling how to use those communication protocols. |
Re: Talons without libraries?
Quote:
|
Re: Talons without libraries?
It may be easier to use pwm to communicate to the talon, and read the encoder on your micro controller. If your micro controller supports interrupts you can read the encoder easily. There's examples of this for the arduino that could be ported.
|
Re: Talons without libraries?
Quote:
|
Re: Talons without libraries?
Quote:
|
Re: Talons without libraries?
Quote:
|
Re: Talons without libraries?
Quote:
For a Cortex-M3 (100 mhz), I've been able to decode around 500,000 edges/sec reliably in software using edge triggered interrupts. |
Re: Talons without libraries?
Quote:
On the Cortex-M3, it takes 3 cycles to access the AHB bus on the fast GPIO, and on older generation chips, slow GPIO would take north of 10 cycles (if I remember right). Peripheral accesses tend to be pretty slow, even on embedded chips. CAN receiving code that I have used on a i7 over PCI takes a very long time. The CPU busy waits while that is happening. The result is that it takes about 1 core to read CAN messages (!). |
Re: Talons without libraries?
Quote:
The chips are super cheap, around $5 for the cheaper ones and $15 for the super fancy ones. The Startkit is $15, but has everything on an Arduino-size board and headers for pins, plus an (inconvenient but usable) USB interface. |
| All times are GMT -5. The time now is 11:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi