Go to the main page of MCS Electronics and check out all the examples in the Application Notes section. There are many, many examples of sample programs with supporting schematic drawings. Many of which use switches. Most of the time a switch is simply placed between the pin of the port you plan to use and ground.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum