ABSTRACT

A programmable logic controller (PLC) is an industrial digital computer which automatically controls various processes and components in an industrial system. A PLC consists of a few basic parts, including a power supply, a central processing unit (CPU), and inputs/outputs. This chapter presents the hardware of the PIC16F1847-Based PLC, consisting of mainly two parts: the CPU board and the I/O extension boards. The CPU board contains mainly three sections: power, programming, and CPU. The power section accepts 12V DC input used as the operating voltage of the relays. 5V DC is also used for ICs, inputs, etc. The programming section deals with the programming of the PIC16F1847 microcontroller. For programming the PIC16F1847 in circuit, a PIC programmer hardware and a software with ICSP (in-circuit serial programming) capability are used. The CPU section consists of the PIC16F1847 microcontroller. In the project reported in this book, the PLC is fixed to run at 32 MHz with an internal oscillator (oscillator frequency = 8 MHz and PLL = 4). This frequency is fixed because time delays are calculated based on this speed. In this chapter, the hardware structure of the PIC16F1847-Based PLC, consisting of 32 discrete inputs, 32 discrete outputs, 4 analog inputs, 1 analog output, and 2 PWM outputs, are also explained in detail.