I don't think there's anything of substance I can add here, only chiming in to answer implicitly: There is no command or statement to make a pin or port "stay" on. Pin states are "set and forget" in that they go high or low only as commanded - and remain so, until commanded to change. Some statements include changing input/ output or high/ low as part of the assembly (documented), but port state is a switch and commanded - at some level.
So, for anyone following on after looking for a solution to a similar problem: check your code, check your configuration, check your power supply; the pin will remain set (or cleared) as initially commanded unless some other influence holds sway.
Bookmarks