Is it possible to associate each pot that I have on my board with an led that gets brighter and dimmer depending on the value the pot is sending out. I am not sure if this is a hardware or a software thing, my knowledge in this area is limited.
Maybe someone here could work out a way, but it does seem that since the DOUT register’s output pins are just an on/off (all or nothing) state, it would have to happen at the current limiting resistor stage, so it would probably involve additional circuitry as well as software (if it were under digital control). Maybe there’s a way a stacked (stereo) pot could do that, with one whole side dedicated to the LED’s resistance, and one to the regular AIN feed.
although requiring extensive programming, you could add an aout to control the led(s) and use a stored value for the coresponding pot/encoder to determine the brightness level.
personally, i fail to see the practical usefulness of this idea (no matter how cool it is ;)) as our eyes are not capable of accurately measuring absolute levels of brightness, so the feedback would be limited in its value.
If only a small set of brightness levels are required, you could do this via PWM - no additional hardware is required in this case, only a special PWM routine which can be included into the application.
I read an article about a clever PWM method for an optimized LED dimming some time ago, unfortunately I forgot the link… :-/ The idea was, not just to change the duty cycle in order to dimm the LED, but to run special sequences of pulses to avoid the typical “flickering” effect.
If these were actual potentiometers, one could connect the wiper (which also would go to the AIN module) to an opamp (set to a gain of 1, just acting as a buffer), and run the output of that through an LED and resistor.
Using a digital encoder would require a MIOS-based solution, as covered above.
It seemed to me like you would be able to do that. But oh well, I have heard of another solution, I can’t quite remember the specifics right now, but I will look into it.