Anda di halaman 1dari 2

(/)

Search...

C-programming language

short summary of C-programming language (/index.php/avr-learn/c-programming/48-c-programming-language?showall=)


C-programming
language for AVR
microcontrollers I/O port Management (/index.php/avr-learn/c-programming/48-c-programming-language?showall=&start=1)

Variable Header Files (/index.php/avr-learn/c-programming/48-c-programming-language?showall=&start=2)


Types
All Pages (/index.php/avr-learn/c-programming/48-c-programming-language?showall=1)

type bits range


bit 1 0,1
char 1 128 to 127
unsigned char 1 0 to 255
short 2 32768 to 32767
unsignedshort 2 0 to 65535.

int 2 32768 to 32767
unsignedint 2 0 to 65535
long 4 2147483648 to 2147483647
longunsigned 4 0 to 4294967295

float 4 3.4e38to +3.4e38
double. 8 1.7e308 to +1.7e308 Operators
= Assignement operator
+ Addition
Subtraction
/ Division
* Multiplication
% Remainder
count++ postincrement
++count preincrement
count-- postdecrement
count predecrement
LogicalOperators

! BooleanNOT(unaryoperator)
&& BooleanAND(binaryoperator)
|| BooleanOR(binaryoperator)
BitwiseOperators

~ Negation(unaryoperator)
& BitwiseAND
| BitwiseOR

^ BitwiseexclusiveXOR
>> Rightshiftofbits(equivalenttodivisionby2)
<< Leftshiftofbits(equivalenttomultiplicationby2)

RelationalOperators

== Equal
!= Notequal
> Greaterthan
< Lessthan I/O Port management
>= Greaterthanorequalto
DDRx Data direction register
<= Lessthanorequalto PORTx Data output register
PINx Data input register
Header Files
The file reads the microcontroller name from the MAKE file and includes automatically the specific corresponding header
io.h
file. The file defines the I/O port adresses, bit names, vector adresses etc
interupt.h This file includes the interups vector names.
delay.h this file include two accurate delay functions: _delay_ms and _delay_us.
pgmspace.h This file is used to store and retrieve constants from the program memory

2017 avrprojects Back to Top

Anda mungkin juga menyukai