SlideShare a Scribd company logo
1 of 21
3 PERCOBAAN LED PADA ATMEGA-
16 MENGGUNAKAN BASCOM-AVR
KHAZIM FIKRI MAKSALENA
1710501022
TEKNIK ELEKTRO
UNIVERSITAS TIDAR
FLOWCHART PROGRAM 1
LAMPU BERKEDIP SATU ARAH
START
COMPILER SETUP
HARDWARE SETUP
DO
LED ON
PORT A PIN 0
Wait 300ms
END
LED ON
PORT A PIN
7
LED ON
PORT A PIN
6
LED ON
PORT A
PIN 4
LED ON
PORT A
PIN 5
LED ON
PORT A
PIN 2
LED ON
PORT A
PIN 1
LED ON
PORT A
PIN 3
LOOP
Wait 300ms
Wait 300ms
Wait 300ms
Wait 300ms
Wait 300ms
Wait 300ms
Wait 300ms
Memulai program
Pendeklarasian Port yang akan digunakan
Memulai program atau perulangan perintah
Lampu yang menyala
START
COMPILER SETUP
HARDWARE SETUP
DO
LED ON
PORT A PIN
0
Delay / penundaan waktu
Kembali ke program awal
Program berakhir
Wait 300ms
END
LOOP
KODE PROGRAM 1
'program LED'
$regfile = "m161def.dat" 'library mikrokontroler yang dipakai,
$crystal = 8000000 'menyatakan clock oscillator yang dipakai 1 MHz,
Config Porta = Output 'mendeklarasikan port yang digunakan sebagai
output,
Do 'mulai menjalankan perintah dan perulangan/loop,
Porta = &B00000001 'PORTA PIN 0, LED menyala,
Waitms 300 'delay 300ms,
Porta = &B00000010 'PORTA PIN 1, LED menyala
Waitms 300 'delay 300ms,
Porta = &B00000100 'PORTA PIN 2, LED menyala,
Waitms 300 'delay 300ms,
Porta = &B00001000 'PORTA PIN 3, LED menyala,
Waitms 300 'delay 300ms,
 Porta = &B00010000 'PORTA PIN 4, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00100000 'PORTA PIN 5, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B01000000 'PORTA PIN 6, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B10000000 'PORTA PIN 7, LED menyala,
 Waitms 300 'delay 300ms,
 Loop 'kembali ke perintah awal, .
 End 'program berakhir.
FLOWCHART PROGRAM 2
LAMPU BERKEDIP BOLAK-BALIK
START
COMPILER SETUP
HARDWARE SETUP
LED ON
PORT A
PIN 0
WAIT 300MS
DO
LED ON
PORT A
PIN 1
WAIT 300MS
LED ON
PORT A
PIN 6
WAIT 300MS
LED ON
PORT A
PIN 5
WAIT 300MS
LED ON
PORT A
PIN 4
WAIT 300MS
LED ON
PORT A
PIN 3
WAIT 300MS
LED ON
PORT A
PIN 2
WAIT 300MS
LED ON
PORT A
PIN 4
WAIT 300MS
LED ON
PORT A
PIN 5
WAIT 300MS
LED ON
PORT A
PIN 6
WAIT 300MS
LED ON
PORT A
PIN 7
LOOP
END
WAIT 300MS
LED ON
PORT A
PIN 3
WAIT 300MS
LED ON
PORT A
PIN 2
WAIT 300MS
LED ON
PORT A
PIN 1
WAIT 300MS
LED OFF
PORT A
SEMUA PIN
WAIT 300MS
Memulai program
Pendeklarasian Port yang akan digunakan
Memulai program atau perulangan perintah
Lampu yang menyala
Delay / penundaan waktu
Kembali ke program awal
Program berakhir
START
COMPILER SETUP
HARDWARE SETUP
LED ON
PORT A
PIN 0
WAIT 300MS
DO
LOOP
END
KODE PROGRAM 2
 'program LED'
 $regfile = "m161def.dat" 'library mikrokontroler yang dipakai,
 $crystal = 8000000 'menyatakan clock oscillator yang dipakai 1 MHz,
 Config Porta = Output 'menyatakan PORT yang digunakan sebagai output,
 Do 'perintah dan perulangan dimulai,
 Porta = &B00000001 'PORTA PIN 0, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000010 'PORTA PIN 1, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000100 'PORTA PIN 2, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00001000 'PORTA PIN 3, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00010000 'PORTA PIN 4, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00100000 'PORTA PIN 5, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B01000000 'PORTA PIN 6, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B10000000 'PORTA PIN 7, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B01000000 'PORTA PIN 6, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00100000 'PORTA PIN 5, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00010000 'PORTA PIN 4, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00001000 'PORTA PIN 3, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000100 'PORTA PIN 2, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000010 'PORTA PIN 1, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000001 'PORTA PIN 0, LED menyala,
 Waitms 300 'delay 300ms,
 Porta = &B00000000 'PORTA PIN 0, LED menyala,
 Waitms 300 'delay 300ms,
 Loop 'kembali ke program awal'
 End 'program selesai.
