2018-03-24 10:23 AM
I understand that a timer (that supports encoder mode) can be used for keeping track of a rotary incremental encoder, but is there a good way of making the value saturating? So that when turned 'forward' the value increments to a given value and stops incrementing even if the knob is turned further, and the same way when turned 'backward' - the counter value saturates to zero.
#encoder-mode #rotary-encoderSolved! Go to Solution.
2018-03-25 07:06 AM
So, no better ideas to share?
2018-03-25 10:07 AM
N o b ? or Dial as suggested by
Wagner.Joerg
I have 3 installed on my new board, so a nice name would be good.
I am thinking left hand usage,
Spacial Dials
Coordinate adjuster
Colour Mixer, is my preference.
2018-03-25 10:36 AM
how about Morning Glory..?
Its an affliction of the soul, a cross we all have to bear.
2018-03-25 11:57 AM
I meant ideas of handling the encoder... :D
2018-03-26 05:30 AM
,
,
turboscrew wrote:
(BTW, why does the site show stars in place of the word 'k n o b'?)
It doesn't any more - the 'forbidden word' dictionary has been updated.
See: ,
,2018-03-29 04:30 AM
Knob is a derogatory term in many English speaking countries, such as here in New Zealand, but only when used to describe a person as it also slang for a part of the male body. However it is a perfectly acceptable word for actual knobs. You could use dial for some knobs, but a dial is usually a knob with numbers on it and as rotary encoders have no absolute positions they do not have numbers, so dial is not a good name in that context.
2018-03-29 04:58 AM
I think we've done this discussion to death, and the censor problem has been resolved anyhow - see:
2018-03-29 05:21 AM
Having had plenty of exposure to the english language (neither my native one), I never came across k-n-o-b in THIS particular context.
Perhaps I never consorted with the 'proper' circles.
But back to the topic.
There are so-called 'electronic potentiometers', with digital interfacing.
Perhaps such devices fulfill your requirements.
2018-03-29 06:09 PM
Mad magazine made at least 'door knob' familiar to me. :)
I have, unfortunately, no decision power there. The encoder is already selected.
2018-03-30 03:01 AM
I know of no simple way of making the timer 'saturate', but you could do this easily in software when reading out the timer value, something along these lines:
global:
#define DIAL_VALUE_MIN 12#define DIAL_VALUE_MAX 4253uint16_t dialValue = DIAL_VALUE_MIN;local:uint16_t t;static uint16_t oldt;int32_t delta;t = TIM3->CNT;delta = (int32_t)(int16_t)(t - oldt);delta += dialValue;if (delta < DIAL_VALUE_MIN) delta = DIAL_VALUE_MIN; else if (delta > DIAL_VALUE_MAX) delta = DIAL_VALUE_MAX;dialValue = delta;JW