Spork
Member level 3
So I'm using a PIC microcontroller (PIC18F4550). What I want to do is create an array using 23 IO pins. 9 of which will be set high as output, and the other 14 to be set as input.
Lets call the two sets of pins 1A-9A and 1B-14B respectively. When I connect 1A to 1B, I want one action. 1A to 2B, a separate action. Then 2A to 1B and 3A to 1B should give two more actions, and so on throughout the matrix.
Is there any way using a PIC to check which two pins are connected? I want to know how to differentiate between the 5v that pin 1A would give me and that pin 2A would give me. I'm looking for any sort of documentation on the subject, or even a simple explanation or example.
Edit:
I just wanted to clarify that I know basic PIC instructions and how to manipulate IP pins. I have also tried to do research on the subject, but have been unsuccessful finding it because I don't know what to call it. I work mostly in ASM, but could read an example in C if you had one.
Lets call the two sets of pins 1A-9A and 1B-14B respectively. When I connect 1A to 1B, I want one action. 1A to 2B, a separate action. Then 2A to 1B and 3A to 1B should give two more actions, and so on throughout the matrix.
Is there any way using a PIC to check which two pins are connected? I want to know how to differentiate between the 5v that pin 1A would give me and that pin 2A would give me. I'm looking for any sort of documentation on the subject, or even a simple explanation or example.
Edit:
I just wanted to clarify that I know basic PIC instructions and how to manipulate IP pins. I have also tried to do research on the subject, but have been unsuccessful finding it because I don't know what to call it. I work mostly in ASM, but could read an example in C if you had one.