ComputersEquipment

PIC controller. Programming of PIC-controllers. Schemes of PIC-controllers

When schemes are made, it is necessary that someone or something controls the performance of the necessary actions. For a person, this is quite problematic, since it is necessary to use a significant number of different elements to control their operation (transistors, resistors, thyristors, diodes, capacitors, etc.). But all complex and large circuits can be controlled with the help of controllers (microcontrollers). What they are, will be told on the example of the families of the PIC. So what are PIC controllers for dummies? What is their scheme and where are they used?

What is a PIC microcontroller

The PIC controller (or microcontroller) is a means of automating the execution of certain actions using a pre-programmed program. A feature of the representatives of this product line is the ease in programming and the availability of all the necessary functions for work. Describing its design, it should be noted that in its composition there is only one silicon crystal (this is a characteristic feature of all microcontrollers). In addition to it, the PIC controller has a certain number of legs. Some of them can be used as logical inputs, some as outputs, the rest have two-way applications. The feet can be either digital or analog.

For operation of the vast majority of PIC controllers, a stable voltage of 5V is necessary. This is enough to enable him to work in his usual mode and carry out the program set before him. Programming PIC-controllers directly from the computer is impossible. A programmer is used for this purpose.

Controller families

The PIC controller does not exist in a single instance. The company manufactures a significant range of microcontrollers, each of which has its own characteristics, capabilities and potential applications. The number of families themselves is quite large and depends on the classification attribute, which is taken as the main one. Therefore, it is worth mentioning only about the basic classification, in which there are only three families: 8-, 16- and 32-bit. They, in turn, are divided into others, but since the families themselves are not the topic of the article, they will not be talked about.

Where applicable

Due to its versatility, the PIC controller can be applied almost anywhere. Microcontrollers can be found in refrigerators, TVs, washing machines. But the RIS product line has that feature that circuits on PIC-controllers are popular among radio amateurs and self-taught robots. With their help, you can easily adjust the operation of the node or the entire device. Promotes such popularity reasonable price, ease of programming and a significant amount of educational material.

You can apply the PIC-controller when creating a machine on the radio control, robot-hands and other handicrafts that can be done, limited to a modest budget. It can also be used for something industrial - quite popular is the topic of creating automatic self-made machines controlled by a microcontroller. The spectrum of use is wide, and with a competent approach, almost any goal can be achieved, therefore the circuits on PIC-controllers can be seen not only on amateur creations.

Software for working with PIC-controller

The minimum necessary software is a notebook. But still, because of free distribution, you can use the MPLAB software offered by the manufacturer. More precisely, the line of software (development environment, compilers) MPLAB. Thanks to the company's policy, it is distributed free of charge, but has certain limitations. So, with a short demo version you can try with all the possibilities, but after its termination the functionality of the program will be trimmed. In a full-fledged program, there is a significant tool that makes it easy to create programs, it is convenient to search for various problem areas and conduct code optimization. Depending on the version, the code optimization function may be terminated or the number of controllers supported by the program may be reduced. For the sake of truth it is worth saying that the company leaves support exclusively to the most popular representatives.

There is also a number of software provided by other companies. In general, their functionality is similar, but there are differences. So, many people express discontent that MPLAB has a disloyal to the users design. Therefore, manufacturers rely on saving cropped functions and the convenience of working with their software. Programs for PIC-controllers are very diverse, so here it is largely a matter of taste.

Creating a program for the PIC-controller

You can create a special program with the help of the appropriate software and even in a simple notebook. Such an opportunity exists due to the fact that it works with programming languages such as assembler and C. The main difference lies in the amount of information being written and the ease of setting the data. You can hear a lot about the complexity of C, but the assembler is even more complicated and requires a more thorough approach.

So, when creating a program, you must specify for which controller it is intended. It may be necessary to perform a number of settings, but they need to be carried out with experience or confidence, because errors can lead to the fact that microcontrollers will turn into ordinary pieces of plastic and iron.

Programming with the programmer

But how to transfer the developed program into the microcontroller itself? How does microcontroller programming work? Especially for this purpose there are special devices - programmers. They send signals to the microcontroller, which change the cells in memory according to the program. To start the transfer process, you need to insert the microcontroller in the programmer, and it, in turn, connect to the computer. Then use the software to run the firmware. Typically, the programming of PIC controllers lasts from thirty seconds to two minutes.

Types of programmers

Which programmer should I choose to write the program to the microcontroller? Conditionally, there are three types: homemade, from the manufacturer and factory from other companies. Using each of them has its own peculiarities.

So, self-made programmers are quite cheap. But their use is fraught with the fact that they can easily turn a microcontroller into a piece of plastic and iron. And the programming of microcontrollers can in such cases turn to unpleasant consequences in the form of an electric shock, therefore it is necessary to adhere to safety precautions. In addition, if you do it yourself from scratch, you will often get a product with rather limited capabilities regarding the change of the work object. But in the global network, you can find a significant number of solutions to this problem, proposed by other people, and which probably will not give you any problems.

The original programmer from the manufacturer will be able to perform its work qualitatively for any microcontroller. There is a guarantee for it, and if after receipt it does not work, then it is no problem to replace it. But in the order of things, when the firmware PIC-controllers it is carried out without problems.

But stops from its acquisition a fairly high price.

Programmers released by other companies have a fairly wide range of objects they work with. Their feature is the low price and / or the ability to work with other microcontrollers except PIC. There are truly universal "monsters" that can provide work of various types, but because of the need to create a large number of connections, their price is not low.

Schematic features

And finally, a few words about image schemes. It is necessary to navigate the legs based on the accompanying documentation, since the microcontrollers are schematically often different from the actual construction of the terminals. The main thing in such cases is the signed conclusions, and it is for them and should be guided when creating the device.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.