BL1810 Data Acquisition

I am using BL1810. I need to count 17 push buttons into a PC. Can someone help me by telling me which ports I should use, which Dynamc C sample I should read? I need Dyn C sample or reference to understand how to initialize the ports, how to read from the ports and how to send the data to PC using serial port. Please help.