Hi all
Currently making a project that needs to read the inputs of 6 ports. I have 3 sensors and 3 push buttons that I need to return an integer value back to the main function. These need to be separate routines because the integers are totally separate, the only common ground is sharing the PORTC.
I thought of reading the entire port and then the appropriate HEX values given could in turn give the integer value but I assume there would be some way to read each individual port and if an active high is given, the integer value is returned to the main. Very confused with how each individual port can get read, i am still quite basic when it comes to C programming, any help will be tops!
Thanks
Currently making a project that needs to read the inputs of 6 ports. I have 3 sensors and 3 push buttons that I need to return an integer value back to the main function. These need to be separate routines because the integers are totally separate, the only common ground is sharing the PORTC.
I thought of reading the entire port and then the appropriate HEX values given could in turn give the integer value but I assume there would be some way to read each individual port and if an active high is given, the integer value is returned to the main. Very confused with how each individual port can get read, i am still quite basic when it comes to C programming, any help will be tops!
Thanks