
- 371 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Building a Programmable Logic Controller with a PIC16F648A Microcontroller
About this book
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
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
1 Hardware of the PIC16F648A-Based PLC
data in, clock in, and shift/load pins, respectively. Similarly, RB3, RB4, and RB5 pins are all reserved to be used for 8-bit serial-to-parallel converter register/driver TPIC6B595 Through these three pins and with added TPIC6B595 registers,
Schematic diagram of the CPU board.

Photograph of the CPU board.

Schematic diagram of the I/O extension board.

Photograph of the I/O extension board.

Schematic diagram of the CPU board plus two I/O extension boards.

Photograph of the CPU board plus two I/O extension boards.

Photograph of the CPU board plus two I/O extension boards and a USB PIC programmer.
data in and RB6 clock in pins). If there is only one I/O extension board used, then eight clock_in signals are enough to get the eight input signals. For each additional I/O extension board, eight more clock_in signals are necessary. The serial data coming from the I/O extension board(s) are taken from the SI input of the 74HC/LS165(send_outputs) the output data are serially clocked out (through RB3 clock out and RB4 data out pins) and finally latched within the TPIC6B595. If there is only one I/O extension board used, then eight clock_out signals are enough to send the eight output signals. For each additional I/O extension board, eight more clock_out signals are necessary The serial data going to the I/O extension board(s) are sent out from the SER OUT (pin 18) of the TPIC6B5952 Basic Software
HC16 5 (for handli...Table of contents
- Cover Page
- Half title
- Supplementary Resources Disclaimer
- Title Page
- Copyright Page
- Dedication Page
- Table of Contents
- Preface
- Acknowledgments
- Background and Use of the Book
- About the Author
- 1 Hardware of the PIC16F648A-Based PLC
- 2 Basic Software
- 3 Contact and Relay-Based Macros
- 4 Flip-Flop Macros
- 5 Timer Macros
- 6 Counter Macros
- 7 Comparison Macros
- 8 Arithmetical Macros
- 9 Logical Macros
- 10 Shift and Rotate Macros
- 11 Multiplexer Macros
- 12 Demultiplexer Macros
- 13 Decoder Macros
- 14 Priority Encoder Macros
- 15 Application Example
- About the CD-ROM
- References
- Index