ABSTRACT

Programmable logic controllers (PLCs) are extensively used in industry to perform automation tasks, with manufacturers offering a variety of PLCs that differ in functions, program memories, and the number of inputs/outputs (I/O). Not surprisingly, the design and implementation of these PLCs have long been a secret of manufacturers. Unveiling the mysteries of PLC technology, Building a Programmable Logic Controller with PIC16F648A Microcontroller explains how to design and use a PIC16F648A-microcontroller-based PLC.



The author first described a microcontroller-based implementation of a PLC in a series of articles published in Electronics World magazine between 2008 and 2010. This book is based on an improved version of the project, including:





  • Updates to the hardware configuration, with a smaller CPU board and two I/O extension boards that now support 16 inputs and 16 outputs instead of 8


  • An increased clock frequency of 20 MHz


  • Improvements to several macros


  • Flowcharts to help you understand the macros (functions)


In this book, the author provides detailed explanations of hardware and software structures. He also describes PIC Assembly macros for all basic PLC functions, which are illustrated with numerous examples and flowcharts. An accompanying downloadable resources contain source files (.ASM) and object files (.HEX) for all of the examples in the book. It also supplies printed circuit board (PCB) (Gerber and .pdf) files so that you can have the CPU board and I/O extension boards produced by a PCB manufacturer or produce your own boards.



Making PLCs more easily accessible, this unique book is written for advanced students, practicing engineers, and hobbyists who want to learn how to build their own microcontroller-based PLC. It assumes some previous knowledge of digital logic design, microcontrollers, and PLCs, as well as familiarity with the PIC16F series of microcontrollers and w

chapter 1|10 pages

Hardware of the PIC16F648A-Based PLC

chapter 2|25 pages

Basic Software

chapter 3|29 pages

Contact and Relay-Based Macros

chapter 4|31 pages

Flip-Flop Macros

chapter 5|23 pages

Timer Macros

chapter 6|22 pages

Counter Macros

chapter 7|20 pages

Comparison Macros

chapter 8|12 pages

Arithmetical Macros

chapter 9|22 pages

Logical Macros

chapter 10|26 pages

Shift and Rotate Macros

chapter 11|17 pages

Multiplexer Macros

chapter 12|20 pages

Demultiplexer Macros

chapter 13|32 pages

Decoder Macros

chapter 14|23 pages

Priority Encoder Macros

chapter 15|16 pages

Application Example