|
PIC16F716 PWM
- opt subtitle "HI-TECH Software Omniscient Code Generator (PRO mode) build 10920"
- opt pagewidth 120
- opt pm
- processor 16F716
- clrc macro
- bcf 3,0
- endm
- clrz macro
- bcf 3,2
- endm
- setc macro
- bsf 3,0
- endm
- setz macro
- bsf 3,2
- endm
- skipc macro
- btfss 3,0
- endm
- skipz macro
- btfss 3,2
- endm
- skipnc macro
- btfsc 3,0
- endm
- skipnz macro
- btfsc 3,2
- endm
- indf equ 0
- indf0 equ 0
- pc equ 2
- pcl equ 2
- status equ 3
- fsr equ 4
- fsr0 equ 4
- c equ 1
- z equ 0
- pclath equ 10
- FNROOT _main
- global _CCP1CON
- psect maintext,global,class=CODE,delta=2
- global __pmaintext
- __pmaintext:
- _CCP1CON set 23
- global _CCPR1L
- _CCPR1L set 21
- global _T2CKPS0
- _T2CKPS0 set 144
- global _T2CKPS1
- _T2CKPS1 set 145
- global _TMR2IF
- _TMR2IF set 97
- global _TMR2ON
- _TMR2ON set 146
- global _PR2
- _PR2 set 146
- global _TRISB
- _TRISB set 134
- file "pic16f7161.as"
- line #
- psect cinit,class=CODE,delta=2
- global start_initialization
- start_initialization:
- psect cinit,class=CODE,delta=2
- global end_of_initialization
- ;End of C runtime variable initialization code
- end_of_initialization:
- clrf status
- ljmp _main ;jump to C main() function
- psect cstackCOMMON,class=COMMON,space=1
- global __pcstackCOMMON
- __pcstackCOMMON:
- global ?_main
- ?_main: ; 0 bytes @ 0x0
- global ??_main
- ??_main: ; 0 bytes @ 0x0
- ;;Data sizes: Strings 0, constant 0, data 0, bss 0, persistent 0 stack 0
- ;;Auto spaces: Size Autos Used
- ;; COMMON 14 0 0
- ;; BANK0 80 0 0
- ;; BANK1 32 0 0
- ;;
- ;; Pointer list with targets:
- ;;
- ;; Critical Paths under _main in COMMON
- ;;
- ;; None.
- ;;
- ;; Critical Paths under _main in BANK0
- ;;
- ;; None.
- ;;
- ;; Critical Paths under _main in BANK1
- ;;
- ;; None.
- ;;
- ;;Main: autosize = 0, tempsize = 0, incstack = 0, save=0
- ;;
- ;;
- ;;Call Graph Tables:
- ;;
- ;; ---------------------------------------------------------------------------------
- ;; (Depth) Function Calls Base Space Used Autos Params Refs
- ;; ---------------------------------------------------------------------------------
- ;; (0) _main 0 0 0 0
- ;; ---------------------------------------------------------------------------------
- ;; Estimated maximum stack depth 0
- ;; ---------------------------------------------------------------------------------
- ;; Call Graph Graphs:
- ;; _main (ROOT)
- ;;
- ;; Address spaces:
- ;;Name Size Autos Total Cost Usage
- ;;BITCOMMON E 0 0 0 0.0%
- ;;NULL 0 0 0 0 0.0%
- ;;CODE 0 0 0 0 0.0%
- ;;COMMON E 0 0 1 0.0%
- ;;BITSFR0 0 0 0 1 0.0%
- ;;SFR0 0 0 0 1 0.0%
- ;;BITSFR1 0 0 0 2 0.0%
- ;;SFR1 0 0 0 2 0.0%
- ;;STACK 0 0 0 2 0.0%
- ;;BITBANK0 50 0 0 3 0.0%
- ;;BANK0 50 0 0 4 0.0%
- ;;BANK1 20 0 0 5 0.0%
- ;;ABS 0 0 0 6 0.0%
- ;;BITBANK1 20 0 0 7 0.0%
- ;;DATA 0 0 0 8 0.0%
- global _main
- psect maintext
- ;; *************** function _main *****************
- ;; Defined at:
- ;; line 5 in file "D:\pic\pic16f7161\pic16f716.c"
- ;; Parameters: Size Location Type
- ;; None
- ;; Auto vars: Size Location Type
- ;; None
- ;; Return value: Size Location Type
- ;; None void
- ;; Registers used:
- ;; wreg, status,2
- ;; Tracked objects:
- ;; On entry : 17F/0
- ;; On exit : 15F/0
- ;; Unchanged: FFE80/0
- ;; Data sizes: COMMON BANK0 BANK1
- ;; Params: 0 0 0
- ;; Locals: 0 0 0
- ;; Temps: 0 0 0
- ;; Totals: 0 0 0
- ;;Total ram usage: 0 bytes
- ;; This function calls:
- ;; Nothing
- ;; This function is called by:
- ;; Startup code after reset
- ;; This function uses a non-reentrant model
- ;;
- psect maintext
- file "D:\pic\pic16f7161\pic16f716.c"
- line 5
- global __size_of_main
- __size_of_main equ __end_of_main-_main
-
- _main:
- opt stack 8
- ; Regs used in _main: [wreg+status,2]
- line 7
-
- l716:
- ;pic16f716.c: 7: TRISB=0x08;
- movlw (08h)
- bsf status, 5 ;RP0=1, select bank1
- movwf (134)^080h ;volatile
- line 9
- ;pic16f716.c: 9: PR2=39;
- movlw (027h)
- movwf (146)^080h ;volatile
- line 11
- ;pic16f716.c: 11: CCP1CON=0x0c;
- movlw (0Ch)
- bcf status, 5 ;RP0=0, select bank0
- movwf (23) ;volatile
- line 13
- ;pic16f716.c: 13: CCPR1L=10;
- movlw (0Ah)
- movwf (21) ;volatile
- line 15
-
- l718:
- ;pic16f716.c: 15: TMR2IF=0;
- bcf (97/8),(97)&7
- line 17
-
- l720:
- ;pic16f716.c: 17: T2CKPS0=0;
- bcf (144/8),(144)&7
- line 18
-
- l722:
- ;pic16f716.c: 18: T2CKPS1=0;
- bcf (145/8),(145)&7
- line 20
-
- l724:
- ;pic16f716.c: 20: TMR2ON=1;
- bsf (146/8),(146)&7
- line 22
-
- l726:
- ;pic16f716.c: 22: while(TMR2IF==0);
- btfss (97/8),(97)&7
- goto u11
- goto u10
- u11:
- goto l726
- u10:
- line 23
-
- l728:
- ;pic16f716.c: 23: TRISB=0x00;
- bsf status, 5 ;RP0=1, select bank1
- clrf (134)^080h ;volatile
- line 25
- ;pic16f716.c: 24: for( ; ; )
-
- l345:
- ;pic16f716.c: 25: {}
- goto l345
- global start
- ljmp start
- opt stack 0
- psect maintext
- line 26
- GLOBAL __end_of_main
- __end_of_main:
- ;; =============== function _main ends ============
- signat _main,88
- global btemp
- btemp set 07Eh
- DABS 1,126,2 ;btemp
- global wtemp0
- wtemp0 set btemp
- end
復(fù)制代碼
|
-
-
pic16f7161.rar
2016-5-9 11:40 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
27.99 KB, 下載次數(shù): 32, 下載積分: 黑幣 -5
pic16f716 pwm
評分
-
查看全部評分
|