LPU,NH-1 GT road, Jalandhar rohit.hero12@gmail.com +91-8437503569 https://www.facebook.com/rohit.adhikary3

P-Programming T-Technology A-And TI-Tips C-Cracking

Sunday, 26 April 2015

Features/Overview

Hello Reader,
Today i am going to tell you about the features which are used in the C programming.These features are also used in the other programming languages like C++, C#, Java etc.If you want to be a good programmer you should have the knowledge about the features and how to used this features in coding the program and where to used it. So,features of C programming are If condition, for loop, if else statement, switch case.These are the basic features which we should know while learning about C programming.IF condition is used to check the condition. If the condition is true then "display" and if condition is false the "do not display".example:-if(a>b) then print 'a' else print 'b'. For loop has three phase first is for initializing the variable,second is to check the condition and third is to increments or decrements the value.example:- for(int i=0;i<n;i++). If else statement is used to check the condition and if the condition is not true go to another condition and then print it. example:- if(a>b) then print 'a' else if(b>c) then print 'b' else print 'c'. Switch case is to to print the multiple value.Different cases are used in it and  after completing each case you need to used break statement and at last you have to write default. example:- switch(A) { Case 1: body break statement then Case 2: body break statement default }. These are the basic features of C programming. These are the main features which is used when you write any program.

Health tips 1

Hello Reader,
Today i am going to tell you that how to get relief form the EYE's PAIN?There are some home remedy exercise that will helps your eye to have clear vision and also to get relief  from pain.So the best way to keep eyesight clear, wash your eye with cold water four to five times a day like after watching television,playing games,working on computer.When your eye is paining,you stop doing your work and close your eye for few minutes and rub your palm and put your palm on your eye and you will get relief from pain and also do some eye exercise that will keep your eyesight clear.

Thursday, 23 April 2015

Displaying text

Hello Reader,
Here is the another program that is related to the LCD this is the basic program.
i)making string point variable.
ii)passing the starting address of string to that pointer variable.
iii)passing string pointer value to LCD_write function.
void LCD_write_string(unsingned char *str) //store address value of string
in pointer*str
{
  int i=0;
while(str[i]!='\0')    //loop will go on till the NULL charater in the string
{
LCD_write(str[i]);   //sending data on LCD byte
i++;
}
return;
}

Wednesday, 22 April 2015

success

Hello Reader,
By seeing the above picture you all must have clear what i am going to tell you."Believe in yourself" and "have self-confidence" will lead you to your success". Its mean that believe in yourself and have confidence that what ever you are doing and what ever you will do it will good for you and for your future and also for your parents.

Health

Dear Reader,
Today i am going to give you the health tips.I am going to tell you the new thing which will keep your body fit and strong.You have Peanut size of your palm and Jaggery 20gm and have it both in a day.It is good for  yours bone and your bones will gets more strong and is also good for students and also for diabetes patients.Have this early in the morning.
       Jaggery


.     Peanut

Tuesday, 21 April 2015

new specie discover

Hello Reader,
Today,i am here to tell you about the new specie which being discovered our research institute in Costa Rica , where the newly specie  was discovered which is familiar look liked glass frog.This species discovered on 22nd April,2015.This specie has more power then the glass frog and it is green in color and size in of 1.4 cm long.Amazing species and ready to have the live look for it.

motivate 1

Today's tips of the day is "Do not study for the job, study for the knowledge because if you gain knowledge you can do anything in life" which mean that if you want to study, then study for knowledge not for getting job because if you have the knowledge you will be more then something in life. So study to gain knowledge.

Monday, 20 April 2015

Motivate

Today's tips of the day is that "Don't listen to anyone, just focus on your goal and achieve it". Mean that for your future career don't choose other choice,choose your own goal and after finding your proper goal,go for it and achieve your goal.May be your goal is too hard to achieve but nothing is "IMPOSSIBLE" even "IMPOSSIBLE" says that "I M POSSIBLE".So, just focus on your particular goal and don't let anyone to choose your goal.Just takes advice from them but decision should be your.

Xiaomi MI 4i

