Hi guys again. I know I shouldn't keep asking for help but this time i really need help. Cause my progress report 2 is just next week. Not much has been done which is omg omg for me now. lolz.
I am now doing a sender and receiver device. The receiver device has a button for it to reply to the sender but it should only allow this to happen when 2 conditions are satisfied, 1-the button is pressed and 2-when the led lights up. My problem is that I have tried using the IF...THEN...ENDIF statement to check for the button and LED. For eg. PORTA.0 is the LED and PORTA.1 is the switch, so...
IF (PORTA.0 = 1) AND (PORTA.1 = 0) THEN
It doesn't work. So I assume that the IF...THEN statement treats PORTA.0 as an input and some error might occur there. Anyone has any idea how to go about this problem? Thanks in advance.
Bookmarks