PIC MICROCONTROLLER [PARTS AND APPLICATIONS]

Microcontroller and microprocessors are the same?
Many times we have the question of what is the difference between a microprocessor and a microcontroller, a microprocessor, it can be seen that depending on the circuit some additional integrated circuits were required in addition to the microprocessor such as:

RAM (to temporarily store data and memories)
ROM (to save the program in charge of the computer process)
Integrated circuit (for input and output ports)
Address decoder.
On the other hand, the microcontroller is designed in such a way that it has all the components integrated on the same chip. You do not need other specialized components for your application, because all the necessary circuits, which otherwise correspond to the peripherals, are already incorporated. This saves the time and space required to build a device.

microcontroller

Once taking into account the difference between microprocessor and microcontroller, we can begin with the topic of microcontrollers.

The true name of this microcontroller is PICmicro (Peripheral Interface Controller), better known as PIC.

A PICmicro is a programmable integrated circuit
Programmable means that it is a device with which you can plan how it will work, which can be adapted to our needs. In other words, the pic is capable of modifying its behavior based on the commands recorded in its memory. It is composed of several functional blocks, which fulfill a specific task.

ROM Memory (Read Only Memory)
RAM Memory (Random Access Memory)
In / Out (I / O) lines Also called ports
Control logic Coordinates the interaction between the other blocks
PIC internal architecture
The architecture of a microcontroller allows defining the structure of its operation, the two main architectures used in the manufacture of microcontrollers are Von Neumann architecture and Harvard architecture. Additionally, these architectures can have either CISC-type or RISC-type processors.

Von Neumann architecture
In this architecture, the data and instructions circulate on the same bus since these are stored in the same memory, its main advantage is the saving of input-output lines but this supposes a decrease in the speed with which the processes.

This type of architecture is very common in personal computers today, and it was very common in the construction of microcontrollers until the great advantages of Harvard architecture were discovered.
with Neumann

Harvard architecture
Unlike the previous one, in the Harvard architecture, there is a specific memory for data and a specific memory for instructions, in this way two well-differentiated buses are used. With this it is possible to work with the two memories simultaneously and consequently, much more speed is obtained in the execution of the programs.

Currently, the trend for microcontrollers is to use this type of architecture.

Hardware

The processor of type CISC (Complex Instruction Set Computer)
A processor that allows handling a wide set of instructions is called a CISC type, which in Spanish means “Computer with Complex Instruction Set”, programming in this type of architecture requires in some cases the mastery of up to hundreds of instructions.

The processor of type RISC (Reduced Instruction Set Computer)
When a processor is designed to handle few instructions but without affecting the performance of the computer, it is called a RISC type, which in Spanish means “Computer with Reduced Instruction Set”, this allows programming with much more ease and, if that were not enough, the circuits of type RISC have a structure that searches for at least the next statement to be executed while performing the current statement. This structure allows to achieve not only higher processing speed but also to process each instruction at the same speed.

Once taking into account this information we have to know that there are different ranges of pics.

Basic range (16C5XX)
Mid-range (16C (F) XXX)
Pic miniature (12C (F) XXX)
High-end (17CXXX)
Enhanced range (18C (F) XXX)

The applications of the PIC are really very numerous, let’s see only a few to give us an idea of the power of the pics.

LCD alphanumeric display control
Microcontrollers are especially useful for very easily controlling LCD liquid crystal displays.

LCD pic

Keyboard control
Many applications require special keyboards that are tailored exactly to certain needs. The PICmicro can be used to perform tracking sequences and thus know which key has been pressed

keyboard pic

Temperature control
Thanks to the fact that the PICs include Analog / Digital converters, the control of variables such as Temperature, Pressure, and Flow can be done with extremely simple circuits. With a few resistors and a good temperature sensor, you can make a Thermostat or a Flow controller.

temperature

Robot Control
It can almost be assured that there is no Robot that does not include a PIC in any of its many functions. They are equally important in servo control, voice recognition, sequential tasks, etc.

robot pic

Motor control
PICs can also be used to control different types of motors: stepper, direct current, servo, etc.

servo motor pic

To select a microcontroller we must take into account some criteria:

Programming memory. RAM
Memory Type
Presentation type
Number of inputs/outputs
Special hardware