Building a programmable logic controller with PIC16F648A microcontroller. (2017)