- 14
- 0
- 约6.03千字
- 约 11页
- 2017-06-10 发布于河南
- 举报
单片机主程序流程(国外英文资料)
单片机主程序流程(国外英文资料)
The first page is the first page of the tutorial. The second page of the tutorial. Single chip computer c page 3. Infrared remote control and step motor 4. MCU qa
Master program flowchart - the 51 series single-chip machine design example tutorial
The main program diagram is shown in figure 6.2.
Figure 6.2 main program flow chart
This controller is in use, if want to change the way that scintillation, can press corresponding function key. When a full scintillation loop is over, you can move to a new flicker. Since the key scan is done at the end of the scintillation loop, the function switch should be read in at a longer time. The improved method is to replace the DL05S delay subroutine with the key scan subroutine, which is read by the key scanner as long as the key is pressed.
The following is the full source of the LED light blinking controller:
; * * * * * * * * * * * * * * * * * * * * *.
; Small lamp control program;
; * * * * * * * * * * * * * * * * * * * * *.
;
; * * * * * * * * * * * * * * * * * * * * *.
; Interrupt the entry procedure;
; * * * * * * * * * * * * * * * * * * * * *.
;
ORG OOOOH. The program executes the start address
LJMP START; Skip to START performing
ORG OOO3H; External interrupt 0 interrupt the entry address
RETI; Interrupt return (not interrupted)
ORG OOOBH; Timer TO interrupt the entry address
RETI; Interrupt return (not interrupted)
ORG OO13H; Interrupts 1 interrupt entry address
RETI; Interrupt return (not interrupted)
ORG 001 bh. Timer T1 interrupts the entry address
RETI; Interrupt return (not interrupted)
ORG 0023 h; The serial port interrupts the entry address
RETI; Interrupt return (not interrupted)
;
; * * * * * * * * * * * * * * * * * * * * *.
; Initialization program;
; * * * * * * * * * * * * * * * * * * * * *.
;
CLEAR: MOV 20H, # 00H; 20H unit memory clear 0 (scintillation mark clear 0)
SETB 00 h; 20H. 0 position 1 (automatic blinking function 1)
RET. A subroutine returns
;
; * * * * * * * * * * * * * * * * *
原创力文档

文档评论(0)