Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

Embedded Basics Miscellaneous Tech

How to start with Microcontrollers?

Table of Contents

What is Microcontroller?

Microcontroller is a kind of an integrated circuit, which is used in the development of every electronic device around us. From avionics industry for the development of spacecrafts, missiles, rockets, satellites, to the car industry for the development of automotive cars, luxury cars, Electric vehicles, sports bikes not only this but even in medical industry for development of medical equipment’s like ECG’s, vaccine’s, optical equipment’s and even in music and entertainment industry for the development of speakers, mikes, audio amplifiers, stage lights to shooting camera. Also, microcontrollers you find around in our day-to-day life (white goods) in devices like Refrigerators, Ovens, Electric tandoor, grinders, hair dryers, Fans, AC’s etc. Even in consumer electronics televisions, mobile phones, tabs, smart watches, projectors, printers these are also developed with the help of microcontrollers.

Not only this but even in heavy machines like cranes, JSB, construction vehicles, metros, railways there is need of microcontrollers for their development.

So, you see, if you literally take any electronic/electrical gadget device around you there would be a microcontroller in it in one way or another, from food technology to medical technology to smart homes to smart cities to aircrafts, ships, boats, yachts to electronic meters and list will never end.

Thus, the need of microcontrollers and its knowledge is growing from day by day, as for the development of any embedded device of any kind of industry, there would be a need for microcontrollers.

How do microcontrollers accomplish that?

Microcontroller is an innovative technology that has revolutionize the world and made the electronic items so much feasible for us. Though microcontrollers have been in world since 1960’s. But there are many new inventions and development still going on this field. Well microcontroller is just like a human being.

Just like human beings can do any kind of work same way microcontrollers can be used in any kind of industry to make any kind of gadget.

Analogy of Microcontrollers!

Just like human beings have brain where processing of all data is done microcontrollers have CPU. In the CPU(Central Processing unit), all the processing of data, speed of execution is done. Thus CPU’s are the brain of the microcontrollers.  Often the word CPU is used interchangeably with processor/core.

Just like human beings use some form of language to communicate with outside world like English, Spanish, Hindi and etc. Same way microcontrollers use different communication protocols (UART, I2C, SPI, CAN, LIN, cryptography, I2S, CSI  1-wire, and many other) and digital/analog signals(GPIO, PWM, ADC, DAC, TIMERS) to communicate with the outside world. 

Just like human beings have different body parts to interact with outside world, microcontrollers have different peripherals which are used to interact with outside world. For each Communication Protocol and digital/analog signals that are stated above there is some corresponding peripheral in microcontrollers.

Just like in human being’s brain sends signals to body parts, same way in microcontroller for using peripherals some configurations and programming has to be done to use them, this is called peripheral coding/drivers. That would be explaining in below sections.

Now some sensors and modules are connected to Microcontrollers as an intermediate between the outside world and microcontrollers. And these sensors and modules communicate with specified communication protocols.

  • Just like we human beings have memories of our life, past and things to do, according to which we act and do our daily work. Exactly same way microcontrollers too have memories, difference is just this memory is programmable. According to the program written on these microcontrollers they work. So, it’s like programming the human beings (with Smily emoji). That would be explaining in below sections.

Connecting the analogy of microcontrollers!

Microcontrollers are connected to different sensors and modules according to the industry in which they are being used. Microcontrollers communicate with these sensors and modules by some communication protocol via the peripherals of the MCU. Sensor and modules act as an intermediate between the microcontrollers and world, to get information from the outside world that is input to the microcontrollers(input). Then this data is processed and analyzed by the CPU (brain of MCU), where all these calculations, processing, operations are done. And then information is sent from the microcontrollers(output) to corresponding sensors and modules to show results or control the outside world. And That’s how microcontrollers can be used to make any electronic gadget of any Industry.

Practical usecases of microcontrollers

Having the understanding of communication protocols and peripherals of the microcontrollers one can make electronic gadgets for number of industries.

Decoding the data from the sensors and modules, and then correspondingly what actions has to be taken, according to inputs. This is controlled by the program Witten on these microcontrollers. That is called as Embedded Software/Firmware development. This program is controls the flow of execution, that what to do, when to do and how to do.
There are many software components in this flow, Device drivers for connecting sensors and modules, bootloader to start the MCU, Peripheral drivers for peripherals of MCU, Hardware Abstraction Layer for code portability, RTOSes for real time computing, Stacks for IoT protocols and etc. For programming the microcontrollers there is need of environment called Software Development Kit (SDK). Microcontroller are programmed using C/CPP language. More on Software development Kit would be told below.
Peripherals are made up off an electronic circuit using resistors, capacitors, op-amps, transistors, digital-analog electronics and miniaturized so small using the VLSI-VHDL technology that these circuits are made to fit inside the tiny chips called microcontrollers
For using the microcontrollers there is need of hardware resources called Hardware Development Kit (HDK). More on Hardware Development kit is told in next blog.
HDK

Microcontroller Vendors/Semiconductor Companies​

Microcontrollers are designed and developed by the Semiconductor Companies. These Companies designs the microcontrollers for different industries (listed above), where these microcontrollers are used for product development.

Semiconductor industry is multi-billion-dollar industry, companies are as big as google, amazon & Microsoft (some are even larger than that). 

Name of Semiconductor companies:

Semiconductor companies not only designs and develop the microcontrollers but instead many other electronic/integrated chips (ASICS, memory chips, sensor chips, IoT chips, discreate electronics, development boards and etc.)Apart from just electronic chips, these companies develop the Software packages, Software Tools, Software Applications (ML, AI based), Hardware tools and also do Core RnD on the next upcoming technologies in the fields like of Automotive, IoT, Avionics, Industrial Automation and list will never end.

