slm asm den anlamam ancak pbp da yazdım programın asm kodunu veriyorum iki şow var binary sayıcı ve sırasıyla yanan
devresi
portb.0 = data ( DS )
portb.1 = clk (SH_CP)
portb.2 = enable (pals gönderiliyor) (ST_CP)
595 de data clk ile kaydedilen değer pals (enable ) ucundan gönderilen bir pals ile çıkışa aktarılır
isis den MR ucunu +5v , OE ucunu da şaseye bağlamalısın
; PICBASIC PRO(TM) Compiler 2.47, (c) 1998, 2006 microEngineering Labs, Inc. All Rights Reserved.
PM_USED EQU 1
INCLUDE "16F628A.INC"
RAM_START EQU 00020h
RAM_END EQU 0014Fh
RAM_BANKS EQU 00003h
BANK0_START EQU 00020h
BANK0_END EQU 0007Fh
BANK1_START EQU 000A0h
BANK1_END EQU 000EFh
BANK2_START EQU 00120h
BANK2_END EQU 0014Fh
EEPROM_START EQU 02100h
EEPROM_END EQU 0217Fh
R0 EQU RAM_START + 000h
R1 EQU RAM_START + 002h
R2 EQU RAM_START + 004h
R3 EQU RAM_START + 006h
R4 EQU RAM_START + 008h
R5 EQU RAM_START + 00Ah
R6 EQU RAM_START + 00Ch
R7 EQU RAM_START + 00Eh
R8 EQU RAM_START + 010h
FLAGS EQU RAM_START + 012h
GOP EQU RAM_START + 013h
RM1 EQU RAM_START + 014h
RM2 EQU RAM_START + 015h
RR1 EQU RAM_START + 016h
RR2 EQU RAM_START + 017h
T1 EQU RAM_START + 018h
T2 EQU RAM_START + 01Ah
_bekle EQU RAM_START + 01Ch
_f EQU RAM_START + 01Dh
_f1 EQU RAM_START + 01Eh
_PORTL EQU PORTB
_PORTH EQU PORTA
_TRISL EQU TRISB
_TRISH EQU TRISA
#define _dta _PORTB??0
#define _clk _PORTB??1
#define _pals _PORTB??2
#define _PORTB??0 PORTB, 000h
#define _PORTB??1 PORTB, 001h
#define _PORTB??2 PORTB, 002h
#define _PORTB??7 PORTB, 007h
INCLUDE "KK_595~1.MAC"
INCLUDE "PBPPIC14.LIB"
MOVE?CB 080h, TRISB
MOVE?CB 000h, PORTB
MOVE?CB 000h, _bekle
LABEL?L _basla
SHIFTDATA?T _dta
SHIFTCLOCK?T _clk
SHIFTMODE?C 000h
SHIFTOUT?BC _f, 008h
PULSOUT?TC _pals, 001h
PAUSE?C 0C8h
ADD?BCB _f, 001h, _f
CMPEQ?BCB _bekle, 0C8h, T1
CMPEQ?TCB _PORTB??7, 000h, T2
LAND?BBW T1, T2, T2
CMPF?WL T2, L00001
MOVE?CB 064h, _bekle
MOVE?CB 000h, _f1
MOVE?CB 001h, _f
GOTO?L _show2
LABEL?L L00001
CMPNE?TCL _PORTB??7, 001h, L00003
MOVE?CB 0C8h, _bekle
LABEL?L L00003
GOTO?L _basla
LABEL?L _show2
SHIFTDATA?T _dta
SHIFTCLOCK?T _clk
SHIFTMODE?C 000h
SHIFTOUT?BC _f, 008h
PULSOUT?TC _pals, 001h
CMPNE?BCL _f, 000h, L00005
MOVE?CB 001h, _f
GOTO?L L00006
LABEL?L L00005
MUL?BCB _f, 002h, _f
LABEL?L L00006
PAUSE?C 0C8h
CMPEQ?BCB _bekle, 0C8h, T1
CMPEQ?TCB _PORTB??7, 000h, T2
LAND?BBW T1, T2, T2
CMPF?WL T2, L00007
MOVE?CB 064h, _bekle
MOVE?CB 000h, _f1
MOVE?CB 001h, _f
GOTO?L _basla
LABEL?L L00007
CMPNE?TCL _PORTB??7, 001h, L00009
MOVE?CB 0C8h, _bekle
LABEL?L L00009
GOTO?L _show2
END