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
9 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
Online football betting i99club, one of the world's leading online gambling sites, provides the best prices in football betting เว็บแทงบอล
Ufabet1688 online betting website UEFA Bet is a 100% legal website with all licenses. ufabet
UEFA football betting, casino, slots, lottery, direct website 1688, stable financial, 100% UFABET168. ufa
Fan wreath shop with free delivery, with pictures before-after sending with receipt. พวงหรีด
Sticking to the COVID-19 situation: Arekorenavi.info. โควิด
Online Baccarat FOXZ24 Easy to apply, fast, deposit-withdraw 10 seconds with the system. บาคาร่า
FOXZ88.NET online casino website Global standard 2020-2021. คาสิโนออนไลน์
Betting online gambling reminiscent of UFASCR.COM Baccarat. ufabet
UFABET football betting website, the big brother of all UEFA networks, UFADNA, with an update The first modern system in 2021. ufa
Web football i99PRO online lottery casino apply today for free 5000 bonus. เว็บบอล
Kardinal Stick Siam - Relx a great promotion. Express delivery in 3 hours. relx
Online Marketing Company By the way we can make your website. Reach more customers directly to your business group. Grow your sales. SEO
Post a Comment