FLOWCHART PROGRAM 3
LAMPU BERKEDIP DUA ARAH BOLAK-BALIK
START
DO
COMPILE SETUP
HARDWARE SETUP
LED ON
PORT A,
PIN 2,3,4,5
WAIT 300ms
LED ON
PORT A,
PIN 0,1,6,7
WAIT 300ms
LED ON
PORT A,
PIN 0 & 7
WAIT 300ms
LED ON
PORT A,
PIN 1 & 6
WAIT 300ms
LED ON
PORT A,
PIN 2 & 5
WAIT 300ms
LED ON
PORT A,
PIN 3 & 4
WAIT 300ms
LED ON
PORT A,
PIN 2 & 5
WAIT 300ms
LED ON
PORT A,
PIN 1 & 6
WAIT 300ms
LED ON
PORT A,
PIN 0 & 7
WAIT 300ms
LOOP
END
LED ON
PORT A,
PIN 0 &7
LED OFF
PORT A,
SEMUA
PIN
WAIT 300ms
LED ON
PORT A,
PIN 0,1,6,7
WAIT 300ms
WAIT 300ms
LED OFF
PORT A,
SEMUA
PIN
WAIT 300ms
KODE PROGRAM 3
 'program LED'
 $regfile = "m161def.dat" 'library mikrokontroler yang dipakai,
 $crystal = 8000000 'menyataka clock oscillator yang dipakai 1 MHz,
 Config Porta = Output 'mendeklarasikan port yang digunakan sebagai output,
 Do 'mulai menjalankan perintah dan perulangan/loop,
 Porta = &B10000001 'PORTA, PIN : 0 & 7, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B01000010 'PORTA, PIN : 1 & 6, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00100100 'PORTA, PIN : 2 & 5, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00011000 'PORTA, PIN : 3 & 4, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00100100 'PORTA, PIN : 2 & 5, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B01000010 'PORTA, PIN : 1 & 6, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B10000001 'PORTA, PIN : 0 & 7, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B11000011 'PORTA, PIN : 0,1,6,7, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00111100 'PORTA, PIN : 2,3,4,5, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B11000011 'PORTA, PIN : 0,1,6,7, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00000000 'PORTA, PIN : MATI, semua LED mati,
 Waitms 100 'delay 100ms,
 Porta = &B11111111 'PORTA, PIN : 0 sampai 7, LED menyala,
 Waitms 100 'delay 100ms,
 Porta = &B00000000 'PORTA, PIN : MATI, semua LED mati,
 Waitms 100 'delay 100ms,
 Loop 'kembali ke perintah awal,
 End 'perintah berakhir.

More Related Content

Similar to atmega 16

MaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Inc
 
Arduino projects & tutorials
Arduino projects & tutorialsArduino projects & tutorials
Arduino projects & tutorialsAnshu Pandey
 
ESD_Project-Report
ESD_Project-ReportESD_Project-Report
ESD_Project-ReportAhmad Faizan
 
Program Running Led
Program Running LedProgram Running Led
Program Running LedNadaPutra
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labAnnamaria Lisotti
 
Apr9600 voice-recording-and-playback-system-with-j
Apr9600 voice-recording-and-playback-system-with-jApr9600 voice-recording-and-playback-system-with-j
Apr9600 voice-recording-and-playback-system-with-jicstation
 
Pov display on table fan
Pov display on table fanPov display on table fan
Pov display on table fandisha karnataki
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projecthemanth prudhvi jidugu
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection systemAashiq Ahamed N
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoWanita Long
 
DIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDeevanshu Swani
 
2003 presentation24
2003 presentation242003 presentation24
2003 presentation24Sarth Lodhi
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copymkazree
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docxmayank272369
 
FOR AUTONICS IC.pdf
FOR AUTONICS IC.pdfFOR AUTONICS IC.pdf
FOR AUTONICS IC.pdfeShikhon
 
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVHOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVGIRISH HARMUKH
 

Similar to atmega 16 (20)