Designing of microcontrollers is done via VLSI/VHDL technology and then programming on those microcontrollers to build the applications is done via Embedded Software/Firmware Develpment.

To give a practical use case, you guys must have heard of Arduino. Well Arduino is a development, in which there is microcontroller Atmega 328. This microcontroller is designed and developed by Microchop technologies semiconductor company. Another is NodeMCU, which is also a development board, which has ESP8266 IoT MCU which is designed and developed by Espriff Systems. Most of the hobbyist and students are aware of only these 2 controllers, but there are number of other microcontrollers which are designed and developed. Like STM32 Blue Pill, is a development board which has STM32F103 MCU is ARM Core Based Microcontroller developed and designed by STMicroelectronics. Another is Teensy development boards which has I.MX1062 microcontrollers designed and developed by NXP semiconductors.

At the gettobyte, you are going to find content and tutorial series on different microcontrollers of different vendors. explaining how to use those Industrial microcontroller and tutorials on how to use the peripherals of Industrial microcontrollers to come out of Arduino environment. And get industry ready skills and knowledge in microcontroller field’s

Categories in Microcontrollers​

Categories in MCU’s

Now like there are categorization in human beings in terms of color, features, gender kind of same way there are categorization in microcontroller in terms of:

  • Which CPU architecture and CPU core is used (RISC-V, ARM, CISC, Power architecture, 8-bit architectures), every CPU architecture has some features and specs. Every human has unique brain and only 1 bran, but different microcontrollers can have same CPU core.
  • Bit size of microcontroller (8/16/32 bit Microcontrollers), it’s kind of like amount of data that microcontroller can process. 32 bit can process more data and 8 bit would process less data.
  • Then depending on peripherals support microcontroller has, more peripheral support it has a greater number of applications can be built from it by connecting different sensors/modules to it.
  • Microcontroller’s has memory , as in the end we have to write some program to control the microcontroller, that program is written inside the microcontroller memory. So, amount of memory microcontrollers has (Flash Memory, RAM, SRAM and etc.), depending on that too there is categorizations in microcontroller.
  • Support of Software Development Kit and Hardware Development kit for the corresponding microcontroller.

Chronology to start with microcontrollers

Chronology to start with Microcontrollers

Okay, so lot has been talked about Microcontrollers. Now how to get started with it and in what chronology. Well Microcontroller technology is very vast and has many exciting/interesting topics. Best way to start learning about microcontrollers is by doing Embedded Software/Firmware Development.

From the Embedded Software/Firmware developer, below defined is the best way to start with the microcontrollers:

  • First is take any MCU of any specific vendor (let’s say NXP Semiconductors S32K144 MCU) and then get its development board and debugger/programmer of that MCU. You can get development board and hardware debugger of many different MCU’s from gettobyte website. 

For NXP S32K144 MCU, buy this breadboard compatible eval board, it can be programmed via externa JTAG debugger. Get to know about Pinout and pins description of the MCU.

  • And then setup is its SDK. So understand what Software Development Kit is, why is it needed. Software Development Kit comprises of IDE, code configuration tools, peripheral drivers and software debugging tools.

For NXP S32K144 MCU, Install the S32 Design Studio IDE, Freemaster debugging tool and software package of S32K1 for peripheral drivers(Real Time Drivers). Viewers can refer to S32 DS IDE getting starting blog, for getting to know

  • After that understand the microcontroller architecture, the processor architecture of the MCU. Different kind of interrupts and faults in the MCU. 

Reading the S32K144 Reference manual and Datasheet. First 2-3 chapters of both the docs and try to understand terminologies, keywords which are written, features and specs of S32K144.Then S32K144 MCU has ARM Cortex M4 architecture, so understanding, about ARM architecture and various components in it from its technical reference manual.  Refer to this blog for S32K144 MCU understanding

  • After that, understanding the basic peripherals and communication protocols of the MCU so that one can get to know how application build around MCU.  Theoretical understanding of the communication protocol, digital/analog signals and then relating how is that theory being implemented in MCU by understating the peripheral drivers of that MCU. Every MCU vendor provide the peripheral driver for the corresponding MCU by the name of different names: Real Time drivers, Device drivers and etc.

NXP S32K144 MCU has number of peripheral. NXP does provide peripheral drivers for the peripheral of the S32K144 MCU by the name of Real Time Drivers. I have written well formatted blogs on all the peripherals of s32K144 MCU by explaining the demo example of  peripheral drivers, features of corresponding peripheral in MCU. Refer from here. At gettobyte you can find peripheral driver tutorial on number of Industrial controllers.

  • Now connect different sensors & modules to corresponding peripheral and make the sensor/module run via microcontroller. In this we need to understand at first the working principal of that sensor/module and then understand from its datasheet about how to control that sensor/module via microcontroller so as to run it and then writing its device driver. Device driver is a program written to interface difference sensor/module with microcontroller.

Connect different type of sensor and modules to MCU. At gettobyte their are proper tutorial series on how to connect sensor/module with any MCU. Have connected number of different sensor/module to NXP S32K144 MCU.  Refer to sensor and module section to start.

Different Components in the microcontroller

List of blogs to read to start with the journey

Next Blog To Read

Hardware Development Kit(HDK)
Software Development Kit(SDK)

More Blogs to read to get started with MCU's

ADC in AVR

Table of Contents Introduction to Analog To Digital Conversion (ADC) Microcontrollers as we know of today are digital devices that is they only understand digital

Read More »

STM32_IoT_Metering_Eval_Board

Hola Amigos!! Welcome you all to Gettobyte platform. I am firmware developer and when I am learning firmware development by interfacing number of sensors and

Read More »

Author

Kunal

Leave a comment

Stay Updated With Us