How do I change PRX00.ui16ConversionGain (from CAPT_UserConfig.c) in the main loop so the microcontroller uses the updated value? When it gets a new value, it doesnt change the gain being used, its like this value is used once at power up then then any changes are ignored. I don't know how update the runtime value. I want scale the prox signal directly based on a pot reading without having waste computation time scaling filterCount.ui16Natural with a float.
while(1) { // Run the captivate application handler. // CAPT_appHandler(); __no_operation(); PRX00.ui16ConversionGain = 64 + rawPOTADC>>6;//this doesnt change the gain CAPT_appSleep(); } // End background loop
Thanks