0% found this document useful (0 votes)
25 views19 pages

Aplikasi Pemrograman: Microprocessor & Mikrokontrol

The document discusses 4 microprocessor programs and the hardware and software used for microprocessor programming. Program 1 blinks LEDs using ports on a microcontroller. Program 2 similarly blinks LEDs in a pattern. Program 3 controls LEDs on multiple ports using subroutines. Program 4 displays numbers on a 7-segment display by decoding digits. The document also outlines the Proteus simulator, Bascom and Khazama programming software, and microcontroller kit used with the programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views19 pages

Aplikasi Pemrograman: Microprocessor & Mikrokontrol

The document discusses 4 microprocessor programs and the hardware and software used for microprocessor programming. Program 1 blinks LEDs using ports on a microcontroller. Program 2 similarly blinks LEDs in a pattern. Program 3 controls LEDs on multiple ports using subroutines. Program 4 displays numbers on a 7-segment display by decoding digits. The document also outlines the Proteus simulator, Bascom and Khazama programming software, and microcontroller kit used with the programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

APLIKASI

PEMROGRAMAN
MICROPROCESSOR & MIKROKONTROL
 PROGRAM PERTAMA

$regfile = "m8535.dat"
$crystal = 1000000

Config Porta = Output

Do
Porta = &B00001111
Waitms 100
Porta = &B11110000
Waitms 100
Loop
End
 PROGRAM KEDUA
$regfile = "m8535.dat" Porta = &B10111101
$crystal = 1000000 Waitms 100
Ddrc = &B11111111 Porta =
&B01111110
Do Waitms 100
Porta = &B01111110 Loop
Waitms 100 End
Porta = &B10111101
Waitms 100
Porta = &B11011011
Waitms 100
Porta = &B11100111
Waitms 100
Porta = &B11100111
Waitms 100
Porta = &B11011011
Waitms 100
 PROGRAM KETIGA
$regfile = "m16def.dat" Portc = &B1111000 Dua:
$crystal = 1000000 Waitms 500 Portd = &B0100100
Portc = &B0000000 Return
Config Portc = Output Waitms 500 Tiga:
Config Portd = Output Portc = &B0010000 Portd = &B0110000
Dim X As Byte Waitms 500 Return
X=0 Incr X Empat:
Porta = &B1000000 Select Case X Portd = &B0110000
Case 1 : Gosub Satu Return
Do Case 2 : Gosub Dua Lima:
Portc = &B1000000 Case 3 : Gosub Tiga Portd = &B0010010
Waitms 500 Case 4 : Gosub Empat Return
Portc = &B1111001 Case 5 : Gosub Lima Enam:
Waitms 500 Case 6 : Gosub Enam Portd = &B0000010
Portc = &B0100100 Case 7 : Gosub Tuju Return
Waitms 500 Case 8 : Gosub Delapan Tuju:
Portc = &B0110000 Case 9 : Gosub Sembilan Portd = &B1111000
Waitms 500 End Select Return
Portc = &B0011001 Loop Until X = 9 Delapan:
Waitms 500 End Portd = &B0000000
Portc = &B0010010 'end program Return
Waitms 500 Satu: Sembilan:
Portc = &B0000010 Portd = &B1111001 Portd = &B0010000
Waitms 500 Return Return
 PROGRAM KEEMPAT
$regfile = "m16def.dat"
$crystal = 1000000
Config Portb = Output
Config Portd = Output
Dim I As Byte , J As Byte , Count As Integer , Tem1 As Integer , Tem2 As Integer
Dim Rib As Integer , Rat As Integer , Pul As Integer , Sat As Integer
Count = 3

Do
Rat = Count / 100
Tem2 = Count Mod 100
Pul = Tem2 / 10
Sat = Tem2 Mod 10
For J = 0 To 249
Portb = &B001
Portd = Lookup(pul , Angka)
Waitms 1
Portb = &B010
Portd = Lookup(rat , Angka)
Waitms 1
Portb = &B100
Portd = Lookup(sat , Angka)
Waitms 1
Next
Decr Count
'If Count < 0 Then Count = 999
Loop
End

Angka:
Data &B00111111 , &B00000110 , &B01011011 , &B01001111 , &B01100110
Data &B01101101 , &B01111101 , &B00000111 , &B01111111 , &B01101111
 PERANGKAT PEMROGRAMAN

Software Hardware
• Proteus [simulator] • Kit Mikrokontrol
• Bascom AVR ATmega8535
• Khazama AVR • Usb Downloader
Programer • Project Board
• Seven segment
 SOFTWARE

Proteus

Bascom AVR

Khazama AVR programer


 HARDWARE
KIT Mikrokontrol

USB Downloader

Seven Segment

Project Board
KIT MIKROKONTROL
PERMASALAHAN
LIST PROGRAM

$regfile = …………………………..
$crystal = …………………………..
Config …………………….
………………………………
………………………………
………………………………
………………………………
………………………………
end
PERMASALAHAN
LIST PROGRAM

$regfile = …………………………..
$crystal = …………………………..
Config …………………….
………………………………
………………………………
………………………………
………………………………
………………………………
end
PERMASALAHAN
LIST PROGRAM

$regfile = …………………………..
$crystal = …………………………..
Config …………………….
………………………………
………………………………
………………………………
………………………………
………………………………
end
PERMASALAHAN
LIST PROGRAM

$regfile = …………………………..
$crystal = …………………………..
Config …………………….
………………………………
………………………………
………………………………
………………………………
………………………………
end

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy