Skip to main content

Posts

Function Pointer In C

Function Pointers in C Function Pointer that refers to the address of other function.   We will passed variable, constants, structure variables to a function as argument. But have you ever tried or thought to pass a function as an argument to another function . If not, then let us do it together. At first sight it may appear a bit confusing to you but trust me it is as simple as writing “int main()”. It is used to pass the function address to the another function or create the array of function or create function inside the structure  or create call back function used in layered software like AUTOSAR. Function_pointer_in_C                             Syntax : return_type(*pointer_name)(function_argument) example : void (*foo) (void); now foo can point to any function it should have return type of void and argument type is void. int add(int a , int b) { return a+b; } now i want to create varia
Recent posts

Embedded C interview Question in Bosch

Embedded C interview Question in Bosch Hi i am posting  Embedded C interview Question asked Bosch . Embedded C is widely used in Automotive domain.Bosch is the biggest manufacture of automotive component and software. Impotent topics in Embedded C : Conversions between Different Basis; Data Representations in Computers; Elements of Boolean Logic; Straight-Line Equation and Linear Interpolation; Basic Operations with Vectors and Matrixes; Number Representations in Computer Memory: Little Endian vs. Big Endian; Optional:  Error Detection Codes. Introduction to the C Language What is a Programming Language? What is a Compiler? The C Language and its Advantages. C Syntax and Constructs. The Structure of a C Program. Steps to Compile a Program Compilation Phases; Multi-File Compilation; Header Files; The Linking Process; Building an Executable Version of a C Program; Debugging a C Program; Examining and Running a C Application Program. Data Types and Variables Data Types; Type Casti

infinite loop in C

Infinite loop or endless loop in C An infinite loop program is a thread that never ends stable in a "natural". Ending thread is exceptionally user or a break in software or hardware. Sample loops. The classic example for infinity. infinite loop  using for loop: #include "stdio.h"   int main () {    for( ; ; ) {       printf("This loop will run forever.\n");    }    return 0; } infinite loop  using do while loop:     #include "stdio.h" int main () {    do    {       printf("This loop will run forever.\n");    }    while(1);    return 0; } infinite loop  using while loop: #include "stdio.h"   int main () {    while (1)    {       printf("This loop will run forever.\n");    }     return 0; }

State Machine in C

 State Machine in C tutorial State Machine will help to do and complete some task where real-time event changes its state (like complete, pending, initial ). example take: you have write some sensor information data to NVM when  someone press switch, but writing in NVM it will take some 10ms time if u press two times in 10ms then NVM write will not complete. 1st NVM write will not complet it will write only second one. if you use State machan you can over come this problem, Using State Machine (SM) is widely spread over programming. A state MS is an automated scheduled to execute certain functions in correlation with certain events and external signals. Design decisions of State Machine: - Representing events - representing states - representing transitions - Distribution of events by StateMachine Methods and Models of creating an State Machine: - Switches nested - Table of states - OO State Design Pattern - mixed approach Cereintele a State Machine: - Maintenan

What is OBD?

What is OBD? Techblog at OBD2 and uds protocol - 5 weeks ago What is OBD? *OBD* is *On-board diagnostic* means self-diagnosing and self-reporting problems in the car or vehicle. When you’re purchasing a vehicle or car , two terms that will come one is OBD1 and *OBD2*.Nowadays day *OBD1* is not coming its in only old vehicle. For example, if your vehicle have a high-end OBD system(OBD2), and it has a problem, the OBD system will do self-diagnose, or ‘tell’ the car driver or repair technician that what problem is in the car. The *difference between OBD1 and OBD2*. With OBD1, the goal was to develop a diagnostics system which focuses on the ... more »

On-board diagnostics 2 or OBD2

On-board diagnostics 2 or OBD2 Techblog at OBD2 and uds protocol - 4 weeks ago *On-board diagnostics 2 *or OBD2 In my previous post i have explained *what is ODB? OBD* is nothing but it helps the owner and technician to find out the what is problem in vehicle.*OBD2* is the advance version of OBD1, OBD-II is the protocol used by all cars built after 1996 In *OBD2 *lot of improvement is done compared to OBD1 ,improvement is like standardization,signaling,diagnostics protocols ect. *OBD 2 connector are standardized*: In OBD 1 Each manufacturer used their own diagnostic link connector (DLC), DLC location, DTC definitions, and procedure to read the DTCs ... more »

What is UDS protocol

What is UDS protocol Techblog at OBD2 and uds protocol - 4 weeks ago What is UDS protocol *UDS* *protocol *is the one of the diagnostic protocol.It is widely used in automotive industry.It is codified in ISO 14229-1 standard.*UDS* *protocol* helps technician,manufactures,service center,programmers diagnose the problem in ECU. What is the use of UDS protocol - UDS protocol is used to repair the vehicle and get the DTC code. - Analysis of vehicle while running and after manufacturing - Research on vehicle systems like ABS,airbag etc - Reprogramming the ECU - Change the configuration of the ECU. - Change the NVM configured values. U... more »