Posts

Showing posts from 2017

STRUCTURES

An a rray is collection of the elements of same type  , but many time we have to store the elements of the different data types.  A structure is a user defined data type in C.    A structure creates a data type that can be used to group items of possibly different types into a single type . Each element of a structure is called a member.It is widely used to store student information, employee information, product information, book information etc. Defining a  structure Structure is defined by using struct statement. struct [ structure tag ] { member definition ; member definition ; ... member definition ; } The  structure tag  is optional and each member definition is a normal variable definition, such as int i; or float f; or any other valid variable definition.

POINTERS

Image
A  pointer  is a variable whose value is the address of another variable, i.e., direct address of the memory location. Concept of pointer Consider the declaration, int i=3; This declaration tells the C compiler to: (a) Reserve space in memory to hold the integer value. (b) Associate the name i with this memory location. (c) Store the value 3 at this location . Here the memory mapping is depicted: We can access the value 3 by either using the variable name i or the address 65524. Since the memory addresses are simply numbers they can be assigned to some other variable. The variable that holds memory address are called pointer variables. A pointer variable is therefore nothing but a variable that contains an address, which is a location of another variable. Value of pointer variable   will be stored in another memory location. Here j is not an ordinary variable like any other integer variable. It is a variable that contains the add

ABOUT 89C51 MICROCONTROLLER

Image
Features: Ø       Compatible with MCS-51 Products Ø    4 Kbytes of In-System Reprogrammable Flash Memory. Endurance   1,000    Write/Erase Cycles Ø     Fully Static Operation: 0 Hz to 24 MHz Ø     Three-Level Program Memory Lock Ø     128 x 8-Bit Internal RAM Ø     32 Programmable I/O Lines Ø     Two 16-Bit Timer/Counters Ø     Six Interrupt Sources Ø     Programmable Serial Channel Ø     Low Power Idle and Power Down Modes  Description: The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with  4 Kbytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel

INTERFACING OF LCD WITH 89C51

Image
Liquid crystal display is very commonly used electronic display module and having a wide range of applications such as calculators, laptops, mobile phones etc. 16×2 character lcd display  is  very basic module which is commonly used in electronics devices and projects. It can display 2 li nes of 16 characters . Pinout and Pin Description of 16x2 LCD Module Pin No   Function   Name 1 Ground (0V) Ground 2 Supply voltage; 5V (4.7V – 5.3V)  Vcc 3 Contrast adjustment; through a variable resistor  V EE 4 Selects command register when low; and data register when high Register Select 5 Low to write to the register; High to read from the register Read/write 6 Sends data to data pins when a high to low pulse is given Enable 7 8-bit data pins DB0 8 DB1 9 DB2 10 DB3 11 DB4 12 DB5 13 DB6 14 DB7 15 Backlight V CC  (5V) Led+ 16 Backlight Ground (0V) Led- RS(Register select) A 16