You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i've got two fresh v2.1 boards, wired up with a plain std. encoder with switch. my multimeter shows the switch conducts exactly when pushed. the boards are unconfigured, ie. using the
default values for all config bits, which according to the datasheet should mean 'std encoder'.
symptom: the i2cencoder doesn't report anything in the button-related bits of ESTATUS when or
after i press the button.
tldr: looks as if STD_EncoderMode() isn't called unless GCONF is written.
workaround: write to the GCONF register even if it's just the same 0x0 as the defaults.
proper fix: i think that the function FirstConfig needs to be called sometime during startup, not just as part of RegisterWrite.
minor problematic aspects: the datasheet doesn't describe the pinout of the 5 pins below the gp1/2 pins (which are listed in figure 1.16). the hardware/schematic sheet also doesn't describe how a std encoder's switch is wired up. would be great if that was amended in a future revision.
i've beeped the board traces and figured out that way that the 5 pins correspond
(top near 'v2.1' to bottom) to PWM_LR_GP3, PWM_LG_SW, SW_RGB, PWM_LB_SWC and VCC.
the two switch terminals are connected to PWM_LG_SW and PWM_LB_SWC.
digging through the code in Encoder.c and GPports.c i see that in std encoder mode
PWM_LG_SW should be pulled up weakly, and PWM_LB_SWC is pulled low. PWM_LG_SW is then read as inverted input.
the crux: if i just power up the chip and start using it then the multimeter tells me that PWM_LG_SW is floating. only after i write to GCONF the pull up is pulling up and things start working.
The text was updated successfully, but these errors were encountered:
i've got two fresh v2.1 boards, wired up with a plain std. encoder with switch. my multimeter shows the switch conducts exactly when pushed. the boards are unconfigured, ie. using the
default values for all config bits, which according to the datasheet should mean 'std encoder'.
symptom: the i2cencoder doesn't report anything in the button-related bits of ESTATUS when or
after i press the button.
tldr: looks as if STD_EncoderMode() isn't called unless GCONF is written.
workaround: write to the GCONF register even if it's just the same 0x0 as the defaults.
proper fix: i think that the function FirstConfig needs to be called sometime during startup, not just as part of RegisterWrite.
minor problematic aspects: the datasheet doesn't describe the pinout of the 5 pins below the gp1/2 pins (which are listed in figure 1.16). the hardware/schematic sheet also doesn't describe how a std encoder's switch is wired up. would be great if that was amended in a future revision.
i've beeped the board traces and figured out that way that the 5 pins correspond
(top near 'v2.1' to bottom) to PWM_LR_GP3, PWM_LG_SW, SW_RGB, PWM_LB_SWC and VCC.
the two switch terminals are connected to PWM_LG_SW and PWM_LB_SWC.
digging through the code in Encoder.c and GPports.c i see that in std encoder mode
PWM_LG_SW should be pulled up weakly, and PWM_LB_SWC is pulled low. PWM_LG_SW is then read as inverted input.
the crux: if i just power up the chip and start using it then the multimeter tells me that PWM_LG_SW is floating. only after i write to GCONF the pull up is pulling up and things start working.
The text was updated successfully, but these errors were encountered: