I am working on a new project, and it is the first time I have really used the ADC. This project is for an amateur radio amplifier controller, and speed is an issue as I need to read the transmit control signal and flip some relays quickly from receive transmit before the input to the amplifier becomes active. If this does not happen regularly, the relay will eventually fail because the relay will arc.
The controller is also reading a number of thermistors, controlling fan PWM, monitoring voltage, current, input power, output power, and VSWR. I expect to read and process two or four of these each time through the loop (dual ADC) to keep the total loop time low, while trying to catch bad events (input power too high, high VSWR, high input current, etc.).
I would like to use the HIGH_SPEED setting, versus whatever the default is, but I expect that there are tradeoffs and I do not see these discussed anywhere. Can someone tell me what the effect of choosing HIGH_SPEED on the converted data is?
A second separate question: I see that the ADCs do a compare function, but I have not seen a tutorial. Is a compare something that I call regularly which just checks whether the value is above a threshold and that is incredibly fast. If so, that would be ideal for me. I could check on all these values to see if any of them are out of tolerance and immediately shut down, and if nothing is out of tolerance read the values of two analog inputs for display.
A final question, how expensive are floating point operations in the Teensy 4.1? Is it good practice to do all my calculations in fixed point and handle the conversion when I send an update to the display?
Thanks in advance for your help
Marcus
The controller is also reading a number of thermistors, controlling fan PWM, monitoring voltage, current, input power, output power, and VSWR. I expect to read and process two or four of these each time through the loop (dual ADC) to keep the total loop time low, while trying to catch bad events (input power too high, high VSWR, high input current, etc.).
I would like to use the HIGH_SPEED setting, versus whatever the default is, but I expect that there are tradeoffs and I do not see these discussed anywhere. Can someone tell me what the effect of choosing HIGH_SPEED on the converted data is?
A second separate question: I see that the ADCs do a compare function, but I have not seen a tutorial. Is a compare something that I call regularly which just checks whether the value is above a threshold and that is incredibly fast. If so, that would be ideal for me. I could check on all these values to see if any of them are out of tolerance and immediately shut down, and if nothing is out of tolerance read the values of two analog inputs for display.
A final question, how expensive are floating point operations in the Teensy 4.1? Is it good practice to do all my calculations in fixed point and handle the conversion when I send an update to the display?
Thanks in advance for your help
Marcus