Skip to main content

Posts

Interrupts vs. Polling

Interrupts vs. Polling Polling:  In the Polling method, the microcontroller must "access by himself" the device and “ask” for the information it needs for processing. In fact, we see that in the Polling method the external devices are not independent systems; they depend on the microcontroller, and only the micro is entitled to obtain access to the information it needs Interrupts: Interrupts are the signal to the microcontroller or processor to mark the event that requires immediate attention. An interrupt is “requesting" the processor to stop to perform the current program and to “make time” to execute a special code(interrupt code). Whenever any device needs its interrupt service, the device notifies the microcontroller by sending it an interrupt signal. Upon receiving an interrupt signal, the microcontroller program_counter will go to the Interrupt vector table in that it will fetch the ISR address (interrupt service routine) and it will execute the ISR...

Storage Classes in C programming

C has a concept of 'Storage classes' which are used to define the scope (visibility) and a lifetime of variables and functions.And storage class determines how long it stays in existence.In c-programming, 4 type of storage class is there. So what Storage Classes are available? 1.auto 2.static 3.extern 4.register 1.Auto - storage class Auto is the default storage class for local variables.         {             int Count;             auto int Month;         } The example above defines two variables with the same storage class. auto can only be used within (inside) functions, i.e. local variables.Local variables is stored in stack memory. 2.static - Storage Class Notes: For some reason, static has different meanings in different contexts. When specified on a function declaration, it make...

Volatile

Volatile Keyword is important keyword in c programing language.  volatile   keyword is one type of qualifier in c programming languages. But, when it comes to writing code especially in Embedded programming the use of “volatile” keyword is very often.Volatile Keyword in Embedded System. But now the question is, What is it (volatile)? What it does? Why do we need it? Does my program/code really need this keyword? All these and more I will cover in this article. What does volatile mean? Ok, let’s find out the meaning of volatile in dictionary. VOLATILE means: – UNSTABLE, UNPREDICTABLE…etc. So, the basic meaning of volatile is we can’t predict what is going to happen next. Now, What is the significance of volatile keyword? The significance of volatile keyword in programming language is to inform/tell the compiler not to pre-predict/assume/believe/presume the value of the particular variable which has been declared as...

Selecting the Motor and Driver

 Selecting the Motor and Driver Selecting the proper motor and driver to meet a specific application needs motor torque and speed. Generally we will calculate torque of the motor first based on torque value we have to calculate speed of motor. 4 steps for calculate torque : 1.Determine the motion profile and calculate acceleration ,deceleration ,maximum velocity required to make the desired move . 2.select the mechanical drive mechanism to be used and calculated inertia ,friction and load torque using formulas provided in this document. ex.1.Lead screw drive 2.Ball screw 3.Belt drive 4.direct drive 5.gear drive loads 3.Determine required motor torque for the specific application . 4.select proper motor and driver based on their speed -torque characteristics .

IOT Internet of things Introduction

Hi, guys, today I am going to give the basic introduction on IOT(Internet of things). IOT(Internet of things) is nothing but it is connected things or connected device. In IOT(Internet of things) environment objects, device,  people, buildings, plant all are embedded with a sensor, software, electronics and internet all are exchange the data between them compute them self without the human to human or human to computer interaction. The internet of things allows the objects  to be sensed and controlled by remotely across networked environment creating opportunities for direct integration between the physical world and computer-based systems, and resulting in improved monitor control efficiency accuracy economic and management benefit. Experts estimate that the IoT will consist of almost 50 billion objects by 2020.In future iot device are basic need for people .for example your phone, smart watch, smart band, smart tags etc now days IOT are used in smart city ,smart home...

C Interview Questions Automotive company interview

Automotive Interview Questions and CAN interview questions and important C programming interview Questions are asked in Automotive interviews.This are the very important questions for automotive interviews.  <<automotive-interview-questions 12. Program to find if a machine is big endian or little endian? 01 #include "stdio.h"  02 #define BIG_ENDIAN 0  03 #define LITTLE_ENDIAN 1  04 int   main()  05 { 06      int   value;  07      value = endian();  08      if   (value == 1)  09      printf("Machine is little endian\n",value);  10      else 11      printf("...