|
;;---------------带密码(保护)写射频卡-------------------------------
;; protect write command format: opcode + password + lock + data + address
;; com_data_R5, com_data_R6--密码;com_data_R7, com_data_R8--数据;address_R4--地址
;;------------------------------------------------------------------
RF_protect_write
bis.b #rf_write_bit,&P1OUT ;cfe=0,第一次写时的间隙。
call #rf_snap_delay
call #rf_snap_delay
call #RF_op_code ;write opcode
call #RF_data_write ;write password
mov com_data_R7, com_data_R5
mov com_data_R8, com_data_R6
rlc address_R4
call #RF_lock_0_write ;write lock bit
call #RF_data_write ;write data
call #RF_address_code ;write address
call #RF_programming ;RF programming
ret |
|