Yahoo India Web Search

Search results

  1. Oct 24, 2008 · 4: C programming must have required operating system. while embedded C may or may not be required operating system. 5: C can use resources from OS, memory, etc, i.e all resources from desktop computer can be used by C. while embedded C can use limited resources, like RAM, ROM, and I/Os on an embedded processor.

  2. A good reason and sometimes the only reason is that there is still no C++ compiler for the specific embedded system. This is the case for example for Microchip PIC micro-controllers. They are very easy to write for and they have a free C compiler (actually, a slight variant of C) but there is no C++ compiler in sight.

  3. 10. Assuming value is 0 or 1: REG = (REG & ~(1 << pin)) | (value << pin); I use REG instead of register because as @KerrekSB pointed out in OP comments, register is a C keyword. The idea here is we compute a value of REG with the specified bit cleared and then depending on value we set the bit.

  4. Oct 31, 2008 · Unions allow data members which are mutually exclusive to share the same memory. This is quite important when memory is more scarce, such as in embedded systems. In the following example: union { int a; int b; int c; } myUnion; This union will take up the space of a single int, rather than 3 separate int values.

  5. Feb 20, 2009 · 5. C# on embedded systems not using WinCE or Windows Embedded requires .NET Micro, so there is in fact no distinction between "hosted and embedded", since it requires to be hosted regardless. That is it is hosted, and can be embedded so "hosted or embedded" makes no sense. Currently .NET Micro has a memory footprint of 300Kb, and is supported ...

  6. Sep 2, 2009 · The most basic reset vector merely jumps directly to the start-up code. Startup code - this is the first software-specific code that runs. Its job is basically to set up the software environment so that C code can run on top. For example, C code assumes that there is a region of memory defined as stack and heap.

  7. Dec 20, 2017 · 29. I want to generate a sine signal in C without using the standard function sin () in order to trigger sine shaped changes in the brightness of a LED. My basic idea was to use a lookup table with 40 points and interpolation. Here's my first approach: x1 = (int) phase % 41; x2 = x1 + 1;

  8. Jan 31, 2009 · 251. extern tells the compiler that this data is defined somewhere and will be connected with the linker. With the help of the responses here and talking to a few friends here is the practical example of a use of extern. Example 1 - to show a pitfall: stdio.h: int errno; myCFile1.c: #include <stdio.h>.

  9. Dec 16, 2011 · It depends on the quality of the compiler and the libraries. In most cases memset is superior. The advantage of memset is that in many platforms it is actually a compiler intrinsic; that is, the compiler can "understand" the intention to set a large swath of memory to a certain value, and possibly generate better code.

  10. Jul 17, 2009 · 14. Wikipedia maintains a list of static code analysis tools for various languages (including C). Personally, I have used both PC-Lint and Splint. The best choice depends on the type of application you have written. However no matter which tool you use, there will be a low signal to noise ratio until you properly tune the tool and your code.