I am using the following code to read the ADC on an OnLogic Fr202. It always returns…
- User
I am using the following code to read the ADC on an OnLogic Fr202. It always returns 0xff,0xff,0xff,0xff. Can you help me find the problem? void sysonlogicmachineio::readallanaloginputs() { for (int x=0;x<MAXINOUT;++x) { if (analogchannelflags[x]!=-1) { // see for more info // we will use two analog input pins for each input (differential inputs) int en = 1; // enable (use the following bits to select channel and speed, etc.) int single = 0; // use two pins for each input (differential) int odd = 0; // odd also acts a sign. Setting to 1 would reverse polarity of the differential input int osr = 3; // corresponds to an oversample rate of 256 (the default value) int twox=0; //don't run at 2 times the speed
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.