Hi All,
I am trying to interface LCD display JHD 204A to my Orange Pi zero. My display characters on LCD display are not consistant .
So I tried to verify the ouputs of correponding gpio pins. I suspect some problem at pin 13 on my Pi zero board(pin I used for LCD).
The pin 13 is mapped to GPIO PA02 ,I am using gpio_lib.c for my application. Following is my test code.
int main(){
sunxi_gpio_init();
sunxi_gpio_set_cfgpin(SUNXI_GPA(02), SUNXI_GPIO_OUTPUT);
while(1) {
sunxi_gpio_output(SUNXI_GPA(02), 1);printf(" high\n");
sleep(1);
sunxi_gpio_output(SUNXI_GPA(02), 0);printf("low\n");
sleep(1);
}
return 0;
}
My preliminary observation is as following.
I am testing the pin13 voltage with a multimeter.
I get the reading in multimeter as nearly 3 volts during "high" then it switches back to 0 volts during "low", but this is not repetitive as it need to be. Sometimes the pin stays at 3 volts for longer duration than expected.
Has anyone found similar problem with the GPIO pins while using gpio_lib.c , any help is appriciated
Thanks in advance,