![]() You are trying to define one function that you can call multiple times, passing in a different pin to assert each time you call the function. If I understand your question correctly, I could expand your code snippets to look like this: sbit R1 = P1^0 I hope my question is understandable! If not, I will gladly elaborate and maybe post all the code (although it is quite messy). Is what I am attempting to do possible? Sending a single Pin adress as an overload for a method? If so, what datatype should it be? I was juggling between char and bit but I can't settle. I know I'm not doing this right, but I had to start somewhere. P = HIGH //Sets the row being checked to HIGH (HIGH is already defined as a 1). Which is named scroll, I have this void scroll (bit P) Then, on my main method, I run something like while(TRUE) However, the way I wanted to do this was by making a unique scroll method that received the row parameter and set it to HIGH accordingly.Īll through the needed inputs, but I'm not sure if this is correct. ![]() I'm currently making a very simple Tic-Tac-Toe game with an AT89C51RC2 and I am having issues getting the button input right.īasically, the input is a 3x3 Button Matrix which I want to utilize by scanning through the rows with a pulse while checking the columns for a connection pretty basic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |