Код: Выделить всё
ldi count,8
sei
;************************************************
;* ;;/ Send command SEARCH and two READ ;;* *
;************************************************
Wait_Bit_SEND:
sbrs Flags,fl_Bit_SEND
rjmp Wait_Bit_SEND
cbr Flags,1<<fl_Bit_SEND
dec count
breq SEND_twoREAD_BIT
outi UCSRB,1<<RXCIE|1<<TXCIE|1<<RXEN|1<<TXEN
rjmp Wait_Bit_SEND
SEND_twoREAD_BIT:
outi UCSRA,1<<TXC
subi count,-2
SEND_READ_BIT:
outi UDR,READDS18
WAIT_READ:
in temp,UCSRA
sbrs temp,RXC
rjmp WAIT_READ
in temp,UDR
dec count
breq SEARCH_VALUE_BIT
mov temp1,temp
rjmp SEND_READ_BIT
;************************************************
;* ;;/ FIND NUMBER ;;* *
;************************************************
SEARCH_VALUE_BIT:
cpse temp1,temp
rjmp Not_Conflict
cpse TEMP1,ZERO
rjmp ERROR_SENSOR
rjmp Found_Conflict
Not_Conflict:
cpse temp1,zero
sbr Shift_REG,1<<MSB_REG
lsr Shift_REG
out UDR,temp1
inc count
sbrc count,Value_8
st -X,Shift_REG
inc Bit_Number
cpi Bit_Number,64
brne SEND_twoREAD_BITКод: Выделить всё
sbrc count,Value_8
st -X,Shift_REG


