Posts

Showing posts with the label Basics

HOW TO USE KEIL

Image
KEIL IDE  is basically an assembler and a compiler or whatever you name it. You can write either an Assembly or C language code and KEIL will take care of the rest for you. Furthermore, it supports many of the 8051 variants that you will face. You can download KEIL using the link below. DOWNLOAD KEIL uVISION FOR 8051 After successful download and install, you may have problem getting familiar with it. Here I am giving you a tutorial on how to use it for writing your program, compiling it, and finally generating the HEX file. For familiarizing KEIL, we choose a basic program on LED blinking using 89C51 STEP 1: Create a new file for the project . Project>New ยต Vision Project Create a new folder in preferred location and a file with in the folder and save it. STEP 2:  Select the proper device from the new dialogue box that appeared after step 1. Atmel>AT89C51>OK STEP 3: When prompted select YES. ...

C-Programming introduction

Image
         Every C-Program begins with a function called "main()",A function is simply a collection of commands that do "something".     From main, we can call other functions, whether they be written by us or by others or use built-in language features. To access the standard functions that comes with your compiler, you need to include a header with the #include directive. Let's look a simple C-program: PROGRAMME #include <stdio.h> int main() { printf( "I am alive! Beware.\n" ); getchar(); return 0; } OUTPUT I am alive! Beware.          The #include is a "preprocessor" directive that tells the compiler to put code from the header called stdio.h into our program before actually creating the executable file. By including header files, you can get access to many different functions like printf() and getchar() functions, these are included in stdio.h.          The "int main() " te...