publish manual
publish manualpublish manual
publish manual
 
MaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Code Examples
MaxBotix Code Examples
 
Running led
Running ledRunning led
Running led
 
Arduino projects & tutorials
Arduino projects & tutorialsArduino projects & tutorials
Arduino projects & tutorials
 
ESD_Project-Report
ESD_Project-ReportESD_Project-Report
ESD_Project-Report
 
Program Running Led
Program Running LedProgram Running Led
Program Running Led
 
Design and Implementation of smart office management system
Design and Implementation of smart office management systemDesign and Implementation of smart office management system
Design and Implementation of smart office management system
 
LUMOS
LUMOSLUMOS
LUMOS
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics lab
 
Apr9600 voice-recording-and-playback-system-with-j
Apr9600 voice-recording-and-playback-system-with-jApr9600 voice-recording-and-playback-system-with-j
Apr9600 voice-recording-and-playback-system-with-j
 
Pov display on table fan
Pov display on table fanPov display on table fan
Pov display on table fan
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking project
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for Arduino
 
DIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTERDIGITAL HEART BEAT COUNTER
DIGITAL HEART BEAT COUNTER
 
2003 presentation24
2003 presentation242003 presentation24
2003 presentation24
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
 
FOR AUTONICS IC.pdf
FOR AUTONICS IC.pdfFOR AUTONICS IC.pdf
FOR AUTONICS IC.pdf
 
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVHOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
 

Recently uploaded

Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsPallavi Parmar
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfKartik Tiwari
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfNirmal Dwivedi
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 

Recently uploaded (20)

Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 

