8051 c programin
Upcoming SlideShare
Loading in...5
×
 

8051 c programin

on

  • 2,075 views

 

Statistics

Views

Total Views
2,075
Views on SlideShare
2,075
Embed Views
0

Actions

Likes
0
Downloads
34
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    8051 c programin 8051 c programin Presentation Transcript

    • By : Ramoliya Biren.
    • 8051 C Prog Why we are go for c. User define function in c. How it is use for complex programming. What is header file. How to create header file. How to use in main program. By : Ramoliya Biren.
    • 8051 C Prog It’s easy to program. It can be understand by untether user. Easy with user define function. No deal with registers. Short programing. By : Ramoliya Biren.
    • 8051 C Prog Simple way of programming.#include<reg51.h>#define variableVoid main(){- - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - -} By : Ramoliya Biren.
    • 8051 C Prog With the user define function.#include<reg51.h>#define variableFunction_type function_name (variable_typevariable_name){------------------------------------}Void main(){------------------------------------} By : Ramoliya Biren.
    • 8051 C Prog # What is this symbol.This symbol calls header file.Header file is program which include so manyfunction.This function it use full for deferent things like. port address timer interact register address. By : Ramoliya Biren.
    • 8051 C ProgCreate your c program. Save it with (header_file_name.h)Now just add three syntax.#ifndef _(header file name)_h#define _(header file name)_h------------------------------------------------------#endif By : Ramoliya Biren.
    • 8051 C Prog#ifndef _ledb_H#define _ledb_H#include <REGX51.H>void delay(unsigned int time){ unsigned int i,j; for(i=0;i<time;i++) for(j=0;j<1275;j++);}void main(){ while(1) { P1 = 0xff; delay(250); P1 = 0x00; delay(250); }} By : Ramoliya Biren.#endif
    • 8051 C Prog By : Ramoliya Biren.