Scroller Parameters
Last modified by Microchip on 2026/02/23 10:01
Scroller parameters define how the library interprets touch data from multiple sensor nodes to calculate a finger’s position on a slider or wheel. This section covers parameters that control slider/wheel behaviors. The scroller parameters for each channel are set using the following format.
Example: SCROLLER_0_PARAMS > Correspond to Channel 0.
DEF_NUM_SCROLLERS
#define DEF_NUM_SCROLLERS (value)
Description: This parameter defines the number of scroller sensors.
Range: 1 to 65535*
SCROLLER_x_PARAMS
#define SCROLLER_x_PARAMS {touch_scroller_type, \touch_start_key, touch_scroller_size, \SCROLLER_RESOL_DEADBAND(touch_scroller_resolution,touch_scroller_deadband), \touch_scroller_hysterisis, touch_scr_detect_threshold}
Description: This parameter defines the parameter settings for each scroller sensor.
Range: The ranges/values for each setting are as follows:
- Scroller Type
- This field defines the type of scroller that is used in the project. The two types are slider (SCROLLER_TYPE_SLIDER) and wheel (SCROLLER_TYPE_WHEEL).
- Start Key
- This field gives the first segment (Key index) associated with the slider/wheel sensor.
- Number of Keys
- This field gives the size of the slider/wheel used. Example: 4 when four keys are used to realize the Slider/Wheel.
- Resolution and Deadband
- This field gives the combined resolution and deadband details of the scroller used.
- Resolution
- This field defines the resolution of the scroller in bits. A value of 8 indicates 256 positions. The scroller value will be reported from 0 to 255.
- Deadband
- This defines the inactive area in percentage on both ends of the slider, where no change in position is reported. If the deadband is 10, then the inactive area is 10% of the slider length on each end. Deadband does not apply to the wheel.
Parameter Range/Value* Resolution SCR_RESOL_2_BIT, SCR_RESOL_3_BIT, SCR_RESOL_4_BIT, SCR_RESOL_5_BIT, SCR_RESOL_6_BIT, SCR_RESOL_7_BIT, SCR_RESOL_8_BIT, SCR_RESOL_9_BIT, SCR_RESOL_10_BIT, SCR_RESOL_11_BIT, SCR_RESOL_12_BIT Deadband SCR_DB_1_PERCENT, SCR_DB_2_PERCENT, SCR_DB_3_PERCENT, SCR_DB_4_PERCENT, SCR_DB_5_PERCENT, SCR_DB_6_PERCENT, SCR_DB_7_PERCENT, SCR_DB_8_PERCENT, SCR_DB_9_PERCENT, SCR_DB_10_PERCENT, SCR_DB_11_PERCENT, SCR_DB_12_PERCENT, SCR_DB_13_PERCENT, SCR_DB_14_PERCENT, SCR_DB_15_PERCENT
- This defines the inactive area in percentage on both ends of the slider, where no change in position is reported. If the deadband is 10, then the inactive area is 10% of the slider length on each end. Deadband does not apply to the wheel.
- Resolution
- This field gives the combined resolution and deadband details of the scroller used.
- Position Hysteresis
- Position hysteresis is applied when the direction of the position is changed and when the scroller is touched. This parameter determines the number of positions that must be moved in the opposite direction before the new touch position is reported.
- Detect Threshold
- By default, Threshold should be set equal to the threshold value of the underlying keys. Then the parameter has to be tuned based on the actual contact size of the touch when moved over the scroller. The contact size of the moving touch can be observed from the contact_size parameter on the scroller data structure. This value should be tuned to less than the lowest contact size reported by the scroller module.