#include p10f200.inc
; __CONFIG _MCLRE_OFF & _CP_OFF & _WDT_OFF & _IntRC_OSC __CONFIG _MCLRE_ON & _CP_OFF & _WDT_OFF & _IntRC_OSC
#define _Z STATUS,2
delay1 equ 0x10 delay2 equ 0x11 delay3 equ 0x12 delays equ 0x13
org 0x00
movwf OSCCAL
start: movlw b'10000111' ; Disable T0CKI input function and no watchdog precscaler option
……
wait1second: movlw 0x01 movwf delays waitloopmain: movlw 0x32 movwf delay1 movlw 0xFD movwf delay2 movlw 0x5 movwf delay3 waitloop: decfsz delay1,f goto waitloop decfsz delay2,f goto waitloop decfsz delay3,f goto waitloop decfsz delays,f goto waitloopmain retlw 0x00
end
上述程序里的产生1s延时的子程序有以下问题请教:
1、该子程序能产生1s延时吗? 请列出计算式 注:PIC10F200是4MHz,单指令1us
2、decfsz delays,f 上面的f是什么意思? |