Xiaomi MI 4i, the all new smartphone is going to be launched on 23 April ,2014.Its has all feature that of  Xiaomi MI 4 but few features that has being include in this latest model is that it has the high resolution quality,good camera and Longer battery life and the estimate price to buy this Xiaomi MI 4i is Rs-17,999

About us

Dear Reader,

"P-T-A-TI-C" is the blog in which you can have knowledge about the Basics Programming,Technology parts that is of the latest Technology which are in the market,Tips for keeping you active and advance in your life and Cracking is to help you to install software for the life time.If any query or want me to change or put something new please let me know,i will try to put it in this blog.so enjoy reading this blog and gain knowledge and spread them.If any query or if you want to give any suggestion then send mail me at:- rohit.hero12@gmail.com or  leave your comments here.
                                                  "Feel free to share your Idea"

Fahrenheit and Celsius table

Hello reader,
This program is of making the table of Fahrenheit and Celsius and when user will give any value in it it will be showing the result.

#include <stdio.h> //standard library function
#include<conio.h>
  int main()
 {
    int fahr, cel, lower, upper, step;  //define variable
    lower = 0,upper = 300;
    step = 20;     //table upto 20
    fahr = lower;
    while (fahr <= upper) //condition checking {   
     cel = 5 * (fahr - 32) / 9;    //formula for Celsius
     printf("%d\t%d\n",fahr, cel);   //display the result
     fahr += step;
    }
    return 1;  //return the value 

  }

Diamond Pattern

Hello Reader,
This is the program of diamond pattern in which,when user will going to run the program that time there will be the shape of the diamond.
#include<iostream> //standard input/output
#include<conio.h>
using namespace std;
static int z=1; //define static variable
void pattern(int n) //using argument
{
static int i=0;
if(n>=0)   //if condition check
{
    for(int j=n;j>0;j--)  //for loop
{printf("%s",'');}
for(int k=0;k<((2*i)+1);k++) //for loop
{printf("%c",R);} //display
  printf("\n");
z++;
n--;
i++;
pattern(n); //n no of pattern
}
}

Adding Two numbers

Hello Reader,
In this program, i used the simple method to print the two unknown value that user is going to insert it, and by this same method you can try to multiply or divide the two numbers.You can also try for more number.
#include<stdio.h> //standard library input/output
#include<conio.h>
int main() //main module
{
int a,b,ans; //define variables
{
ans=a+b; //sum of two numbers that user want to print as 'a' and 'b'
printf("%d",ans); //display the answer by adding two numbers
}
}

Compound interest

hello Reader,
This is the simple program in which we can calculate Compound Interest, where any user can give any value to it.
#include<stdio.h>  //standard library function
#include<conio.h>
int main()
{
int i,N;   // define variables
float P,R,sum=1,CI;  //define variables
printf("enter price\n");   //print what price user want to enter
scanf("%f",&P);
printf("enter rate\n");  //print what rate user want to enter
scanf("%f",&R);
printf("enter year\n");  //print for how many years user want to enter
scanf("%f",&N);
for(i=1;i<=N;i++)    //for loop from 1-N no
{
sum=sum*(1+(R/100));    // formula for calculating sum
}
CI=P*(sum-1);    //calculating Compound Interest
printf("compound interest=%f",CI);  //display the Compound Interest
getch();
return 0;
}

Introduction

Hello Reader,
In this page,i am going to tell you basic knowledge about the 'C' programming which will help you in future. I am going to tell you the basic concept about 'C'programming.I will be telling you about 'C' language that will help you to make the program and which will make your basic strong.
'C' is the programming language that covert from high level programming to low level programming language.At first there was the Linux operating system in which 'C' language programming is used.
This is small language.Its power is large collection of the Data types and operators.
This is small and easily written and its a standard library.week point of this language is that it is difficult to understand and also to modify the program.if we want to display anything in the screen then we have to write 'Printf' ' and 'Scanf'. It is the Functional Programming Language.
example:-
#include<stdio.h> //standard library
main()
{
printf("Hello: ");
}
where # is the directives and stdio is standard input/output.

Display 'A' in LCD

