Hello. In this post, we will talk with you and review the practicality of using the C language “for today” in a particular area, using examples from DIY devices to IoT projects described in this blog. At the same time summarize the work done.
So the main areas of application:
1. Programming DIY devices on microcontrollers. These can be from simple physical parameters measuring devices to various controllers for monitoring, control, etc. In fig. on the left, for example, a power supply converted from a computer, a microcontroller has been added to it to measure and indicate current and voltage.
2. The second paragraph is already more widespread. Programming of specialized devices and embedded systems ( Embedded Systems ) for the energy sector, defense industry, etc., where microcontrollers are used. These include, for example, devices from voltage relays to thyristor converters, etc.
For the implementation of relatively simple devices in the bulk use microcontrollers PIC (less functional and cheaper) , AVR (more functional and more expensive) and STM with architecture RISK.
For example, barriers, ultrasonic water meters «Ergomera» on Atmega (AVR) (on fig. left) and etc.
For projects where the resources of the above MCs are insufficient, such as an embedded system, which is a specialized microprocessor control, monitoring and monitoring system embedded directly into the device it controls — use controllers and processors with the core architecture ARM (refined RISC-machine).
It could be brands Atmel, ST, Fujitsu, NXP, Toshiba, Samsung and many others. Below in the picture is an example of a built-in technical accounting system. «Синет» (pulse) on the processor board 5025A-386 (Intel 80386), modems ZyXEL, commercial accounting cabinets
Another vivid example of embedded system is the management of a thyristor converter on an NXP processor to control a DC drive. The figure below shows the cabinet itself with thyristor units, power electronics, and electronic piping, as well as the control board itself on the processor NXP . All logic is written in the language of C . The products of LLC “NPP Converter-Complex".
Third, these are operating systems such as The Linux kernel, FreeBSD, Windows are written in C language . You can also include FreeRTOS , , which is a multitasking real-time operating system (RTOS ) for embedded systems. Ported to 35 microprocessor architectures. Distributed under the license MIT (open source software license) since 2017. The list of supported platforms includes ARM , and Atmel AVR . In subsequent posts, we port it to the microcontroller STM .
4. Also a practical example would be that C/C++ there are often extensions for other languages, for example, java has the interface JNI (Java Native Interface) which implies working in Android . These wrappers are written for projects that use their own protocols, formats, models and other forms of data interaction, etc.
5. The final point is for studying the fundamental principles of imperative (sequential) programming, which develops in its turn algorithmic thinking. Of course, knowledge of a given language should not be limited to it, but only be a plus to existing ones.
A good example of the above is a phased description of learning the basics of writing code, designing devices on microcontrollers and their practical application. One of such headings in the blog is Web-technologies, which assume the concept of IoT , where a bunch of devices in different languages are used to use this technology, for example: C, java, php, svg , which are used for MK, web server, web interface, Androoid OS . In the future, we will continue to supplement this category by developing the smarthouse application for Android on the one hand as a client and program for stm32, as a server on the other hand, and we will also begin to make a review of IIoT, the use of which for today should be a priority in each direction of production. Since we have touched on this topic, I would like to quote the expert Alexander Khaytin about Industrial Internet of Things ( http://www.energoatlas.ru/2018/03/01/smart-energy-summit-iot/ ):
« ...Now the business has become very dynamic, and this leads to the fact that the question of responsiveness remains a significant factor for its management, including a purely operational one. Here's what's important: react promptly and clearly. Everything flows, everything changes, and it flows more and more quickly than traditional industries would like, but there is nowhere to go again, and we must learn to adapt to new realities. I see no other way out, except for reducing the costs of increasing efficiency, reducing reaction time and increasing the flexibility of production, business, whatever. All this gives us IOT ... It is easy to notice that two results are achieved here, first, you can get an unlimited amount of data and configure it (the device) with this huge data set, and second, you can make more informed decisions.»
Summing up, we can say that C is widely used today for both microcontrollers and OOP. From the above listed areas of application, two can be distinguished which this application covers for DIY devices and IoT fundamentals, which in turn implies the use of various devices, systems and languages. We will stop at this today. Bye everyone