Main Menu
Home
AVR News
Atmel AVR
AVR Development Tools
Valuable Tools
WinAVR toolset
Makefile for WinAVR
AVR Virtual Simulators
Hardware for prototyping
GCC and AVR-GCC
Short introduction to C
AVR-GCC Tutorial
Example AVR Projects
AVR-GCC articles
WinAVR Site Map
Scienceprog FORUM
ScienceProg BLOG
Disclaimer
WinARM Tutorial
Login Form





Lost Password?
No account yet? Register
Latest comments
Measuring motor speed and...
Dear Administrator The code above...
More...

Programming AVR ADC module...
hi please send me example usart with...
More...

Measuring motor speed and...
main.c: In function...
More...

Running TX433 and RX433 RF...
(Hopefully this is not a re-post). I am...
More...

Running TX433 and RX433 RF...
I just bnought a pair of the RX/TX 433...
More...

Syndicate
Friendly sites

Latest News
Constants in C language
Written by Administrator   
Thursday, 10 August 2006

Constant value is understandable as non changeable value like PI=3.141592... value in math. Usually you use constants in your programs, but don't realize that they are constants. For instance:

x=x+3; The number 3 is a constant which will be compiled directly in addition operation. Constants can be character or string. Like in function printf(“Hello World\n”); “Hello World” is a string constant which is placed in program memory and will never changes.

It is usually recommended to declare constants by using identifier with reserved word const:

const int No=44;


Be first to comment this article Read more...
Variables in embedded C language
Written by Administrator   
Thursday, 10 August 2006
Last Updated ( Thursday, 10 August 2006 )

What are variables in C language. Variables are simple keywords which are defined by the values. Values can be changed. Variables are like a boxes with some size where values like apples can be put in. So variables can be various forms and sizes so called variable types.

Variable type is defined by a reserved word which indicates the type and size of variable identifier:

unsigned char my_char;

long int all_my_numbers;

int number;

Why do we need variables? The basic answer is that memory is limited and compiler needs to know much space to reserve for each variable. So the programmer needs to specify the variable type and its size by using one of reserved words from the table:


Be first to comment this article Read more...
The very basics of C
Written by Administrator   
Thursday, 10 August 2006
Last Updated ( Thursday, 10 August 2006 )

C language is function based programming language. C program itself is a function. Usually parameters to C function are passed as arguments. Function consists of a name followed by the parentheses enclosing arguments or an empty pair of parentheses if there are not arguments required. If there are several arguments, they are separated by commas.

The mandatory part in C program is main function. This function must be included in every program because this is a first function which is run after execution of program.

Lets take an example:


Be first to comment this article Read more...
Why C instead ASM
Written by Administrator   
Wednesday, 09 August 2006

Why C instead ASM

ASM is a specific language as it is a low level programming language. It is mnemonics to a mashine codes. It takes tons of time to develop embedded programs in ASM language. Now even 8 bit microcontrollers are more capable as they were earlier. The program memories are going up to megabyte(s). Programs becoming more complex, functionality grows up. This is one reason to use higher level programming languages like C.

If using C language you do not have to go into details how processor works. You don't have to think about hardware logic. It is better to leave this work to C compiler which may help you to avoid bugs in silicon level.


Be first to comment this article Read more...
<< Start < Prev 11 12 13 14 Next > End >>

Results 56 - 60 of 69

© 2008 WinAVR AVR-GCC Tutorial
Joomla! is Free Software released under the GNU/GPL License.