In the last blog we discussed what a keypad module is . In this blog we will be discussing how to interface a 4×4 membrane type keypad module with stm32 microcontroller. Although the keypad module can be configured using both polling and interrupt methods , in this blog we will be discussing the interrupt method as it takes less CPU cycles , also since interrupt doesn’t require constant CPU attention. Keypad module along with stm32 microcontroller finds applications in industrial machines as well various projects such as bluetooth door lock , scientific calculator etc. Hardware description The keypad module consists of 3 layers:- The top layer is made of polymer which usually is the printed graphic overlay . It defines the function of each button in the keypad module . It is heat and water resistant and also prevents from electric discharge. The middle layer that usually consists of dome shaped stainless buttons which upon touch makes contact with the bottom layer completing the circuitry. The bottom layer consists of printed circuitry made of conductive material such as silver or copper oxide. When a key is pressed the dome shaped buttons make contact which completes the circuit and this information is conveyed to microcontroller in the form of signal by the external ribbon. The 4×4 keypad module chosen by us consists of numbers from 0 to 9 along with 2 characters ‘*’ and ‘#’ in the first 3 columns while the last column consists of alphabets A, B ,C , D. The internal circuit diagram of the keypad module Internal Circuit Working Circuit Diagram As can be seen one end of each button is connected to a wire that is then connected to the connector pin as row and other end is connected to another wire which is the column wire. Both the row and column wires helps us pinpoint the button that is pressed. The connection are then made to the MCU in which the row part is configured as GPIO output and written high in our case this will be PA15, PB3, PB4 , PB5 pins the column part is then written as GPIO EXTI interrupt which will get triggered in case of a button push , this will be PB6,PB7,PB8,PB9 in our case . As can be seen in the figure since each row from one side is already HIGH once the connection is made by pressing the button this is read by the MCU pins PB6,PB7,PB8,PB9 and the interrupt is raised which is detected in the rising edge. Besides the keypad module connection UART1 is also enable as PA9 as TX and PA10 as RX This will be used to display the button pressed when the interrupt is fired using teraterm or similar software. ALGORITHM Configure pins PA15,PB3,PB4,PB5 as output pins with no pull up and low frequency Configure pins PB6, PB7,PB8, PB9 as interrupt pins with no pull up and interrupt detection on the rising edge Set the NVIC priority as 0 and enable IRQ Incoming interrupts are handled using EXTI callback function Initialize the UART1 function , configure the parameters and select PA9 as tx and PA10 as RX Hal tick function is called to use key debouncing and prevent unwanted input noise from the buttons 2 variables currentMillis and previousMillis are declared which prevents extra activations or slow functions from triggering the interrupts this is done by subtracting the former from latter and the difference should be greater than 10 Each row is written GPIO 1 and checked if the corresponding column is gpio 1 as well. in case both the conditions are satisfied the interrupt is raised and a keypress is detected The keypressed is displayed on Teraterm or similar software using UART1 SOFTWARE CONFIGURATION Open the stm32cube ide and configure the sys mode, select the debug as serial wire and time base source as systick . In the GPIO section select the pins PA15, PB3,PB4, PB5 as output pins set parameters to default which is GPIO pins to no pull and operations at low frequency . Next select the pins PB6,PB7,PB8,PB9 as EXTI interrupt pins also in the NVIC section enable the line EXTI line [9:5] interrupts .Also configure the GPIO EXTI as interrupt rising which would read the occurrence of the interrupt on the rising edge of the wave and operation as low frequency . The NVIC priority is set to 0 (the highest) and the IRQ is enabled. All the button or key presses are handled by HAL_GPIO_EXTI_Callback function in which the keydebouncing is applied and each row is written GPIO HIGH incase a button press the respective column goes high as well raising the interrupt and the corresponding key is displayed using UART .for eg-The button press such as key 9 is detected when both PB3 and PB7 is HIGH as due to the press a connection is made and an interrupt is raised. Also in the connectivity section select the UART1 set the parameters such as mode to asynchronous , baud rate 115200, Word-length as 8 bits , Stop bits as 1 , mode as TX and RX , hardware flow control as none and oversampling rate as 16 . The UART1 has pin PA9 as TX and PA10 as RX . The uart is used to display the key that is pressed on a teraterm or similar software with baud rate set to 115200 SOFTWARE CONFIGURATION CODE #include “main.h” #include #include /* Private includes ———————————————————-*/ char buffer[32]={0}; /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef ———————————————————–*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ————————————————————*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro ————————————————————-*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ———————————————————*/ UART_HandleTypeDef huart1; /* USER CODE BEGIN PV */ GPIO_InitTypeDef GPIO_InitStructPrivate = {0}; uint32_t previousMillis = 0; uint32_t currentMillis = 0; uint8_t keyPressed = 0;
Table of Contents What are Keypad Modules ? Keypads are input devices that most of us are familiar with that help us communicate with a machine , by pressing a set of buttons or keys and giving it a set of instructions to perform tasks.We see them at ATMs, Phones,,military, even Refrigerators , Vending Machines etc constantly evolving and changing over the years such as membrane keypads,dome-switch keypads, capacitive touch keypads etc. Keypad modules are basically sets of buttons , keys or switches arranged in rows and columns in matrix form which establishes a connection when a button is pressed and this information is transmitted to the machine.Keypads play an important role in human machine communication be it an operator in a factory or a child buying a beverage from a vending machine . But all these variety of applications of the keypads showcases the different types of keypads and the technologies they employ. Types of Keypad Modules 1. Membrane type Membrane type keypad modules are most commonly used in commercial applications as well as household appliances such as refrigerators , coolers, calculators etc. They are made of 3 layers : The top layer that consists of labels and printed text justifying the function of that particular key they are made up of polyester or polycarbonate materials hence the printed material lasts for a long time. This is the only layer that is visible to the user.This layer also prevents charge discharge and is water as well as heat resistant. Space layer that comprises the button which is usually made of stainless steel . They usually have a dome structure that helps them make contact with the bottom layer . Bottom layer that consists of the conductive material, usually silver or copper oxide. The parts where there is a chance of short circuit are painted with a dielectric. When the user presses a key the stainless steel button and the bottom layer comes in contact completing the circuitry which is then sent to the external ribbon as a signal . The size of these layers are as thin as membrane hence the name membrane. Each of the layer is a half of the circuit that is connected to the external ribbon which acts as a communication path between human machine interface. PCB Type The PCB type keypad module consists of a PCB which is designed in such a manner that connections are made between each row and column on which mechanical push buttons are soldered . The connections between rows and columns are then finally ended on the 8 connector pins which are connected to the machine to identify the location of the button pressed.These can be customized as per the need. They are widely used in the phones and cheaper , easy to install and have a relatively long life. Capacitive type The capacitive touch type keypad module as the name implies uses the change in capacitance upon application of the touch as a measure to detect the human interface . The human finger acts as a dielectric which increases the capacitance . This increased capacitance causes an increase in the charging and discharging time which is monitored and classified as touch. These are often used over their counterparts such as resistive type which are slower and less smoother.Since change in capacitance is involved these modules are also sensitive high levels of heat , light , temperature changes, liquid application etc. To counter the behavior of touch keypad modules under the exposure to the liquid the texas instruments keypad module uses mutual capacitance rather than self capacitance to classify a touch and distinguish false touches. Dome Switch It’s a combination of a flat-panel membrane and mechanical-switch keypad. They feature two circuit board traces embedded under a silicone keypad with a dome-shaped switch. These domes create tactile feedback when pressed, making them particularly useful in commercial and work-related applications. Furthermore, dome-switch keypads have a high level of reliability, often lasting for as many as 5 million cycles. Scissor switch type In this keypad module the keys are designed like scissors. They also have a rubber dome key such as in dome switch but they have improved functionality by keeping the keys connected together . They may have better functionality but they tend to be expensive and are high maintenance. They are different Scissor Switch type in the market but in general they have 3 layers. 4 x 3 The 4×3 keypad module as the name suggests consists of 4 rows and 3 columns . Even though as per the requirement the size of the matrix can vary in general the 4×3 are used in industry applications in which only numbers are required to be entered in the machine.Hence the first 3 rows consists of the numbers between 1-9 whereas the last last row consists of *,0,#. 4 x 4 Besides 4X3 the 4×4 keypad is also available in which there are 4 columns and 4 rows. In this besides the numeric values alphabets A, B , C , D are also available in the last column . This keypad module finds application in the security system , industrial control system applications, data entry systems etc. How does Keypad Modules works ? The module usually consists of graphic overlay the part of the module that is visible to the user, It is usually made of polycarbonate or polyester materials that are highly customizable depending on the requirement . The material used makes the printed character to last longer. It also consists of an internal polymer layer which house the internal circuitry and protects from electric discharge and is also heat and water resistant Inside the polymer layer is the button mesh layer usually made of stainless steel dome like structure and second layer of embossed circuitry usually made by printing copper or silver oxide with some dielectrics to prevent short circuit Both these layers are halves of the internal circuitry that completes the circuit when the user presses the button
For the people looking to start with STM32 and looking for its full tutorial blog series on different peripherals of the STM32 Microcontrollers. In This blog get to know about, UART HAL API’s, how to generate the UART code and demo examples based on UART peripheral of STM32.
In the new age of autonomous and connected vehicles, cyber-attacks in automotive are happening frequently. Discover in this blog, what technology is used to make our vehicles safe and secure.
Table of Contents GPIO Theory So now we’ll talk about GPIO pins . GPIO stands for general purpose input output pins; they are the means for communication between the microcontroller and the external world (using sensors etc).It is signal that arrives on these pins or a signal that is sent or written on these pins that facilitates this communication. These pins can be configured to act as input or output via the application software(in our case stm32cube ide). The programmer can configure the pins as LOW or 0V or HIGH or 3.3V(or 5V ). These GPIO pins can also be configured to act as special purpose pins as well where their alternate functionality is exploited . These alternate functionality includes UART , ADC , SPI etc . In the case of UART communication, Transmitter(Tx) and Receiver(Rx) pins are required. GPIO pins can be configured to act as TX or RX pins . Even in ADC the pins are configured to act as Analog pins having 12 bits of resolution . The alternate functions of various pins are shown below: Input floating Input pull-up Input pull-down Analog Output open-drain Output push-pull Alternate function push-pull Alternate function open-drain GPIO Peripheral in STM32F103 All the pins of STM32F103 are grouped in multiple ports as PORT A, PORT B, PORT C As can be seen from Pin configuration chart in the PA1 stands for Port A Pin 1. There are 37 GPIO pins in stm32f103 which are divided as PORT A with 16 pins, PORT B with 16 pins, PORT C with 3 pins and PORT D with 2 pins. Each GPIO port has two 32-bit configuration registers (GPIOx_CRL, GPIOx_CRH), two 32-bit data registers (GPIOx_IDR, GPIOx_ODR), a 32-bit set/reset register (GPIOx_BSRR), a 16-bit reset register (GPIOx_BRR) and a 32-bit locking register (GPIOx_LCKR). In the register names, x stands for the port to which pin belongs. If we are configuring pin PA1, it has Port A then registers would be accessed by GPIOA_CRL and etc. Out of above-mentioned registers, GPIO peripheral has 2 most important registers: Direction Register(GPIOx_CRL, GPIOx_CRH)</h3 > Direction register: Set the corresponding pin as input/output pin. Data register(GPIOx_IDR, GPIOx_ODR)</h3 > Data register: where we set the Logic level (High (1)/Low (0)), for the corresponding pin if it is configured as output pin or we read the Logic level (High (1)/Low (0)), for the corresponding pin if it is configured as input pin. Pin Configuration Chart Pin Definitions GPIO Peripheral Block Diagram in STM32F103 First after selecting the pin the port is decided Then after following the arrow the busses are selected based on it: APB/APB1 or AHB After which the clock is enabled to the particular port using either __HAL_RCC_GPIOX_CLK_ENABLE() function or using the RCC AHB1 peripheral clock enable register and selecting the port to which clock has to be provided by enabling it. Methods to configure the GPIO Peripheral Configuring the busses i.e AHB1, AHB2, APB1, APB2 . The AHB bus is faster than APB bus and in case of certain modules they are connected to the same bus .Hence it depends upon the application which bus to use. As can be seen from the picture below the AHB1 takes clock to PORT A , PORT B , PORT C etc . Hence to initialize a pin to a particular port the in RCC AHB1 clock enable register GPIOEN is set to 1 (For Port A GPIOAEN , For Port B GPIOBEN etc) Enabling the clock to that port otherwise the particular pin will not be functional Creating an instance of the structure and then using the members of the structure set the following:- PIN – Takes the pin no as input GPIO_PIN_X {where X -0 to 15} MODE– Selects the mode the specified pin is supposed to work in . It takes in value Output Push Pull ,Output Open drain PULL- It selects the initial value of the pin and takes value no pull up no pull down, pull up or pull down SPEED- Selects the speed of the working of the specified pin i.e low, medium or high ALTERNATE- Specifies the alternate function performed by the pin UART TX OR RX , ADC etc, GPIO Peripheral SDK using STM32HAL We are going to use STM32 HAL SDK for using the GPIO peripheral of the STM32F103. STM32HAL is a very versatile and robust Software package for using Peripherals of the STM32 Microcontroller family. To know more about STM32HAL, refer to this link. Each STM32 HAL has drivers for all the peripherals of the STM32 Microcontroller(One can navigate to the Driver folder in the STM32F1 HAL local repo installed). These drivers can be configured and enabled to use in the project via the STM32 CubeMX configuration tool, which is also integrated into STM32CubeIDE( just like told in the above section for configuring GPIO peripherals). Will be digging into that part, in the next section. For now, let’s understand the STM32HAL GPIO SDK for STM32F103 MCU. stm32f1xx_hal_gpio.c: This file consists of various macros and is responsible for the intialization and configuration of the functions which in turn configures the peripheral. stm32f1xx_hal_gpio.h: consists of various structure definitions that help configure various parameters of the pin, enumeration, and various macros stm32f1xx_ll_gpio.c & stm32f1xx_ll_gpio.h: GPIO Low-level driver source/header file, contains functions that configure the GPIO Peripheral registers at the hardware level. These files are the ones that actually interact with the hardware and make it configurable to our needs.  STM32 HAL Functions for GPIO Peripheral Functions are set of instructions that required to perform certain tasks. In general, a function is first declared in header file(.h) and then it is definied in source file(.c) and then called in main.c or application code. It is of the form function return data type, function name and function arguments. In Embedded functions are required to initialize a peripheral or configure it on the basis of various parameters which are passed on using arguments. This information is then passed on to the registers. List of functions used
Clock Peripheral Theory Before getting into how to configure the clock peripheral . We will discuss why microcontrollers need a clock source at all. The processor , the busses and the peripherals that are present in the microcontroller all are reliant on the clock to synchronize their operations. The choice of the clock source depends upon the following factors:- How much speed is required for a particular application How accurate the clock source should be i.e the consistency of the period between each clock tick Power requirements of the application If there is any significant error in the clock speed it will cause unpredictable consequences for internal microcontroller operations.The operations such as:- The conversion rate of analog to digital signals is governed by a microcontroller clock . The clock determines the rate at which the analog signal will be sampled and how accurate that sampling is done is also governed by the accuracy of the clock. The digital to analog conversion in a microcontroller is also dependent on the clock as the clock speed determines the maximum frequency that can be generated for the analog signal. Also the clock accuracy determines the waveform accuracy In the case of asynchronous communication the sampling of the incoming data stream is clock dependent as well.Even though in some cases the synchronization of the clock is not necessary but the transmitter and receiver should have the same clock speed for decoding and encoding purposes. So in a nutshell the clock determines how fast a microprocessor executes the given set of instructions Clock Peipheral features in STM32F103 The main system clock of the microcontroller is the one from which all the other clocks are derived such as clock to AHB domain, clock to APB domain , clock to the USB, clock to the ethernet etc . This main system clock is referred to as the SYSCLK. As can be seen in the picture of the clock configuration setting the system clock after being chosen is passed through prescalers it gets divided into a clock source that goes into HCLK that goes into AHB bus , DMA , cortex system timer ,FCLK. PCLK1 that goes into APB1 peripherals and timer clocks .PCLK2 that goes into APB2 peripherals and timer clocks and ADC1. Hence it is responsible for operations such as DMA , ADC. These buses are further connected to the pins that are responsible for ADC , GPIO , SPI and other functionality and in case these pins are not being used the clocks to the pin can be disabled to save power FIG-1- Clock configuration in stm32cube To properly drive the SYSCLK there are 3 different sources:- HIGH SPEED INTERNAL (HSI) oscillator clock(Internal to MCU) HIGH SPEED EXTERNAL (HSE) oscillator clock(External to MCU) PHASE LOCKED LOOP(PLL) clock( Internal to MCU) There are secondary clock sources as well:- 40KHz low speed internal RC (LSI) this used to drive watchdog and optionally RTC(Internal to MCU) 32.768 KHz low speed external crystal (LSE) which drives the RTCclock (RTCCLK) the error involved the LSE is less compared to the LSI( External to MCU) By default the HSI is ON in the microcontroller whereas all the other clocks HSE, PLL etc are OFF. Each clock source can be switched ON or OFF independently when not in use to prevent unnecessary power consumption. HSI HSI is the default SYSCLK after startup from RESET state, wakeup from STOP OR STAND BY mode or failure of HSE. It is a low cost clock source having a start-up time less than HSE. The maximum frequency that can be generated is 8MHz using HSI. It suffers from the demerit that it is less accurate than external crystal oscillator or ceramic resonator Also as the temperature increases above 25 degree celsius the accuracy decreases HSE In case of high speed application HSE can be used as a clock source for SYSCLK . The HSE or the high speed external clock is an external clock that sometimes comes attached to the microcontroller itself or at times requires the usage of an external circuitry. HSE is faster and more accurate than HSI but suffers from demerits such as slower startup time, high power consumption and times usage of an external circuitry The maximum frequency that can be generated using HSE clock is 16MHz HSE has 3 states ON , OFF and BYPASS BYPASS is basically connecting wire to OSC_IN and putting the OSC_OUT in high impedance state i.e bypassing the crystal oscillator as can be seen in FIG-2 external source FIG-2 BYPASS mode in HSE PLL The PLL or phase locked loop is a clock system that is capable of providing the clock frequency much higher than that of HSI or HSE i.e in case of stm32f1 series it can go up to 72Mhz Hence for high speed applications PLL is a go to choice . Also peripherals such as USB, Ethernet PHY can not work using HSI or HSE. PLL provides the flexibility of choosing clock frequency without the help of an external oscillator. SYSTICK clock The SYSTICK is required to generate interrupts on a regular basis . It helps the OS in multitasking applications .In applications without an OS is used for timekeeping, time measurement or as an interrupt source. It is derived from the system clock in stm32 and has an usual value of 16MHz. Which means is to generate a delay of 1sec 16000000 has to be loaded on SysTick load value register Clock peripheral HDK in STM32F103 external oscillator pins MCO pins Clock peripheral SDK in STm32F103 Clock peipheral Files in STM32HAL: CLock peripheral low level files and HAL level files Fucntions descritption and structure decsritption Clock Peripheral HAL Functions HAL_RCC_OscConfig: return type HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) Parameter arguments explanation and return type explanantion Argument 1 Argument 2 argument 3 return type //Demo of how to use functions Clock Peripheral HAL Data Types Data type name( structure name): //Code of that structure Tab #1 Tab #2 Tab #1 Lorem ipsum dolor sit amet, consectetur
IDE To be used: Simplicity Studio – Silicon Labs (silabs.com) SDK to be used: Gecko Platform Silicon Labs (silabs.com) SDK documentation: EFR32BG22 Gecko MCU and Peripheral Software Documentation – v5.9 – MCU EFR32BG22 API Documentation Silicon Labs (silabs.com) HDK to be used:SLTB010A EFR32BG22 Thunderboard Kit – Silicon Labs (silabs.com) HDK manual: UG415: Thunderboard EFR32BG22 User’s Guide (silabs.com) Microcontroller datasheet: EFR32BG22C112 Wireless Gecko SoC Data Sheet (silabs.com) Microcontroller Reference manual: EFR32xG22 Wireless Gecko Reference Manual (silabs.com)
Automotive Development board to enable hassle free learning and development across multiple automotive technologies
Overview So hello guys, welcome to series of Microcontroller tutorials. As Microcontrollers are big thing happening across the globe, but to learn about microcontrollers becomes quite challenging as most of the content on web is theoretical based and quite unorganized. Or the content is only roaming around 2-3 microcontrollers (Arduino, ESP or PIC), even though there are number of Microcontrollers of different vendors. Also, framework of Arduino and Arduino IDE hides most of the things that are going inside the microcontrollers. Would recommend viewers to read these 3 blogs in order, so as to get understanding on how to get started with any Microcontroller and in what order. How to start with Microcontrollers? – gettobyte Hardware Development Kit In Mcrocontrollers – gettobyte Software Development Kit In Microcontrollers – gettobyte Here at Gettobyte, you will get content on microcontroller tutorials for different vendors in chronological way and covering the topics, in a much more interesting and story kind of way to make people understood easily. NXP Semiconductors – gettobyte Nordic SoC – gettobyte STM32 MCU’s – gettobyte Texas Instruments – gettobyte Silicon Labs – gettobyte AVR MCU – gettobyte ESP SoC – gettobyte Which will help you to learn important skills to build you Carrer on Semiconductor Industry and also help you in product development/DIY projects for different Industries, so as to make embedded devices with Industry standard Microcontroller. In return what Gettobyte platform seeks is that if you find these blogs insightful, then share it with people so make the reach more. And provide with constructive feedback and reviews in blogs comment section . If you guys want to start with microcontroller coding and looking for chronological order, then you have come to right place. In the last 2 blog: we get to know a lot about microcontrollers and how to start with them. And Hardware Development KIT in microcontrollers. One of the essential and important things to know before starting with microcontrollers is Software Development Kit. So, let’s start with it. In this blog we are going to start with another essential and important things to know before starting with microcontrollers that is Software Development Kit (SDK). Objective of this blog Objective of this blog, will be to understand: What is Software Development Kit in Embedded (SDK). Different components in Software Development Kit in Embedded. Why there is need of Software Development Kit in Embedded. What is Software Development Kit? Software Development Kit in embedded is collection of Software tools and applications, Software libraries, documentations to program the microcontrollers via host computer. Software Development Kit(SDK) majorly include: Software Stack for Microcontrollers Code Configuration Tools Software Debugging Tools Software drivers for debuggers and programmers. Integrated Development Environment (IDE) Software Stack for Microcontrollers Microcontrollers are not only hardware devices, but there is also very good amount of software used in microcontroller to run them, which are termed as software stack for microcontrollers. Software stack for microcontrollers can be divided into following components: Peripherals Drivers/Real Time Drivers: for using the peripherals of microcontrollers. This software controls the registers of microcontrollers to configure, enable, disable and use the different peripherals of microcontroller. Every MCU vendor design and develop these Drivers for their corresponding microcontroller. so that application developers can directly start with application development instead of creating these drivers on own. These drivers are kind of bare metal programming, as it is register level programming. which are written using C/CPP language using the concepts like Functions, loops, variables, static, user defined data types (typedef, Enums, structures), arrays and etc. For e.g. NXP semiconductors has S32K Standard software stack for its S32K1 Microcontrollers. Texas Instruments has Miscellaneous Stack: Peripheral Drivers is stack to drive the microcontroller peripherals, but with these peripheral drivers their is use of other embedded software technologies to build complex and real time applications like RTOSes(FreeRTOS, ChibiOS, Mbed and etc), IoT protocols Stacks( WiFi, BLE, Lora, LwIP, MbedTLS,and etc), Bootrom(openBLT), Sensor & Module drivers, crytography stack for providing security and safety in embedded applications, mathematics or signal processing algorithms stack for doing complex calculations. These all are also written using C/CPP language and it requires knowledge of programming along with hardware knowledge too. Peripheral Abstraction Layer/Hardware Abstraction Layer: This software stack is for code portablity and modularity in microcontrollers. Their are so many microcontrollers out their and for every MCU their is different peripheral driver. So if we change the microcontroller in our application, we need to rewrite the code of our application. This can be very cumbersome, there is need of some form of abstraction layer, through which our application end APIs remain same and just low-level driver files has to be changed if hardware is changed. This is done through the concept of C/CPP programming with use of programming concepts like, Classes, Structures, function pointers, templates, MACRO definition, linked lists and etc. In the large code bases like Autosaur and Ardupilot, Code portability is very essential, and use of Abstraction layers are heavy implemented through advance programming concepts like that of OOPS. For the starting we would just be needing peripheral drivers and abstraction layer stack of microcontrollers. These are provided by corresponding microcontroller vendors. // Examples of different peripheral drivers of MCU’s Code Configuration Tools As told in above sections there are many software stacks used in microcontrollers, so to design and develop the code using these software stack from scratch would be very cumbersome. As we need to include files for every stack and necessary configuration has to be done for building and compiling the code. So Code Configuration Tools are the software tools, which provide GUI based interface and environment to configure the software stack. We just need to select the hardware(microcontroller), what features we need and what all software components and peripheral to be enabled and then click on a button to generate the code. These tools then generate all the base software automatically from startup code to make files for the configured project. The features of CCT includes Graphical User Interface (GUI), tools for configuring peripherals, code generation and project building. In
So hello guys, welcome to series of Microcontroller tutorials. As Microcontrollers are big thing happening across the globe, but to learn about microcontrollers becomes quite challenging as most of the content on web is theoretical based and quite unorganized. Or the content is only roaming around 2-3 microcontrollers (Arduino, ESP or PIC), even though there are number of Microcontrollers of different vendors. Also, framework of Arduino and Arduino IDE hides most of the things that are going inside the microcontrollers. If you guys want to start with microcontroller coding and looking for chronological order then you have come to right place. How to start with Microcontrollers? – gettobyte Hardware Development Kit In Mcrocontrollers – gettobyte Software Development Kit In Microcontrollers – gettobyte Would recommend viewers to read these 3 blogs in order, so as to get understanding on how to get started with any Microcontroller and in what order. In the last blog we get to know a lot about microcontrollers and how to start with them. One of the essential and important things to know before starting with microcontrollers is Hardware Development Kit. So let’s start with it. Objective of this blog Objective of this blog, will be to understand: What is Hardware Development Kit in Embedded (SDK). Different components in Hardware Development Kit in Embedded. Why there is need of Hardware Development Kit in Embedded. What is Hardware Development Kit Hardware Development Kit in embedded is collection of hardware tools to assist developers to design and prototype the products/projects easily on microcontroller and semiconductor chips. These hardware tools majorly include: Microcontroller/SoC Development Boards/Evalution Boards Debuggers/Programmers Breakout Boards Hardware Debugging Tools. Microcontroller/SoC In the last blog, all we talk about is microcontrollers, so refer to this blog to know what microcontrollers are. Microcontroller and SoC word would be used quite inerchangibly throughout this blog and in subsequent blogs too. Difference between SoC and MCU is that. (SoC): SoC is a less well-defined term. A SoC is typically an encapsulation of one or more of CPUs, memory, micro-controllers, DSPs, accelerators, and supporting hardware; however, it does not adhere to any standards regarding its containing circuitry. An SoC is intended for applications with requirements that are too complex for a single MCU to handle. To explore about different microcontrollers best place is semiconductor company websites like and many others: NXP® Semiconductors Official Site | NXP Semiconductors Analog | Embedded processing | Semiconductor company | TI.com Silicon Labs (silabs.com) Nordic Semiconductor | Empowering Wireless Innovation – nordicsemi.com STMicroelectronics: Our technology starts with you and etc Go to products page of these websites and then navigate to microcontroller-microprocessor section. You will find there are so many microcontrollers which have been categorized in terms of Either processor they have (ARM Cortex CPU based, 8 bit CPU based, or some proprietary CPU core) Or Microcontroller family name’s (Like LPC series, S32 Series, MSP430 series, Kinetic series, STM32 series) Application based( Digital signal processing, IoT protocol’s, peripheral and etc) and etc. Microcontrollers/SoC can’t be used directly, for making projects or learning out the things. Microcontrollers comes in different packaging like BGA, DIP, QFN, QFP, SOP, SQP. Every package takes up different amount of space. In these packages MCU pins are very small to use and in some packages of MCU, we cant even properly touch individual pins of the MCU (BGA and QFN). Now to connect some sensors/modules to the MCU, we need to connect them to the pins of the MCU. So, there is need of some hardware circuit by which we can expose all these pins of MCU in a way that they can be used for prototyping and developing the embedded application by connecting different sensor/modules. And thus, here comes the story of development boards. Development /Evalution Boards Development boards in the field of embedded systems refer to pre-built circuit boards designed to use the microcontrollers/SoC’s. These boards typically include a microcontroller/SoC or microprocessor, along with essential components required to use the microcontroller like: Input/Output interfaces (Header pins, LEDs, Push buttons and etc.), Power regulators (For powering the MCU/SoC), and Miscellaneous circuit required for microcontroller functioning (oscillator circuit, pull-up/down resistors, decoupling capacitors and etc.) Debugging and programming feature. They provide a convenient platform for developers to test their code, interface with external devices, and evaluate the performance of their embedded system designs. These development boards are extensively used among the college students, hobbyists for making DIY projects or learn the microcontroller coding by having hands-on over the microcontrollers using these kind of development boards. These development boards are connected to Host Desktop/Laptop through USB cable via Debugger/Programmer to program/debug the microcontrollers. Thus, these development board provide easy way to use microcontrollers/microprocessor/SoC. Now for every microcontroller there is a development board for using it. Development boards are designed either by the semiconductor companies itself for their corresponding MCU’s or by the Third-party vendors, like: Arduino is a development board which has Atmega 328 MCU. Atmega 328 MCU is designed by Microchip Semiconductor company, but Arduino is designed and developed by Third party organization Arduino. BluePill is a development board which has STM32F103 MCU. STM32F103 MCU is designed by STMicroelectronics, but Bluepill is designed and developed by third party vendors. ElecronicsV1 is development board which has S32K144 Automotive MCU. S32K144 is designed by NXP Semiconductors, but ElecronicsV1 is designed and developed by Gettobyte community. S32K312 MCU which is Automotive General Purpose MCU designed by NXP Semiconductors, there is development board designed by NXP Semiconductors itself S32K312EVB-Q172. Another example is NRF52840 SoC for General Purpose IoT applications designed by Nordic Semiconductor, there is development board designed by Nordic Semiconductors itself nRF52840 DK. Another example is of STM32WB55 SoC for Low-Power IoT applications designed by STMicroelectronics, there is development board designed by STMicroelectronics itself that is P-NUCLEO-WB55. Another example is of MSP430 MCU for General pupose embedded applications designed by Texas Instruments, there is development board designed by Texas Instruments itself that is MSP-EXP430G2ET Their is one more SoC of NXP Semiconductors JN5189 IoT SoC. NXP semiconductors design and develop the development board