support icon indicating copy to clipboard operation
support copied to clipboard

[NXT - help wanted]: Implement ADC module

Open laurensvalk opened this issue 2 months ago • 1 comments

There is no ADC driver for the NXT yet. We need a file adc_nxt.c here that implements pbdrv_adc_init and pbdrv_adc_get_ch.

Note: the NXT reads a few channels via the AVR coprocessor, and a few with the main CPU. We would need to sample both and make them available through the aforementioned API. nxos shows how to get the ones from the AVR. The ones on the main CPU can be read from the appropriate registers. The original firmware implements this if further references and configuration information is needed.

The CPU-based ADCs are used for the NXT color sensor (And partial sensor auto-detection).

laurensvalk avatar Nov 07 '25 14:11 laurensvalk