SlideShare a Scribd company logo
1 of 15
PENYUSUN:
EGI AGUNG PRAYOGI 1710501012
YOGA APRIYANSYAH 1710501016
DOSEN PEMBIMBING:
R. SURYOTO EDY RAHARJO, S.T., M.Eng
TEKNIK ELEKTRO
UNIVERSITAS TIDAR
PERCOBAAN 1
PROGRAM DAN CODING
$regfile = "m16adef.dat"
$crystal = 8000000
Config Porta = Output
Do
Porta = &B10000000
Waitms 1
Porta = &B11000000
Waitms 1
Porta = &B11100000
Waitms 1
Porta = &B11110000
Waitms 1
Porta = &B11111000
Waitms 1
Porta = &B11111100
Waitms 1
Porta = &B11111110
Waitms 1
Porta = &B11111111
Waitms 1
Loop
End
FLOWCART
PERCOBAAN 2
PROGRAM DAN CODING
$regfile = "m16adef.dat"
$crystal = 8000000
Config Portc = Output
Do
Portc = &B00000001
Waitms 200
Portc = &B00000010
Waitms 200
Portc = &B00000100
Waitms 200
Portc = &B00001000
Waitms 200
Portc = &B00010000
Waitms 200
Portc = &B00100000
Waitms 200
Portc = &B01000000
Waitms 200
Portc = &B10000000
Waitms 200
Portc = &B01000000
Waitms 200
Portc = &B00100000
Waitms 200
Portc = &B00010000
Waitms 200
Portc = &B00001000
Waitms 200
Portc = &B00000100
Waitms 200
Portc = &B00000010
Waitms 200
Portc = &B00000001
Waitms 200
Loop
End
FLOWCART
PERCOBAAN 3
PROGRAM DAN CODING
$regfile = "m16adef.dat"
$crystal = 8000000
Config Porta = Output
Config Portb = Output
Do
Porta = &B100000
Portb = &B000000
Waitms 100
Porta = &B110000
Portb = &B000000
Waitms 100
Porta = &B111000
Portb = &B000000
Waitms 100
Porta = &B011100
Portb = &B000000
Waitms 100
Porta = &B001110
Portb = &B000000
Waitms 100
Porta = &B000111
Portb = &B000000
Waitms 100
Porta = &B000011
Portb = &B100000
Waitms 100
Porta = &B000001
Portb = &B110000
Waitms 100
Porta = &B000000
Portb = &B111000
Waitms 100
Porta = &B000000
Portb = &B011100
Waitms 100
Porta = &B000000
Portb = &B001110
Waitms 100
Porta = &B000000
Portb = &B000111
Waitms 100
Porta = &B000000
Portb = &B000011
Waitms 100
Porta = &B000000
Portb = &B000001
Waitms 100
Porta = &B000000
Portb = &B000011
Waitms 100
Porta = &B000000
Portb = &B000111
Waitms 100
Porta = &B000000
Portb = &B001110
Waitms 100
Porta = &B000000
Portb = &B011100
Waitms 100
Porta = &B000000
Portb = &B111000
Waitms 100
Porta = &B000001
Portb = &B110000
Waitms 100
Porta = &B000011
Portb = &B100000
Waitms 100
Porta = &B000111
Portb = &B000000
Waitms 100
Porta = &B001110
Portb = &B000000
Waitms 100
Porta = &B011100
Portb = &B000000
Waitms 100
Porta = &B111000
Portb = &B000000
Waitms 100
Porta = &B110000
Portb = &B000000
Waitms 100
Loop
End
TRIFFIG LIGHT
'PROGRAM TRIFFIC LIGHT
'EGI AGUNG PRAYOGI &
YOGA APRIYANSYAH
'06/05/2019
$regfile = "m16adef.dat"
$crystal = 8000000
Config Porta = Output
Config Portb = Output
Do
Porta = &B100001
Portb = &B001001
Wait 15
Porta = &B010001
Portb = &B001001
Wait 5
Porta = &B001100
Portb = &B001001
Wait 15
Porta = &B001010
Portb = &B001001
Wait 5
Porta = &B001001
Portb = &B100001
Wait 15
Porta = &B001001
Portb = &B010001
Wait 5
Porta = &B001001
Portb = &B001100
Wait 15
Porta = &B001001
Portb = &B001010
Wait 5
Loop
End
RUNNING LED WITH AT-MEGA 16
RUNNING LED WITH AT-MEGA 16
RUNNING LED WITH AT-MEGA 16

More Related Content

Recently uploaded

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...MohammadAliNayeem
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxwendy cai
 
Planetary Gears of automatic transmission of vehicle
Planetary Gears of automatic transmission of vehiclePlanetary Gears of automatic transmission of vehicle
Planetary Gears of automatic transmission of vehicleahmedmostafa941217
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1T.D. Shashikala
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineJulioCesarSalazarHer1
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdfKamal Acharya
 
Lecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdfLecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdfmohamedsamy9878
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdfKamal Acharya
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxHamzaKhawar4
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edgePaco Orozco
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...Roi Lipman
 
E-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce siteE-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce sitejatinraor66
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Lovely Professional University
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationDr. Radhey Shyam
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdfKamal Acharya
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineAftabkhan575376
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 

Recently uploaded (20)

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
Planetary Gears of automatic transmission of vehicle
Planetary Gears of automatic transmission of vehiclePlanetary Gears of automatic transmission of vehicle
Planetary Gears of automatic transmission of vehicle
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Lecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdfLecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptx
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
E-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce siteE-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce site
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbineLow rpm Generator for efficient energy harnessing from a two stage wind turbine
Low rpm Generator for efficient energy harnessing from a two stage wind turbine
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

RUNNING LED WITH AT-MEGA 16

  • 1. PENYUSUN: EGI AGUNG PRAYOGI 1710501012 YOGA APRIYANSYAH 1710501016 DOSEN PEMBIMBING: R. SURYOTO EDY RAHARJO, S.T., M.Eng TEKNIK ELEKTRO UNIVERSITAS TIDAR
  • 3. PROGRAM DAN CODING $regfile = "m16adef.dat" $crystal = 8000000 Config Porta = Output Do Porta = &B10000000 Waitms 1 Porta = &B11000000 Waitms 1 Porta = &B11100000 Waitms 1 Porta = &B11110000 Waitms 1 Porta = &B11111000 Waitms 1 Porta = &B11111100 Waitms 1 Porta = &B11111110 Waitms 1 Porta = &B11111111 Waitms 1 Loop End
  • 6. PROGRAM DAN CODING $regfile = "m16adef.dat" $crystal = 8000000 Config Portc = Output Do Portc = &B00000001 Waitms 200 Portc = &B00000010 Waitms 200 Portc = &B00000100 Waitms 200 Portc = &B00001000 Waitms 200 Portc = &B00010000 Waitms 200 Portc = &B00100000 Waitms 200 Portc = &B01000000 Waitms 200 Portc = &B10000000 Waitms 200 Portc = &B01000000 Waitms 200 Portc = &B00100000 Waitms 200 Portc = &B00010000 Waitms 200 Portc = &B00001000 Waitms 200 Portc = &B00000100 Waitms 200 Portc = &B00000010 Waitms 200 Portc = &B00000001 Waitms 200 Loop End
  • 9. PROGRAM DAN CODING $regfile = "m16adef.dat" $crystal = 8000000 Config Porta = Output Config Portb = Output Do Porta = &B100000 Portb = &B000000 Waitms 100 Porta = &B110000 Portb = &B000000 Waitms 100 Porta = &B111000 Portb = &B000000 Waitms 100 Porta = &B011100 Portb = &B000000 Waitms 100 Porta = &B001110 Portb = &B000000 Waitms 100 Porta = &B000111 Portb = &B000000 Waitms 100 Porta = &B000011 Portb = &B100000 Waitms 100 Porta = &B000001 Portb = &B110000 Waitms 100 Porta = &B000000 Portb = &B111000 Waitms 100 Porta = &B000000 Portb = &B011100 Waitms 100 Porta = &B000000 Portb = &B001110 Waitms 100 Porta = &B000000 Portb = &B000111 Waitms 100 Porta = &B000000 Portb = &B000011 Waitms 100 Porta = &B000000 Portb = &B000001 Waitms 100 Porta = &B000000 Portb = &B000011 Waitms 100 Porta = &B000000 Portb = &B000111 Waitms 100 Porta = &B000000 Portb = &B001110 Waitms 100 Porta = &B000000 Portb = &B011100 Waitms 100 Porta = &B000000 Portb = &B111000 Waitms 100 Porta = &B000001 Portb = &B110000 Waitms 100 Porta = &B000011 Portb = &B100000 Waitms 100 Porta = &B000111 Portb = &B000000 Waitms 100 Porta = &B001110 Portb = &B000000 Waitms 100 Porta = &B011100 Portb = &B000000 Waitms 100 Porta = &B111000 Portb = &B000000 Waitms 100 Porta = &B110000 Portb = &B000000 Waitms 100 Loop End
  • 11.
  • 12. 'PROGRAM TRIFFIC LIGHT 'EGI AGUNG PRAYOGI & YOGA APRIYANSYAH '06/05/2019 $regfile = "m16adef.dat" $crystal = 8000000 Config Porta = Output Config Portb = Output Do Porta = &B100001 Portb = &B001001 Wait 15 Porta = &B010001 Portb = &B001001 Wait 5 Porta = &B001100 Portb = &B001001 Wait 15 Porta = &B001010 Portb = &B001001 Wait 5 Porta = &B001001 Portb = &B100001 Wait 15 Porta = &B001001 Portb = &B010001 Wait 5 Porta = &B001001 Portb = &B001100 Wait 15 Porta = &B001001 Portb = &B001010 Wait 5 Loop End