EmbeddedRelated.com
Forums

number of rotary encoders with the Scan-IF interface of MSP430

Started by "Mat...@pentax.boerde.de [msp430]" June 2, 2017
Just a questions to the Scan-IF interface of e.g. msp430fr6989 or
msp430fw428. I am just in the beginning phase of a new project and have not
used this interface before.

How many rotary encoders (quadrature enoding) can I connect to them? It is
not really clear. It has 3 channels and only channel 2 can count up and
downwards? So I can use it with just one encoder?

A alternative would be software samling of the quadrature encoder channels
within a time interrupt. How fast can that be? Is 20kHz realistic?
(I think it mainly depends on how long interrupts are blocked in the main
code).

Matthias


Posted by: Matthias Weingart



Beginning Microcontrollers with the MSP430

I don't know the Scan-IF peripheral. I've never had a cause to use it.
As to the sampling rate, as you note it depends largely on how you write
your code. Personally I've only ever had cause to inhibit interrupts in
my foreground program once, and that was because I was patching somebody
elses bugs to a very limited timeline, and didn't have time to clean it
all up.

As a sort of rule of thumb I add up the total time it would take to
sequentially service all of my active interrupts then double it, and
that is the fastest interrupt rate I allow. Depending on how interrupt
intensive your code is I find this can be as short as 200 clock cycles
and as long (in one very rare case) as 1600, so for a 16MHz processor
that is 400kHz to 10kHz. To my mind 20kHz is very realistic, and should
be easily achievable.

Al

On 2/06/2017 5:38 PM, Matthias Weingart g...@pentax.boerde.de [msp430]
wrote:
> Just a questions to the Scan-IF interface of e.g. msp430fr6989 or
> msp430fw428. I am just in the beginning phase of a new project and have not
> used this interface before.
>
> How many rotary encoders (quadrature enoding) can I connect to them? It is
> not really clear. It has 3 channels and only channel 2 can count up and
> downwards? So I can use it with just one encoder?
>
> A alternative would be software samling of the quadrature encoder channels
> within a time interrupt. How fast can that be? Is 20kHz realistic?
> (I think it mainly depends on how long interrupts are blocked in the main
> code).
>
> Matthias
>
>
> Posted by: Matthias Weingart
>
>
>
> Yahoo Groups Links