Yes,
on each loop, you must check which keys are released and de-energize the corresponding 1-5 relays. ( the last ones do not need it ...)
the PIC outputs must be considered as Bistable ones ... and you must write every change you want !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks