kotan04
Üye
- Katılım
- 8 Ocak 2008
- Mesajlar
- 8
- Puanları
- 1
- Yaş
- 39
Merhaba arkadaşlar ben pic1684a ile rgb led devresi tasarladım fakat programda renk ler arasında geçişi ve ana rekler dışnda renkleri gösteremedim bana yardımcı olailirmisiniz şu an çalışan kodumu verim bir bakarmısınız
list p=16f84
include "p16f84.inc"
__config _wdt_off &_xt_osc &_pwrte_on &_cp_off
lsb equ h'20'
msb equ h'21'
;**************
org 0x00
goto basla
;*******************
bekle
movlw .250
movwf lsb
don1
movlw .200
movwf msb
don2
decfsz msb,f
goto don2
decfsz lsb,f
goto don1
return
;****************
basla
clrf msb
clrf lsb
bsf status,5
clrf trisa
clrf trisb
bcf status,5
clrf portb
clrf porta
;********************************************
sawas
movlw b'11010010'
movwf portb
call bekle
movlw b'00100001'
movwf portb
call bekle
movlw b'11001100'
movwf portb
call bekle
movlw b'10101010'
movwf portb
call bekle
movlw b'10000001'
movwf portb
call bekle
movlw b'01101100'
movwf portb
call bekle
movlw b'11011101'
movwf portb
call bekle
movlw b'11000000'
movwf portb
call bekle
movlw b'11100010'
movwf portb
call bekle
goto sawas
end
list p=16f84
include "p16f84.inc"
__config _wdt_off &_xt_osc &_pwrte_on &_cp_off
lsb equ h'20'
msb equ h'21'
;**************
org 0x00
goto basla
;*******************
bekle
movlw .250
movwf lsb
don1
movlw .200
movwf msb
don2
decfsz msb,f
goto don2
decfsz lsb,f
goto don1
return
;****************
basla
clrf msb
clrf lsb
bsf status,5
clrf trisa
clrf trisb
bcf status,5
clrf portb
clrf porta
;********************************************
sawas
movlw b'11010010'
movwf portb
call bekle
movlw b'00100001'
movwf portb
call bekle
movlw b'11001100'
movwf portb
call bekle
movlw b'10101010'
movwf portb
call bekle
movlw b'10000001'
movwf portb
call bekle
movlw b'01101100'
movwf portb
call bekle
movlw b'11011101'
movwf portb
call bekle
movlw b'11000000'
movwf portb
call bekle
movlw b'11100010'
movwf portb
call bekle
goto sawas
end