http://sambak-q.blogspot.com/ http://renunganku-spiritku.blogspot.com/
oOnPizz
 
Picture
;*****************************************
;*program ring konter
;*diktat microcontroler PIC 16C5X
;*bakul microcontrolerA
;*praktikum
;*tgl. 28/10/09
;*****************************************


LISTP=16C54,F=INHX8M
;*****************************************
;REGISTER UMUM


;*****************************************
WQU000h;
INFEQU001h;
PORTAEQU005h;
PORTBEQU006h;


;REGISTER DATA 


TUNGGU1EQU010h;
TUNGGU2EQU011h;


;ALAMAT PROGRAM
ORG00H
GOTOONIT


;********************************************
;SUBRUTINE DELAY
;*******************************************


D10MOVLW0FAH
MOVWFTUNGGU1
D2MOVLW00CH
MOVWFTUNGGU2
D1DECFSZTUNGGU2,F
GOTOD1
DECFSZTUNGGU1,F
GOTOD2
RETLW000h


DISMOVLW064h
MOVWFTUNGGU1
D3CALLD10
GOTOD3
RETLW000h


;********************************************
;SUSUNAN OUTPUT/ INPUT PORT
;********************************************


;PORTA:__>SEMUA TIDAK TERPAKAI


;PORTB:
;PB7__>LED-1
;PB6__>LED-2
;PB5__>LED-3
;PB4__>LED-4
;PB4__>LED-5
;PB4__>LED-6
;PB4__>LED-7
;PB4__>LED-8
;********************************************
;INISIALISASI
;********************************************
INITMOVLW000h
TRISPORTB


;********************************************
;PROGRAM UTAMA
;********************************************
MULAIMOVLWb'100000000'
MOVWFPORTB
CALLDELAY
MOVLWb'010000000'
MOVWFPORTB
CALLDELAY
MOVLWb'001000000'
MOVWFPORTB
CALLDELAY


MOVLWb'000100000'
MOVWFPORTB'
CALLDELAY


MOVLWb'000010000'
MOVWFPORTB'
CALLDELAY


MOVLWb'000001000'
MOVWFPORTB'
CALLDELAY


MOVLWb'000000100'
MOVWFPORTB'
CALLDELAY


MOVLWb'000000010'
MOVWFPORTB'
CALLDELAY

MOVLWb'000000001'
MOVWFPORTB'
CALLDELAY


GOTOMULAI
END
 


Comments




Leave a Reply

    Anto D. GembelZ

    ini adalah beberapa tugas n materi yang saya dapat saat kuliah di pOLTEK. semoga bisa membantu anda...

    Archives

    November 2010
    July 2010

    Categories

    All
    Curiculum Vitae
    Mata Kuliah
    Pelajaran
    Skripsi
    Tugas Besar

    RSS Feed

    Web Hosting

http://sambak-q.blogspot.com/ http://renunganku-spiritku.blogspot.com/