Bahasa C luas digunakan untuk pemrograman berbagai jenis perangkat, termasuk mikrokontroler.
Bahasa ini sudah merupakan high level language, dimana memudahkan programmer menuliskan programnya.
1. Struktur Penulisan Program
#include ( mega16.h ) //mendefinisikan atmega16 tanda kurung ganti dengan tanda lebih kecil dan besar
#include < delay.h > // defnisi tunda waktu
#define start PINB.1 // variable pengganti
#define stop PINB.2 // variable pengganti
//Variabel Global
Unsigned char ;
void main(void){ // Program Utama
DDRB=0x00; //Inisialisasi PORT INPUT
DDRD=0xFF; //Inisialisasi PORT OUTPUT
While(1)
{
...... //isi program
.... }; }
2. Type Data
char : 1 byte ( -128 s/d 127 )
unsigned char : 1 byte ( 0 s/d 255 )
int : 2 byte ( -32768 s/d 32767 )
unsigned int : 2 byte ( 0 s/d 65535 )
Long : 4 byte ( -2147483648 s/d 2147483647 )
unsigned long : 4 byte ( 0 s/d 4294967295 )
float : bilangan desimal
array : kumpulan data-data yang sama tipenya.
3. Deklarasi Variabel dan Konstanta
Variabel adalah memori penyimpanan data yang nilainya dapat diubah-ubah.
Penulisan : [tipe data] [nama] = [nilai] ;
Konstanta adalah memori penyimpanan data yang nilainya tidak dapat diubah.
Penulisan : const [nama] = [nilai] ;
Tambahan:
Global variabel/konstanta yang dapat diakses di seluruh bagian program.
Local variabel/konstanta yang hanya dapat diakses oleh fungsi tempat dideklarasikannya.
4. Statment
Statement adalah setiap operasi dalam pemrograman, harus diakhiri dengan ; atau }
Statement tidak akan dieksekusi bila diawali dengan tanda //
untuk satu baris.
Lebih dari 1 baris gunakan pasangan /* dan */
Statement yang tidak dieksekusi disebut juga comments atau komentar.
Bahasa ini sudah merupakan high level language, dimana memudahkan programmer menuliskan programnya.
1. Struktur Penulisan Program
#include ( mega16.h ) //mendefinisikan atmega16 tanda kurung ganti dengan tanda lebih kecil dan besar
#include < delay.h > // defnisi tunda waktu
#define start PINB.1 // variable pengganti
#define stop PINB.2 // variable pengganti
//Variabel Global
Unsigned char ;
void main(void){ // Program Utama
DDRB=0x00; //Inisialisasi PORT INPUT
DDRD=0xFF; //Inisialisasi PORT OUTPUT
While(1)
{
...... //isi program
.... }; }
2. Type Data
char : 1 byte ( -128 s/d 127 )
unsigned char : 1 byte ( 0 s/d 255 )
int : 2 byte ( -32768 s/d 32767 )
unsigned int : 2 byte ( 0 s/d 65535 )
Long : 4 byte ( -2147483648 s/d 2147483647 )
unsigned long : 4 byte ( 0 s/d 4294967295 )
float : bilangan desimal
array : kumpulan data-data yang sama tipenya.
3. Deklarasi Variabel dan Konstanta
Variabel adalah memori penyimpanan data yang nilainya dapat diubah-ubah.
Penulisan : [tipe data] [nama] = [nilai] ;
Konstanta adalah memori penyimpanan data yang nilainya tidak dapat diubah.
Penulisan : const [nama] = [nilai] ;
Tambahan:
Global variabel/konstanta yang dapat diakses di seluruh bagian program.
Local variabel/konstanta yang hanya dapat diakses oleh fungsi tempat dideklarasikannya.
4. Statment
Statement adalah setiap operasi dalam pemrograman, harus diakhiri dengan ; atau }
Statement tidak akan dieksekusi bila diawali dengan tanda //
untuk satu baris.
Lebih dari 1 baris gunakan pasangan /* dan */
Statement yang tidak dieksekusi disebut juga comments atau komentar.
5. Operator Logika
13 comments:
I appreciate your effort and you have done a great job.thanks for the ideas and please add more in future.s
Software Testing Training in Chennai
software testing course in chennai
JAVA Training in Chennai
Python Training in Chennai
Big data training in chennai
Selenium Training in Chennai
Software Testing Training in Chennai
Software testing training in OMR
Excellent post for the people who really need information for this technology.
German Classes in Chennai
best german classes in chennai
IELTS Coaching in Chennai
Japanese Classes in Chennai
spanish language in chennai
Spoken English Classes in Chennai
German classes in anna nagar
spoken english class anna nagar
The article is so informative. This is more helpful for our
software testing training institute in chennai with placement I software testing class
selenium training in chennai
software testing course in chennai with placement
magento training course in chennai
Thanks for sharing.
I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
Big Data Hadoop Training In Chennai | Big Data Hadoop Training In anna nagar | Big Data Hadoop Training In omr | Big Data Hadoop Training In porur | Big Data Hadoop Training In tambaram | Big Data Hadoop Training In velachery
Excellent blog thanks for sharing the valuable information..it becomes easy to read and easily understand the information.
Useful article which was very helpful. also interesting and contains good information.
to know about python training course , use the below link.
Python Training in chennai
Python Course in chennai
Great information. I will check out the rest of your blog.
Java Training in Chennai
Java Course in Chennai
You there, that is totally wonderful declare here. gratitude for taking the term to call such snappish data. outstanding substance material generally gets the site guests coming. Cracked Whatsapp
I needed to gratitude for this outstanding legitimate to apply!! I truly adored all little piece of it. I have you bookmarked your site to try out the presented effects you articulate.. Grammarly Cracked APK
this is a particularly charming helpful asset which you are offering and you find the money for it away for reasonable. I truly like seeing website that arrangement the charge of providing an energies valuable asset for excuse. Good Morning Sweet Message
That's good news. Thanks, and best of luck.
mIRC
Post a Comment