2 Basic Software

 

In this chapter, the basic software of the PIC16F648A-based PLC is explained A PLC scan cycle includes the following: obtain the inputs, run the user program, and update the outputs. It is also necessary to define and initialize all variables used within a PLC Necessary functions are all described as PIC assembly macros to be used in the PIC16F648A-based PLC The macros described in this chapter could be summarized as follows: HC16 5 (for handling the inputs), HC595 (for sending the outputs), dbncr0 and dbncr1 (for debouncing the inputs), initialize, get_inputs, and send_outputs. In addition, the concept of contact bouncing and how it is solved in the PIC16F648A-based PLC is explained in detail

2.1 Basic Software Structure ...

Get Building a Programmable Logic Controller with a PIC16F648A Microcontroller now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.