PIC16F1847 Microcontroller-Based Programmable Logic Controller: Intermediate Concepts

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

The volume focusses on intermediate concepts of the PIC16F1847-Based PLC project, and covers arithmetical operation ability of PLCs, logical function performers and operations like AND, NAND, OR, NOR. Further, it explains shift and rotate macros moving bits in a register to right or left, and selection macros enabling one value to be selected from several given values according to certain criteria. Demultiplexer circuit is illustrated, which is used to send a signal to one of many devices. Finally, it explains decoder, priority encoder and conversion macros. All the concepts are supported using flowcharts. Aimed at researchers and graduate students in electrical engineering, power electronics, robotics and automation, sensors, this book: Presents arithmetical and logical macros to carry out arithmetical and logical operations to be used for 8-bit or 16-bit variables and/or constant values. Provides shift and rotate macros to do arithmetical or logical shift and rotate operations to be used for 8-bit or 16-bit variables. Proposes selection macros to enable the user to do 8-bit or 16-bit move, load, selection, maximum, minimum, limiting, multiplexing and byte multiplexing operations. Develops demultiplexer macros, decoder macros and priority encoder macros to be used as combinational circuits. Presents conversion macros to provide functions to convert given data from one format to another one.

Author(s): Murat Uzam
Publisher: CRC Press
Year: 2020

Language: English
Pages: 483
City: Boca Raton