Hello Reader,
In this page,i am writting about the  program which is going to display in LCD any letter.
#include<util/delay.h> //delay time
#include<avr/io.h>   // atmega 16 input/output
#define RS 0
#define EN 1 //enable
void lcd_command(unsigned char x)
{PORTB=x;  //port B
PORTC=0;  //port C
PORTC|=(1<<EN);
_delay_ms(1);
PORTC&=~(1<<EN);
_delay_ms(100);
}
void lcd_data(unsigned char x)
{PORTB=x;
PORTC=(1<<RS);
PORTC|=(1<<EN);
_delay_ms(1);
PORTC&=~(1<<EN);
_delay_ms(100);
} void lcd_ini()
{
lcd_command(0x38); //command that going to display in LCD
lcd_command(0x01);
lcd_command(0x0E);
lcd_command(0xC4);
}

int main()
{
DDRB=0XFF; // port B
DDRC=0XFF;  //port C
lcd_ini();
lcd_data('A');    // display 'A' in LCD

}

Saturday, 7 February 2015

Interfacing the LED and LCD

Hello reader,
Previous page,i told you how to install Two software where you can run this program and also how to check your own program from it.
Configuring IO Ports:Everyport(PORTx, x = A or B or C or D) of AVR microcontroller 3 registers associated with it:1)DDRx :- its to set direction of the pin of PORTx and known as Data Direction Register2)PORTx 3)PINx
 Program to blink LED using ATmega 16
#include<avr/io.h> //command on which Atmega 16 pin worked on
#include<util/delay.h> //this is for time delay
int main(void)
{
 DDRA=0xff; //for directing port A
 While(1)
 {
  PORTA=~PORTA;
  _delay_ms(1000);
 }
}

How to install Atmega 16 software

Hello Reader,
In this page,i am going to tell you about how to install the software.So,First of all go to www.google.com then write" Atmel studio 6 " and download the file and the file size is 156 megabyte and it is free of cost, and then install it as per the guide given there.This software is to write the Embbeded c program,which is different form other programming language.Then after install the "Atmel Studio 6" then go to "new project" then click on "GCC C Executable" and write the name of the program and the click "ok" button. After that write the program in that and compile it and execute the program, and if the program doesn't execute the check it and again execute it.Then when your program get Run then go to " Proteus version 7.8  software", again install that software and then
 when this software get opened then click 'p' den write the name of the device like atmega 16 then set the pin according to the programming that you have done in it, and don't forget about to place the proper pin and set the four different types of port used in it.After connecting the pin,run debugged and then see you result on it and enjoy it.

Overview of C

Hello Reader,
In this page,i am going to tell you basic concept of 'C' programming because this language is going to be used in this AVR. This 'C' language will be used in many other programming because 'C' is the first programming language that came in the market and after that other programming Language came like C++ , JAVA ,C#. So,here lets start what is 'C' language? answer to this question ,'C' is the programming language that will help to developed the software. It is the basic language and its also important for all the programmer to know basic about 'C' language.'C' is the program that covert from high level language to the low level language which can easily understand by the user.Its covert the machine language to simple alphabetic form.When there was the Operating System call Linux/ Unix came that time this language is been used.This is small language.Its power is large collection of the Data types and operators.This is small and easily written and its a standard library.Week point of this language is is difficult to modify and also to understand it.If we want to display anything in the screen then we have to write ' Printf ' and ' Scanf ' .It is the Functional Programming Language.
eg:-
#include<stdio.h>
main()
{
printf("Hello: ");
}
where # is the directives and stdio is standard input/output.
Keywords that used in this Language are:
int,char,float,double,while,do while,if,if else,for,sizeof,switch,default,break,Enum,volatile etc.
Different Types of operators:
1) Logical Operator
2)Arithmetic Operator
3)Relational Operator
4)Bitwise Operator
1)Logical Operators are the operators which is being logically known.
    eg: || , &&
2)Arithmetic Operators are the operators which is used to add, minus, multiply both numbers.
    eg: +, * ,  / ,% , ++, --
3)Relational Operators are the operators which is having relation between both numbers or variable.
    eg: < , >, !=,<=, >=
4)Bitwise Operators are the operators which is applied to char,int short etc.
    eg:<<, >>


Popular Posts

Recent Posts

Unordered List

Text Widget

Powered By Blogger
Powered by Blogger.

Contributors