Hi all.
Im using the foxboard in a project, and have 6 relays connected to it via
PG14,15,1,2,3and
4.
Most of the pins behave, but PG 1,3 and 4 seem to want to default to hi. I
thought I would
combat this with the following C code:
int main() {
gpiosetdir(PORTG, DIROUT, PG8_15);
printf("Outputs set\n");
gpioclearbits(PORTG, PG14);
printf("Outputs PG14 Clear\n");
gpioclearbits(PORTG, PG15);
printf("Outputs PG15 Clear\n");
gpioclearbits(PORTG, PG1);
printf("Outputs PG1 Clear\n");
gpioclearbits(PORTG, PG2);
printf("Outputs PG2 Clear\n");
gpioclearbits(PORTG, PG3);
printf("Outputs PG3 Clear\n");
gpioclearbits(PORTG, PG4);
printf("Outputs PG4 Clear\n");
printf("All Outputs Off\n");
return(0);
}
However, after a few seconds I can hear the relays change state again.
Any ideas what is happening, and how I can stop this?
Many thanks in advance
Chris