ORG 0H ;°_©l¦ì§}¬° 0H
;ADC_WR1 REG P3.6
;ADC_RD1 REG P3.7
;---------------------------------------------------------------------
START:
CALL Initial_serial_port
CLR P3.6
SETB P3.6
CALL DELAY ;
CLR P3.7
MOV A,P0
SETB P3.7
MOV SBUF,A
JMP START
;---------------------------------------------------------------------
Initial_serial_port:
MOV A,TMOD
ANL A,#0FH ;
ORL A,#20H ;
MOV TMOD,A ;
MOV SCON,#50H
MOV TH1,#0FDH
MOV TL1,#0FDH
SETB TR1
MOV PCON,#00H
MOV IE,#90H
RET
;---------------------------------------------------------------------
DELAY: ;
MOV R6,#10
DL6: ;
MOV R5,#0
DJNZ R5,$ ;
DJNZ R6,DL6
RET
END
很單純的只是要把ADC0804的資料轉串列丟給藍芽傳送
This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.