Hey,
I am using AIOs here:
#define AIO230_TRZC 230
#define AIO253_STZC 253
#define AIO247_RSZC 247
All I do to set them up is this:
// AIO230 -> Phase TR zero cross, 0 = zero cross
GPIO_setPinConfig(GPIO_230_GPIO230);
GPIO_setAnalogMode(AIO230_TRZC, GPIO_ANALOG_DISABLED);
GPIO_setQualificationMode(AIO230_TRZC, GPIO_QUAL_SYNC);
// AIO253 -> Phase ST zero cross, 0 = zero cross
GPIO_setPinConfig(GPIO_253_GPIO253);
GPIO_setAnalogMode(AIO253_STZC, GPIO_ANALOG_DISABLED);
GPIO_setQualificationMode(AIO253_STZC, GPIO_QUAL_SYNC);
// AIO247 -> Phase RS zero cross, 0 = zero cross
GPIO_setPinConfig(GPIO_247_GPIO247);
GPIO_setAnalogMode(AIO247_RSZC, GPIO_ANALOG_DISABLED);
GPIO_setQualificationMode(AIO247_RSZC, GPIO_QUAL_SYNC);
However, the pins read opposite of what they really are. When voltage is high, the software reads the pin as 0. When voltage is low, the software reads the pin as 1. Did I miss something in the setup?
I am using the function GPIO_readPin() to read the value of the AIO. Is this ok?
