Professional Documents
Culture Documents
with C
By,
Sandip Nair
sandipnair06@yahoomail.com
sandipnair.hpage.com
Embedded microcontroller
Byte:
•Is a variable type to store 8 bit data
• A bit variable declared can be a part of the byte
variable declared
Signed Character:
• 8 bit
• Ranges from -127 to +127
• -ve numbers are stored in 2’s complement
C variables
Integer:
• It is 16 bit variable type to store integer values
• It is default unsigned
Float:
• It is a 32 bit variable type
• Double is a 64 bit variable type
• The calculation with these variable types requires
library function
C variables
Constants:
• Doesn’t vary during the program cycle
• It is stored in program memory
#define
• used at the top of the program to create short cut to save
typing
• Eg, #define uchar unsigned char
#define buffersize 100
Tips for variable
• AT89S52 datasheet
• C & the 8051 by Thomas Schultz