"); //-->
代码
#include<p16f877.inc> cblock 0x20 txBuff :8 txPtr txCount endc chkSum equ 0x30 org 0x000 goto main org 0x020 main call Send_Data goto $ Send_Data clrf STATUS MOVF txCount,w skpz return clrf chkSum movlw txBuff movwf FSR MOVLW '1' CALL AddData MOVLW '2' CALL AddData MOVLW '3' CALL AddData MOVLW '4' CALL AddData MOVLW 0x0d CALL AddData MOVLW 0x0a CALL AddData movf chkSum,w return AddData addwf chkSum,f movwf INDF INCF FSR,f incf txCount,f return end
仿真效果图
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。