{"id":32463,"date":"2019-10-31T21:47:12","date_gmt":"2019-10-31T18:47:12","guid":{"rendered":"https:\/\/prohoster.info\/blog\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi\/"},"modified":"2019-10-31T21:47:12","modified_gmt":"2019-10-31T18:47:12","slug":"kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi","title":{"rendered":"How and why to read datasheets if microcontrollers are your hobby","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"How and why to read datasheets if microcontrollers are your hobby\" src=\"\/wp-content\/uploads\/2019\/04\/ae2537b0263d692c4f79e7b5f7bc0797.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Microelectronics have become a trendy hobby in recent years thanks to the wonderful Arduino. However, there's a catch: with sufficient interest, one can quickly outgrow DigitalWrite(), but what to do next is not entirely clear. The Arduino developers have made considerable efforts to lower the entry barrier to their ecosystem, yet beyond it lies the dark forest of harsh circuit design, which remains elusive to enthusiasts.<\/p>\n<p><\/p>\n<p>For instance, datasheets. They seem to contain everything you need, just take and use them. But their authors clearly do not aim to popularize microcontrollers; sometimes <em>it seems<\/em>, they deliberately abuse obscure terms and abbreviations when describing simple things to confuse the uninitiated as much as possible. But not everything is so grim; with some effort, the mystery can be unraveled.<\/p>\n<p><\/p>\n<p>In this article, I will share my experiences as a humanities major dealing with datasheets for hobby purposes. The text is intended for those who have moved beyond the basics of Arduino and expect some understanding of how microcontrollers work.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Let's start with a traditional<\/p>\n<p><\/p>\n<h3 id=\"migaem-svetodiodom-na-arduino\">Blinking an LED on Arduino<\/h3>\n<p><\/p>\n<p>And here's the code:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">void setup() {\nDDRB |= (1&lt;&lt;5);\n}\n\nvoid loop() {\nPINB = (1&lt;&lt;5);\nfor (volatile uint32_t k=0; k&lt;100000; k++);\n}<\/code><\/pre>\n<p><\/p>\n<p>\"What is this?\" \u2013 asks the seasoned reader. \"Why are you writing something to the input register PINB? It's read-only!\" Indeed, <noindex><a rel=\"nofollow\" href=\"https:\/\/www.arduino.cc\/en\/Reference\/PortManipulation\">the Arduino documentation<\/a><\/noindex>, like many educational articles on the internet, asserts that this register is read-only. I thought so too until I reread <noindex><a rel=\"nofollow\" href=\"http:\/\/ww1.microchip.com\/downloads\/en\/DeviceDoc\/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf\">the datasheet<\/a><\/noindex> the Atmega328p when preparing this article. And it says:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"How and why to read datasheets if microcontrollers are your hobby\" src=\"\/wp-content\/uploads\/2019\/04\/4c754bda59d9f18a38209cc32f0fb3a3.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>This is a relatively new feature; it wasn't available in Atmega8, and not everyone knows about it or mentions it due to backward compatibility concerns. However, it is quite useful for demonstrating that datasheets should be read to utilize all the chip's capabilities, including the lesser-known ones. And this isn't the only reason.<\/p>\n<p><\/p>\n<h2 id=\"zachem-esche-chitat-datashity\">Why else read datasheets<\/h2>\n<p><\/p>\n<p>Typically, Arduino enthusiasts, having played around with LEDs and AnalogWrite, begin connecting various modules and chips to the board for which libraries have already been written. Sooner or later, a library appears that doesn't quite function as intended. At that point, the hobbyist starts tinkering with it to fix the issues, and then...<\/p>\n<p><\/p>\n<p>Something incomprehensible is happening there, which is why I have to go to Google, read numerous tutorials, snag pieces of someone else's suitable code, and finally achieve my goal. This gives a powerful sense of accomplishment, but in reality, the process resembles inventing a bike by reverse-engineering a motorcycle. Moreover, I\u2019m not gaining any understanding of how this bike works. I know this because I\u2019ve been at it for quite a while.<\/p>\n<p><\/p>\n<p>If instead of this fascinating activity, I had spent a couple of days studying the documentation for the Atmega328, I would have saved a huge amount of time. After all, it\u2019s a pretty simple microcontroller.<\/p>\n<p><\/p>\n<p>Thus, reading datasheets is necessary just to have an idea of how the microcontroller is structured and what it can do. And also:<\/p>\n<p><\/p>\n<ul>\n<li>\n<p>to check and optimize other people's libraries. They are often written by fellow enthusiasts reinventing the wheel; or, on the contrary, the authors deliberately add excessive safeguards against mistakes. Better to have three times more code that\u2019s slower rather than it failing to work;<\/p>\n<p>\n<\/li>\n<li>\n<p>to enable the use of chips in my project for which no library has been written;<\/p>\n<p>\n<\/li>\n<li>\n<p>to ease the task of migrating from one line of microcontrollers to another;<\/p>\n<p>\n<\/li>\n<li>\n<p>to finally optimize my old code that wouldn\u2019t fit into Arduino;<\/p>\n<p>\n<\/li>\n<li>\n<p>to learn to control any chip directly through its registers, without worrying about figuring out the details of its libraries, if they even exist.<\/p>\n<p>\n<\/li>\n<\/ul>\n<p><\/p>\n<h2 id=\"zachem-pisat-v-registry-napryamuyu-kogda-est-hal-i-ll\">Why write to registers directly when there are HAL and LL?<\/h2>\n<p><\/p>\n<p><em>Glossary<\/em><br \/>\n<em><strong>HAL, High Abstraction Layer<\/strong> \u2013 a library for controlling a microcontroller with a high level of abstraction. If you need to use the SPI1 interface, just configure and enable SPI1 without worrying about which registers are responsible for what.<br \/>\n<strong>LL, Low Level API<\/strong> \u2013 a library containing macros or structures with register addresses, allowing access to them by name. DDRx, PORTx, PINx on the Atmega are part of LL.<\/em><\/p>\n<p><\/p>\n<p>Discussions around 'HAL, LL, or registers' regularly occur in the comments on Habr. Without claiming access to astral knowledge, I\u2019d simply like to share my amateur experience and thoughts.<\/p>\n<p><\/p>\n<p>Having somewhat figured out Atmega and read articles about the wonders of STM32, I bought half a dozen different boards \u2013 both Discovery and the 'Blue Pills', and even just chips for my own projects. They all collected dust in a box for two years. Occasionally, I'd tell myself: 'That's it, I'll master STM this weekend', launch CubeMX, generate a setup for SPI, look at the resulting wall of text, generously sprinkled with STM copyrights, and decide that it was just too much.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"How and why to read datasheets if microcontrollers are your hobby\" src=\"\/wp-content\/uploads\/2019\/04\/d83be97ba2767121f4be20d524000afe.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Of course, it is possible to figure out what CubeMX has written here. But at the same time, it's clear that memorizing all the formulations to write them down manually later is unrealistic. And debugging this, if I accidentally forget to check a box in Cube, is a completely different story.<\/p>\n<p><\/p>\n<p>Two years passed, and I still longed for <noindex><a rel=\"nofollow\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=fr.appsolute.st&amp;hl=ru\">ST MCU Finder<\/a><\/noindex> all sorts of tasty chips that were beyond my understanding, and I stumbled upon <noindex><a rel=\"nofollow\" href=\"https:\/\/lujji.github.io\/blog\/bare-metal-programming-stm8\/\">this wonderful article<\/a><\/noindex>one, albeit about STM8. And <em>suddenly<\/em> I realized that all this time I had been knocking on an open door: the registers in STM are arranged just like any other microcontroller, and Cube is not necessary to work with them. <em>Wait, it could be done like that?<\/em><\/p>\n<p><\/p>\n<p>HAL and specifically STM32CubeMX is a tool for professional engineers who work closely with STM32 chips. The main feature is a high level of abstraction, the ability to quickly migrate from one microcontroller to another, and even from one core to another, while remaining within the STM32 family. Hobbyists encounter such tasks rarely \u2013 our choice of microcontrollers is typically limited to what\u2019s available on AliExpress, and we more often migrate between radically different chips \u2013 moving from Atmega to STM, from STM to ESP, or whatever new goodies our Chinese friends throw our way. HAL won't help here, and studying it takes quite a bit of time.<\/p>\n<p><\/p>\n<p>That leaves LL \u2013 but it\u2019s just a step away from registers. Personally, I find writing my own macros with register addresses to be useful: I study the datasheet more closely, think about what I will need in the future and what I certainly won\u2019t, better structure my programs, and overall, overcoming this helps with memorization.<\/p>\n<p><\/p>\n<p>Moreover, there is a nuance with the popular STM32F103 \u2013 there are two incompatible versions of LL for it, one official from STM, the other from Leaf Labs, used in the STM32duino project. If writing an open-source library (and that was exactly <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Ontaelio\/DMdriverSTM32F1\">my task<\/a><\/noindex>), I need to either create two versions or access the registers directly.<\/p>\n<p><\/p>\n<p>Finally, the refusal of LL, in my opinion, simplifies migration, especially if you plan for it from the very beginning of the project. An exaggerated example: let's write an Arduino blink in Atmel Studio without LL:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h&gt;\n\n#define _REG(addr) (*(volatile uint8_t*)(addr))\n\n#define DDR_B 0x24\n#define OUT_B 0x25\n\nint main(void)\n{\n    volatile uint32_t k;\n\n    _REG(DDR_B) |= (1&lt;&lt;5);\n\n    while(1)\n    {\n        _REG(OUT_B) |= (1&lt;&lt;5);\n        for (k=0; k&lt;50000; k++);\n        _REG(OUT_B) &amp;= ~(1&lt;&lt;5);\n        for (k=0; k&lt;50000; k++);\n    } \n}<\/code><\/pre>\n<p><\/p>\n<p>To make this code blink an LED on a Chinese board with STM8 (from ST Visual Desktop), you only need to change two addresses:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">#define DDR_B 0x5007\n#define OUT_B 0x5005<\/code><\/pre>\n<p><\/p>\n<p>Yes, I am using a specific feature of connecting the LED on this board; it will blink very slowly, but it will blink!<\/p>\n<p><\/p>\n<h2 id=\"kakie-byvayut-datashity\">What types of datasheets are there<\/h2>\n<p><\/p>\n<p>In articles and on forums, both in Russian and English, 'datasheets' refer to any technical documentation for chips, and I do the same in this text. Formally, they are just one type of such documentation:<\/p>\n<p><\/p>\n<p><strong>Datasheet<\/strong> \u2013 technical specifications. It is mandatory for any electronic component. Reference information, useful to keep on hand, but there is not much to read thoughtfully. However, simpler chips are often limited to the datasheet to avoid creating unnecessary documents; in this case, <em>Reference Manual<\/em> it is included here as well.<\/p>\n<p><\/p>\n<p><strong>Reference Manual<\/strong> \u2013 the actual manual, a hefty book of 1000+ pages. It details the operation of everything packed into the chip. The main document for mastering the microcontroller. Unlike <em>datasheet<\/em>, manuals are written for a broad range of MCUs, containing a lot of information about peripherals that may be absent in your specific model.<\/p>\n<p><\/p>\n<p><strong>Programming Manual<\/strong> or <strong>Instruction Set Manual<\/strong> \u2013 the instruction for unique commands of the microcontroller. Intended for those who program in Assembly. Compiler authors actively use it for code optimization, so generally, we may not need it. But it's useful to glance here for general understanding, especially for some specific commands like interrupt exit, as well as when actively using a debugger.<\/p>\n<p><\/p>\n<p><strong>Application Note<\/strong> \u2013 useful tips for solving specific tasks, often with code examples.<\/p>\n<p><\/p>\n<p><strong>Errata Sheet<\/strong> \u2013 describes cases of unusual behavior of the chip with workarounds if available.<\/p>\n<p><\/p>\n<h2 id=\"chto-est-v-datashitah\">What can be found in datasheets<\/h2>\n<p><\/p>\n<p>Directly in <em>Datasheet<\/em> we may need sections such as:<\/p>\n<p><\/p>\n<p><strong>Device Summary<\/strong> \u2013 the first page of the datasheet briefly describes the device. Very useful in situations where you found a chip somewhere (saw it in a store, desoldered it, encountered a mention) and want to understand what it is.<\/p>\n<p><\/p>\n<p><strong>General Description<\/strong> \u2013 a more detailed description of the chip's capabilities.<\/p>\n<p><\/p>\n<p><strong>Pinouts<\/strong> \u2013 pinout diagrams for all possible chip packages (which pin corresponds to which leg).<\/p>\n<p><\/p>\n<p><strong>Pin Description<\/strong> \u2013 a description of the purpose and capabilities of each pin.<\/p>\n<p><\/p>\n<p><strong>Memory Map<\/strong> \u2013 a memory address map is unlikely to be needed, but it sometimes includes a table of register block addresses.<\/p>\n<p><\/p>\n<p><strong>Register Map<\/strong> \u2013 the table of register block addresses is typically found in the datasheet, and in <em>Ref Manual<\/em> \u2013 only offsets (<em>address offsets<\/em>).<\/p>\n<p><\/p>\n<p><strong>Electrical Characteristics<\/strong> \u2013 in this section, we are primarily interested in <strong>absolute maximum ratings<\/strong>, listing the maximum loads on the chip. Unlike the indestructible Atmega328p, most MCUs do not allow connecting serious loads to the pins, which can be an unpleasant surprise for Arduino enthusiasts.<\/p>\n<p><\/p>\n<p><strong>Package Information<\/strong> \u2013 drawings of available packages, useful for designing your own boards.<\/p>\n<p><\/p>\n<p><em>Reference Manual<\/em> structurally consists of sections dedicated to specific peripherals indicated in their titles. Each chapter can be conditionally divided into three parts:<\/p>\n<p><\/p>\n<p><strong>Overview<\/strong>, <strong>Introduction<\/strong>, <strong>Features<\/strong> \u2013 an overview of the peripheral capabilities;<\/p>\n<p><\/p>\n<p><strong>Functional Description<\/strong>, <strong>Usage Guide<\/strong> or simply the main block of the section \u2013 a detailed textual description of the principles of the peripheral's operation and methods of its use;<\/p>\n<p><\/p>\n<p><strong>Registers<\/strong> \u2013 a description of control registers. In simple cases like GPIO or SPI, this might be sufficient to start using the peripheral, but often you still have to read the previous sections.<\/p>\n<p><\/p>\n<h2 id=\"kak-chitat-datashity\">How to Read Datasheets<\/h2>\n<p><\/p>\n<p>Datasheets can be intimidating at first due to their volume and the abundance of unfamiliar words. In reality, it's not that scary if you know a few hacks.<\/p>\n<p><\/p>\n<p>Install <strong>a good PDF reader<\/strong>. Datasheets are written in the proud traditions of paper manuals, and it's great to print them out, use plastic bookmarks, and bind them. Hypertext is present in minimal quantities. Fortunately, at least the document structure is organized with bookmarks, so a decent reader with easy navigation is really needed.<\/p>\n<p><\/p>\n<p>A datasheet is not a textbook by Stroustrup; it <strong>doesn't require reading everything in order<\/strong>. If you followed the previous advice \u2013 just find the necessary section in the bookmarks panel.<\/p>\n<p><\/p>\n<p>Datasheets, especially <em>Reference Manuals<\/em>, may describe the capabilities of not just a specific chip, but <strong>the entire series<\/strong>. This means that half, if not two-thirds of the information is not relevant to your chip. Before studying the TIM7 registers, check in <em>General Description<\/em>, do you have it?<\/p>\n<p><\/p>\n<p>Know <strong>English<\/strong> at least on <strong>a basic level<\/strong>. Datasheets are half composed of terms unfamiliar to the average speaker, and half made up of simple connecting constructs. Sometimes, there are wonderful Chinese datasheets in Chinglish, where half are also terms, and the other half is a random assortment of words.<\/p>\n<p><\/p>\n<p>If you encounter <strong>an unfamiliar word<\/strong>, don't try to translate it with an English-Russian dictionary. If you're puzzled by <em>hysteresis<\/em>, translating it as \"hysteresis\" won't make you feel warmer. Use Google, Stack Overflow, Wikipedia, forums where the relevant concept will be <noindex><a rel=\"nofollow\" href=\"https:\/\/stackoverflow.com\/questions\/5357918\/what-does-hysteresis-mean-and-how-does-it-apply-to-computer-science-or-programmi\">explained in simple terms with examples<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>The best way to understand what you've read is to <strong>verify it in action<\/strong>. So keep a development board on hand that you're getting acquainted with, or preferably two \u2013 in case something is still unclear and you see that magical smoke.<\/p>\n<p><\/p>\n<p>It's a good habit to keep a datasheet handy when you're <strong>reading someone's tutorial<\/strong> or studying someone else's library. You might find a more optimal solution to your problem in it. Conversely, if the datasheet doesn\u2019t help you understand how the register works, Google it: chances are, someone has already described everything in simple terms or left understandable code on GitHub.<\/p>\n<p><\/p>\n<h2 id=\"slovarik\">Glossary<\/h2>\n<p><\/p>\n<p>A few useful words and symbols to help you get to grips with datasheets more quickly. This is what I recalled over the past couple of days; additions and corrections are welcome.<\/p>\n<p><\/p>\n<p><em>Electricity<\/em><br \/>\n<strong>Vcc<\/strong>, <strong>Vdd<\/strong> \u2013 \"plus\", power<br \/>\n<strong>Vss<\/strong>, <strong>Vee<\/strong> \u2013 \"minus\", ground<br \/>\n<strong>current<\/strong> \u2013 current<br \/>\n<strong>voltage<\/strong> \u2013 voltage<br \/>\n<strong>to sink current<\/strong> \u2013 to act as a \"ground\" for external loads<br \/>\n<strong>to source current<\/strong> \u2013 to power external loads<br \/>\n<strong>high sink\/source pin<\/strong> \u2013 pin with high \"tolerance\" to load<\/p>\n<p><\/p>\n<p><em>IO<\/em><br \/>\n<strong>H, High<\/strong> \u2013 on the Vcc pin<br \/>\n<strong>L, Low<\/strong> \u2013 on the Vss pin<br \/>\n<strong>High Impedance<\/strong>, <strong>Hi-Z<\/strong>, <strong>floating<\/strong> \u2013 nothing on the pin, \"high impedance\"; it is effectively invisible to the outside world.<br \/>\n<strong>weak pull up<\/strong>, <strong>weak pull down<\/strong> \u2013 built-in pull-up\/pull-down resistor, roughly equivalent to 50 k\u03a9 (see the datasheet). Used, for example, to ensure that the input pin doesn't float in the air, causing false triggers. <em>Weak<\/em> \u2013 because it can be easily \"overridden.\"<br \/>\n<strong>push pull<\/strong> \u2013 output mode of the pin, in which it switches between <em>High<\/em> and <em>Low<\/em> \u2013 regular OUTPUT with Arduino.<br \/>\n<strong>open drain<\/strong> \u2013 designation of an output mode where the pin can be either <em>Low<\/em>, or <em>High Impedance \/ Floating<\/em>However, this is almost never a \"true\" open drain; there are protective diodes, resistors, and so on. It is merely a designation for the ground\/nothing mode.<br \/>\n<strong>true open drain<\/strong> \u2013 and here is a true open drain: the pin goes directly to ground when open, or stays in a suspended state when closed. This means that it can handle a voltage higher than Vcc if necessary, but the maximum is still specified in the datasheet in the section <em>Absolute Maximum Ratings \/ Voltage<\/em>. <\/p>\n<p><\/p>\n<p><em>Interfaces<\/em><br \/>\n<strong>in series<\/strong> \u2013 connected in series<br \/>\n<strong>to chain<\/strong> \u2013 connecting chips in a chain in series, increasing the number of outputs.<br \/>\n<strong>shift<\/strong> \u2013 shift, usually denotes bit shifting. Accordingly, <strong>to shift in<\/strong> and <strong>to shift out<\/strong> \u2013 to receive and transmit data bit by bit.<br \/>\n<strong>latch<\/strong> \u2013 latch, covering the buffer while bits are being shifted through it. When the transmission is completed, the latch opens, and the bits start to work.<br \/>\n<strong>to clock in<\/strong> \u2013 to perform bit-wise transmission, shifting all bits to their required positions.<br \/>\n<strong>double buffer<\/strong>, <strong>shadow register<\/strong>, <strong>preload register<\/strong> \u2013 denotes the history when a register must be able to accept new data but hold it until a certain point. For example, for proper PWM operation, its parameters (duty cycle, frequency) should not change until the current cycle is finished, but new parameters can already be transmitted. Accordingly, the current ones are held in <em>shadow register<\/em>, while the new ones go into <em>preload register<\/em>, being written into the corresponding chip register.<\/p>\n<p><\/p>\n<p><em>Any<\/em><br \/>\n<strong>prescaler<\/strong> \u2013 frequency divider<br \/>\n<strong>to set a bit<\/strong> \u2013 to set the bit to 1<br \/>\n<strong>to clear\/reset a bit<\/strong> \u2013 to reset the bit to 0 (<em>reset<\/em> \u2013 a feature of STM datasheets)<\/p>\n<p><\/p>\n<h3 id=\"chto-dalshe\">What's Next<\/h3>\n<p><\/p>\n<p>In general, a practical section was planned with demonstrations of three projects on STM32 and STM8, specifically made for this article using datasheets, with bulbs, SPI, timers, PWM, and interrupts:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"How and why to read datasheets if microcontrollers are your hobby\" src=\"\/wp-content\/uploads\/2019\/04\/8929bad65dad7473a81a221281c43557.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>But there is quite a bit of text, so the projects will be moved to the second part.<\/p>\n<p><\/p>\n<p>The skill of reading datasheets will help you with your hobby, but it hardly replaces live communication with fellow enthusiasts in forums and chats. For this, you still need to improve your English first. Therefore, for those who have read to the end \u2013 a special reward: two free lessons at Skyeng with the first payment using the code <code>HABR2<\/code>.<\/p>\n<p>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/skyeng\/blog\/449624\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0430 \u2013 \u043c\u043e\u0434\u043d\u043e\u0435 \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043b\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u043c\u0443 Arduino. \u041d\u043e \u0432\u043e\u0442 \u0431\u0435\u0434\u0430: \u043f\u0440\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0442\u0438 DigitalWrite() \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u2013 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u044f\u0441\u043d\u043e. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Arduino \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u043b\u0438 \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u0441\u0438\u043b\u0438\u0439 \u0434\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u043e\u0433\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043d\u043e \u0437\u0430 \u0435\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043a\u043e\u043b\u044b\u0448\u0435\u0442\u0441\u044f \u0442\u0435\u043c\u043d\u044b\u0439 \u043b\u0435\u0441 \u0441\u0443\u0440\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043c\u0430\u043b\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u0442\u0430\u0448\u0438\u0442\u044b. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":24267,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-32463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0430.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u0438 \u0437\u0430\u0447\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0448\u0438\u0442\u044b, \u0435\u0441\u043b\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u2013 \u0432\u0430\u0448\u0435 \u0445\u043e\u0431\u0431\u0438 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:47:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:47:12+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47How and why to read datasheets if microcontrollers are your hobby | ProHoster","description":"Microelectronics.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u0438 \u0437\u0430\u0447\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0448\u0438\u0442\u044b, \u0435\u0441\u043b\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u2013 \u0432\u0430\u0448\u0435 \u0445\u043e\u0431\u0431\u0438 | ProHoster","og:description":"\u041c\u0438\u043a\u0440\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0430.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/kak-i-zachem-chitat-datashity-esli-mikrokontrollery-vashe-hobbi","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:47:12+00:00","article:modified_time":"2019-10-31T18:47:12+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"32463","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 11:00:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:58:24","updated":"2026-01-21 11:00:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=32463"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32463\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/24267"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=32463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=32463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=32463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}