Cover
Half Title
Title Page
Copyright Page
Table of Contents
Prologue
Preface
About the Author
Background and Use of the Book
References
Chapter 1 Arithmetical Macros
Introduction
1.1 Macro “R1addR2”
1.2 Macro “R1addR2_16”
1.3 Macro “RaddK”
1.4 Macro “RaddK_16”
1.5 Macro “R1subR2”
1.6 Macro “R1subR2_16”
1.7 Macro “RsubK”
1.8 Macro “RsubK_16”
1.9 Macro “R1mulR2”
1.10 Macro “DivU16by8”
1.11 Macro “incR”
1.12 Macro “incR_16”
1.13 Macro “decR”
1.14 Macro “decR_16”
1.15 Macro “Hbit_CNT” (High Bit Counter)
1.16 Macro “Lbit_CNT” (Low Bit Counter)
1.17 Examples for Arithmetical Macros
1.17.1 Example 1.1
1.17.2 Example 1.2
1.17.3 Example 1.3
1.17.4 Example 1.4
1.17.5 Example 1.5
1.17.6 Example 1.6
1.17.7 Example 1.7
1.17.8 Example 1.8
1.17.9 Example 1.9
References
Chapter 2 Logical Macros
Introduction
2.1 Macro “R1andR2”
2.2 Macro “RandK”
2.3 Macro “R1nandR2”
2.4 Macro “RnandK”
2.5 Macro “R1orR2”
2.6 Macro “RorK”
2.7 Macro “R1norR2”
2.8 Macro “RnorK”
2.9 Macro “R1xorR2”
2.10 Macro “RxorK”
2.11 The Macro “R1xnorR2”
2.12 Macro “RxnorK”
2.13 Macro “invR”
2.14 An Example for Logical Macros
Chapter 3 Shift and Rotate Macros
Introduction
3.1 Macro “Ashift_R” (Arithmetic Shift Right Rin)
3.2 Macro “Ashift_R_16” (Arithmetic Shift Right Rin)
3.3 Macro “Lshift_R” (Logical Shift Right Rin)
3.4 Macro “Lshift_R_16” (Logical Shift Right Rin)
3.5 Macro “Lshift_L” (Logical Shift Left Rin)
3.6 Macro “Lshift_L_16” (Logical Shift Left Rin)
3.7 Macro “shift_R” (Shift Right Rin)
3.8 Macro “shift_R_16” (Shift Right Rin)
3.9 Macro “shift_L” (Shift Left Rin)
3.10 Macro “shift_L_16” (Shift Left Rin)
3.11 Macro “rotate_R” (Rotate Right Rin)
3.12 Macro “rotate_R_16” (Rotate Right Rin)
3.13 Macro “rotate_L” (Rotate Left Rin)
3.14 Macro “rotate_L_16” (Rotate Left Rin)
3.15 Macro “Swap”
3.16 Examples for Shift and Rotate Macros
3.16.1 Example 3.1
3.16.2 Example 3.2
3.16.3 Example 3.3
3.16.4 Example 3.4
3.16.5 Example 3.5
3.16.6 Example 3.6
3.16.7 Example 3.7
Chapter 4 Selection Macros
Introduction
4.1 Macro “move_R” (Move)
4.2 Macro “load_R” (Load)
4.3 Macro “select” (Selection of One of Two 8-Bit Input Variables)
4.4 Macro “select_16” (Selection of One of Two 16-Bit Input Variables)
4.5 Macro “max _5” (Maximum in Five 8-Bit Variables)
4.6 Macro “max_10” (Maximum in Ten 8-Bit Variables)
4.7 Macro “max_N80” (Maximum in N 8-Bit Variables, N = 2, 3, …, 80)
4.8 Macro “max_N40_16” (Maximum in N 16-Bit Variables, N = 2, 3, …, 40)
4.9 Macro “max_N255” (Maximum in N 8-Bit Variables, N = 2, 3, …, 255)
4.10 Macro “max_N255_16” (Maximum in N 16-Bit Variables, N = 2, 3, …, 255)
4.11 Macro “min _5” (Minimum in Five 8-Bit Variables)
4.12 Macro min_10” (Minimum in Ten 8-Bit Variables)
4.13 Macro “min_N80” (Minimum in N 8-Bit Variables, N = 2, 3, …, 80)
4.14 Macro “min_N40_16” (Minimum in N 16-Bit Variables, N = 2, 3, …, 40)
4.15 Macro “min_N255” (Minimum in N 8-Bit Variables, N = 2, 3, …, 255)
4.16 Macro “min_N255_16” (Minimum in N 16-Bit Variables, N = 2, 3, …, 255)
4.17 Macro “limiter”
4.18 Macro “limiter_16”
4.19 Multiplexer Macros
4.20 Macro “mux_2_1”
4.21 Macro “mux_2_1_E”
4.22 Macro “mux_4_1”
4.23 Macro “mux_4_1_E”
4.24 Macro “mux_8_1”
4.25 Macro “mux_8_1_E”
4.26 Macro “mux_16_1”
4.27 Macro “mux_16_1_E”
4.28 Macro “B_mux_2_1_E”
4.29 Macro “B_mux_4_1_E”
4.30 Macro “B_mux_8_1_E”
4.31 Examples for Selection Macros
4.31.1 Example 4.1
4.31.2 Example 4.2
4.31.3 Example 4.3
4.31.4 Example 4.4
4.31.5 Example 4.5
4.31.6 Example 4.6
4.31.7 Example 4.7
4.31.8 Example 4.8
4.31.9 Example 4.9
4.31.10 Example 4.10
4.31.11 Example 4.11
4.31.12 Example 4.12
4.31.13 Example 4.13
4.31.14 Example 4.14
4.31.15 Example 4.15
4.31.16 Example 4.16
4.31.17 Example 4.17
4.31.18 Example 4.18
4.31.19 Example 4.19
4.31.20 Example 4.20
4.31.21 Example 4.21
4.31.22 Example 4.22
Chapter 5 Demultiplexer Macros
Introduction
5.1 Macro “Dmux_1_2” (1×2 DMUX)
5.2 Macro “Dmux_1_2_E” (1×2 DMUX with Enable Input)
5.3 Macro “Dmux_1_4” (1×4 DMUX)
5.4 Macro “Dmux_1_4_E” (1×4 DMUX with Enable Input)
5.5 Macro “Dmux_1_8” (1×8 DMUX)
5.6 Macro “Dmux_1_8_E” (1×8 DMUX with Enable Input)
5.7 Macro “Dmux_1_16” (1×16 DMUX)
5.8 Macro “Dmux_1_16_E” (1×16 DMUX with Enable Input)
5.9 Macro “B_Dmux_1_2_E” (1×2 Byte DeMultiplexer with Enable Input)
5.10 Macro “B_Dmux_1_4_E” (1×4 Byte DeMultiplexer with Enable Input)
5.11 Macro “B_Dmux_1_8_E” (1×8 Byte DeMultiplexer with Enable Input)
5.12 Macro “Dispatcher_1_8_E” (1×8 Dispatcher with Enable Input)
5.13 Macro “Patcher_8_1_E” (8×1 Patcher with Enable Input)
5.14 Examples for Demultiplexer Macros
5.14.1 Example 5.1
5.14.2 Example 5.2
5.14.3 Example 5.3
5.14.4 Example 5.4
5.14.5 Example 5.5
5.14.6 Example 5.6
5.14.7 Example 5.7
5.14.8 Example 5.8
5.14.9 Example 5.9
Chapter 6 Conversion Macros
Introduction
6.1 Macro “Conv_UsInt_2_BCD_U” (Unsigned Short Integer to Unpacked BCD Conversion)
6.2 Macro “Conv_UsInt_2_BCD_P” (Unsigned Short Integer to Packed BCD Conversion)
6.3 Macro “Conv_UInt_2_BCD_U” (Unsigned Integer to Unpacked BCD Conversion)
6.4 Macro “Conv_UInt_2_BCD_P” (Unsigned Integer to Packed BCD Conversion)
6.5 Macro “Conv_BCD_U_2_UInt” (5-Digit Unpacked BCD to Unsigned Integer Conversion)
6.6 Macro “Conv_BCD_P_2_UInt” (5-Digit Packed BCD to Unsigned Integer Conversion)
6.7 Seven-Segment LED Displays
6.8 Macro “Segment_CCD” (Segment_CCD Instruction)
6.9 Macro “Segment_CAD” (Segment_CAD Instruction)
6.10 Macro “Conv_Bin_2_Gray” (Binary to Gray Code Conversion)
6.11 Macro “Conv_Bin_2_Gray_16” (Binary to Gray Code Conversion)
6.12 Macro “Conv_Gray_2_Bin” (Gray Code to Binary Conversion)
6.13 Macro “Conv_Gray_2_Bin_16” (Gray Code to Binary Conversion)
6.14 Examples for Conversion Macros
6.14.1 Example 6.1
6.14.2 Example 6.2
6.14.3 Example 6.3
6.14.4 Example 6.4
6.14.5 Example 6.5
6.14.6 Example 6.6
6.14.7 Example 6.7
6.14.8 Example 6.8
6.14.9 Example 6.9
6.14.10 Example 6.10
6.14.11 Example 6.11
6.14.12 Example 6.12
References
Index