atmega 16

  • 1. 3 PERCOBAAN LED PADA ATMEGA- 16 MENGGUNAKAN BASCOM-AVR KHAZIM FIKRI MAKSALENA 1710501022 TEKNIK ELEKTRO UNIVERSITAS TIDAR
  • 2. FLOWCHART PROGRAM 1 LAMPU BERKEDIP SATU ARAH
  • 3. START COMPILER SETUP HARDWARE SETUP DO LED ON PORT A PIN 0 Wait 300ms END LED ON PORT A PIN 7 LED ON PORT A PIN 6 LED ON PORT A PIN 4 LED ON PORT A PIN 5 LED ON PORT A PIN 2 LED ON PORT A PIN 1 LED ON PORT A PIN 3 LOOP Wait 300ms Wait 300ms Wait 300ms Wait 300ms Wait 300ms Wait 300ms Wait 300ms
  • 4. Memulai program Pendeklarasian Port yang akan digunakan Memulai program atau perulangan perintah Lampu yang menyala START COMPILER SETUP HARDWARE SETUP DO LED ON PORT A PIN 0
  • 5. Delay / penundaan waktu Kembali ke program awal Program berakhir Wait 300ms END LOOP
  • 7. 'program LED' $regfile = "m161def.dat" 'library mikrokontroler yang dipakai, $crystal = 8000000 'menyatakan clock oscillator yang dipakai 1 MHz, Config Porta = Output 'mendeklarasikan port yang digunakan sebagai output, Do 'mulai menjalankan perintah dan perulangan/loop, Porta = &B00000001 'PORTA PIN 0, LED menyala, Waitms 300 'delay 300ms, Porta = &B00000010 'PORTA PIN 1, LED menyala Waitms 300 'delay 300ms, Porta = &B00000100 'PORTA PIN 2, LED menyala, Waitms 300 'delay 300ms, Porta = &B00001000 'PORTA PIN 3, LED menyala, Waitms 300 'delay 300ms,
  • 8.  Porta = &B00010000 'PORTA PIN 4, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00100000 'PORTA PIN 5, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B01000000 'PORTA PIN 6, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B10000000 'PORTA PIN 7, LED menyala,  Waitms 300 'delay 300ms,  Loop 'kembali ke perintah awal, .  End 'program berakhir.
  • 9. FLOWCHART PROGRAM 2 LAMPU BERKEDIP BOLAK-BALIK
  • 10. START COMPILER SETUP HARDWARE SETUP LED ON PORT A PIN 0 WAIT 300MS DO LED ON PORT A PIN 1 WAIT 300MS LED ON PORT A PIN 6 WAIT 300MS LED ON PORT A PIN 5 WAIT 300MS LED ON PORT A PIN 4 WAIT 300MS LED ON PORT A PIN 3 WAIT 300MS LED ON PORT A PIN 2 WAIT 300MS LED ON PORT A PIN 4 WAIT 300MS LED ON PORT A PIN 5 WAIT 300MS LED ON PORT A PIN 6 WAIT 300MS LED ON PORT A PIN 7
  • 11. LOOP END WAIT 300MS LED ON PORT A PIN 3 WAIT 300MS LED ON PORT A PIN 2 WAIT 300MS LED ON PORT A PIN 1 WAIT 300MS LED OFF PORT A SEMUA PIN WAIT 300MS
  • 12. Memulai program Pendeklarasian Port yang akan digunakan Memulai program atau perulangan perintah Lampu yang menyala Delay / penundaan waktu Kembali ke program awal Program berakhir START COMPILER SETUP HARDWARE SETUP LED ON PORT A PIN 0 WAIT 300MS DO LOOP END
  • 14.  'program LED'  $regfile = "m161def.dat" 'library mikrokontroler yang dipakai,  $crystal = 8000000 'menyatakan clock oscillator yang dipakai 1 MHz,  Config Porta = Output 'menyatakan PORT yang digunakan sebagai output,  Do 'perintah dan perulangan dimulai,  Porta = &B00000001 'PORTA PIN 0, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000010 'PORTA PIN 1, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000100 'PORTA PIN 2, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00001000 'PORTA PIN 3, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00010000 'PORTA PIN 4, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00100000 'PORTA PIN 5, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B01000000 'PORTA PIN 6, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B10000000 'PORTA PIN 7, LED menyala,  Waitms 300 'delay 300ms,
  • 15.  Porta = &B01000000 'PORTA PIN 6, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00100000 'PORTA PIN 5, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00010000 'PORTA PIN 4, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00001000 'PORTA PIN 3, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000100 'PORTA PIN 2, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000010 'PORTA PIN 1, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000001 'PORTA PIN 0, LED menyala,  Waitms 300 'delay 300ms,  Porta = &B00000000 'PORTA PIN 0, LED menyala,  Waitms 300 'delay 300ms,  Loop 'kembali ke program awal'  End 'program selesai.
  • 16. FLOWCHART PROGRAM 3 LAMPU BERKEDIP DUA ARAH BOLAK-BALIK
  • 17. START DO COMPILE SETUP HARDWARE SETUP LED ON PORT A, PIN 2,3,4,5 WAIT 300ms LED ON PORT A, PIN 0,1,6,7 WAIT 300ms LED ON PORT A, PIN 0 & 7 WAIT 300ms LED ON PORT A, PIN 1 & 6 WAIT 300ms LED ON PORT A, PIN 2 & 5 WAIT 300ms LED ON PORT A, PIN 3 & 4 WAIT 300ms LED ON PORT A, PIN 2 & 5 WAIT 300ms LED ON PORT A, PIN 1 & 6 WAIT 300ms LED ON PORT A, PIN 0 & 7 WAIT 300ms
  • 18. LOOP END LED ON PORT A, PIN 0 &7 LED OFF PORT A, SEMUA PIN WAIT 300ms LED ON PORT A, PIN 0,1,6,7 WAIT 300ms WAIT 300ms LED OFF PORT A, SEMUA PIN WAIT 300ms
  • 20.  'program LED'  $regfile = "m161def.dat" 'library mikrokontroler yang dipakai,  $crystal = 8000000 'menyataka clock oscillator yang dipakai 1 MHz,  Config Porta = Output 'mendeklarasikan port yang digunakan sebagai output,  Do 'mulai menjalankan perintah dan perulangan/loop,  Porta = &B10000001 'PORTA, PIN : 0 & 7, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B01000010 'PORTA, PIN : 1 & 6, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00100100 'PORTA, PIN : 2 & 5, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00011000 'PORTA, PIN : 3 & 4, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00100100 'PORTA, PIN : 2 & 5, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B01000010 'PORTA, PIN : 1 & 6, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B10000001 'PORTA, PIN : 0 & 7, LED menyala,  Waitms 100 'delay 100ms,
  • 21.  Porta = &B11000011 'PORTA, PIN : 0,1,6,7, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00111100 'PORTA, PIN : 2,3,4,5, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B11000011 'PORTA, PIN : 0,1,6,7, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00000000 'PORTA, PIN : MATI, semua LED mati,  Waitms 100 'delay 100ms,  Porta = &B11111111 'PORTA, PIN : 0 sampai 7, LED menyala,  Waitms 100 'delay 100ms,  Porta = &B00000000 'PORTA, PIN : MATI, semua LED mati,  Waitms 100 'delay 100ms,  Loop 'kembali ke perintah awal,  End 'perintah berakhir.