⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dac.lst

📁 dac example with microcontroller implementation in c++
💻 LST
字号:
***************************
15.10.2004 11:18:37
***************************
**********************
***   ROM memory   ***
**********************
Address      Instruction
------------------------
0000	GOTO	main
  ;--- procedure delays_delay_500us ---
0004	delays_delay_500us:
0004	MOVLW	165
0005	BCF	STATUS,RP1
0006	BCF	STATUS,RP0
0007	MOVWF	STACK_0
0008	DECFSZ	STACK_0,F
0009	GOTO	$-1
000A	nop
000B	nop
000C	RETURN
000D	;---endproc---
  ;--- procedure SPIlib_S_A_spi_init ---
000D	SPIlib_S_A_spi_init:
000D	MOVLW	215
000E	BCF	STATUS,RP1
000F	BSF	STATUS,RP0
0010	MOVWF	TRISC
0011	BCF	STATUS,RP0
0012	CLRF	SSPCON
0013	MOVLW	64
0014	BSF	STATUS,RP0
0015	MOVWF	SSPSTAT
0016	BCF	STATUS,RP0
0017	BSF	sspcon,5
0018	RETURN
0019	;---endproc---
  ;--- procedure SPIlib_S_A_spi_write ---
0019	SPIlib_S_A_spi_write:
0019	BCF	STATUS,RP1
001A	BCF	STATUS,RP0
001B	MOVF	SPIlib_S_A_spi_write_param_data,W
001C	MOVWF	SSPBUF
001D	L_SPIlib_S_A_13:
001D	CLRF	STACK_0
001E	BSF	STATUS,RP0
001F	BTFSC	sspstat,0
0020	INCF	STACK_0,F
0021	MOVLW	0
0022	SUBWF	STACK_0,W
0023	BTFSS	STATUS,Z
0024	GOTO	L_SPIlib_S_A_14
0025	L_SPIlib_S_A_12:
0025	nop
0026	GOTO	L_SPIlib_S_A_13
0027	L_SPIlib_S_A_14:
0027	BCF	STATUS,RP0
0028	MOVF	SSPBUF,W
0029	MOVWF	SPIlib_S_A_spi_write_local_temp
002A	RETURN
002B	;---endproc---
  ;--- function button_button ---
002B	button_button:
002B	BCF	STATUS,RP1
002C	BCF	STATUS,RP0
002D	CLRF	button_button_result
002E	MOVF	button_button_param_port,W
002F	BCF	STATUS,IRP
0030	MOVWF	FSR
0031	MOVLW	1
0032	MOVWF	STACK_1
0033	MOVF	button_button_param_pin,W
0034	MOVWF	STACK_2
0035	BTFSC	STATUS,Z
0036	GOTO	$+5
0037	RLF	STACK_1,F
0038	BCF	STACK_1,0
0039	DECFSZ	STACK_2,F
003A	GOTO	$-5
003B	MOVF	STACK_1,W
003C	CLRF	STACK_0
003D	ANDWF	INDF,W
003E	BTFSS	STATUS,Z
003F	INCF	STACK_0,F
0040	MOVF	button_button_param_activestate,W
0041	SUBWF	STACK_0,W
0042	BTFSS	STATUS,Z
0043	GOTO	L_button_1
0044	L_button_0:
0044	L_button_5:
0044	MOVF	button_button_param_time,W
0045	SUBLW	0
0046	BTFSC	STATUS,C
0047	GOTO	L_button_6
0048	L_button_4:
0048	CALL	delays_delay_500us
0049	CALL	delays_delay_500us
004A	MOVLW	1
004B	SUBWF	button_button_param_time,W
004C	MOVWF	button_button_param_time
004D	GOTO	L_button_5
004E	L_button_6:
004E	MOVLW	1
004F	MOVWF	STACK_2
0050	MOVF	button_button_param_pin,W
0051	MOVWF	STACK_3
0052	BTFSC	STATUS,Z
0053	GOTO	$+5
0054	RLF	STACK_2,F
0055	BCF	STACK_2,0
0056	DECFSZ	STACK_3,F
0057	GOTO	$-5
0058	MOVF	STACK_2,W
0059	CLRF	STACK_1
005A	ANDWF	INDF,W
005B	BTFSS	STATUS,Z
005C	INCF	STACK_1,F
005D	MOVF	button_button_param_activestate,W
005E	SUBWF	STACK_1,W
005F	BTFSS	STATUS,Z
0060	GOTO	L_button_8
0061	L_button_7:
0061	MOVLW	255
0062	MOVWF	button_button_result
0063	GOTO	L_button_9
0064	L_button_8:
0064	L_button_9:
0064	GOTO	L_button_2
0065	L_button_1:
0065	L_button_2:
0065	RETURN
0066	;---endproc---
  ;--- procedure dac_dac_output ---
0066	dac_dac_output:
0066	BCF	STATUS,RP1
0067	BCF	STATUS,RP0
0068	BCF	portc,0
0069	MOVF	dac_dac_output_param_Value_2,W
006A	MOVWF	STACK_0
006B	MOVLW	15
006C	ANDWF	STACK_0,W
006D	MOVWF	dac_dac_output_local_temp
006E	MOVLW	48
006F	IORWF	dac_dac_output_local_temp,W
0070	MOVWF	dac_dac_output_local_temp
0071	MOVF	dac_dac_output_local_temp,W
0072	MOVWF	SPIlib_S_A_spi_write_param_data
0073	CALL	SPIlib_S_A_spi_write
0074	MOVF	dac_dac_output_param_Value_1,W
0075	MOVWF	dac_dac_output_local_temp
0076	MOVF	dac_dac_output_local_temp,W
0077	MOVWF	SPIlib_S_A_spi_write_param_data
0078	CALL	SPIlib_S_A_spi_write
0079	BSF	portc,0
007A	RETURN
007B	;---endproc---
  ;--- procedure dac_init ---
007B	dac_init:
007B	BCF	STATUS,RP1
007C	BSF	STATUS,RP0
007D	BSF	trisb,0
007E	BSF	trisb,1
007F	CALL	SPIlib_S_A_spi_init
0080	BCF	STATUS,RP1
0081	BSF	STATUS,RP0
0082	BCF	trisc,0
0083	RETURN
0084	;---endproc---
  ;--- procedure main ---
0084	main:
0084	CALL	dac_init
0085	MOVLW	0
0086	BCF	STATUS,RP1
0087	BCF	STATUS,RP0
0088	MOVWF	dac_dac_output_param_Value_1
0089	MOVLW	8
008A	MOVWF	dac_dac_output_param_Value_2
008B	CALL	dac_dac_output
008C	MOVLW	0
008D	MOVWF	main_global_value_1
008E	MOVLW	8
008F	MOVWF	main_global_value_2
0090	L_dac_1:
0090	L_dac_0:
0090	MOVLW	PORTB,W
0091	MOVWF	button_button_param_port
0092	MOVLW	0
0093	MOVWF	button_button_param_pin
0094	MOVLW	1
0095	MOVWF	button_button_param_time
0096	MOVLW	1
0097	MOVWF	button_button_param_activestate
0098	CALL	button_button
0099	MOVLW	255
009A	SUBWF	button_button_result,W
009B	BTFSS	STATUS,Z
009C	GOTO	L_dac_4
009D	GOTO	L_dac_3
009E	L_dac_3:
009E	MOVLW	15
009F	SUBWF	main_global_value_2,W
00A0	BTFSS	STATUS,Z
00A1	GOTO	$+3
00A2	MOVLW	255
00A3	SUBWF	main_global_value_1,W
00A4	BTFSC	STATUS,C
00A5	GOTO	L_dac_4
00A6	L_dac_7:
00A6	INCF	main_global_value_1,F
00A7	BTFSC	STATUS,Z
00A8	INCF	main_global_value_2,F
00A9	GOTO	L_dac_5
00AA	L_dac_4:
00AA	MOVLW	PORTB,W
00AB	MOVWF	button_button_param_port
00AC	MOVLW	1
00AD	MOVWF	button_button_param_pin
00AE	MOVLW	1
00AF	MOVWF	button_button_param_time
00B0	MOVLW	1
00B1	MOVWF	button_button_param_activestate
00B2	CALL	button_button
00B3	MOVLW	255
00B4	SUBWF	button_button_result,W
00B5	BTFSS	STATUS,Z
00B6	GOTO	L_dac_9
00B7	GOTO	L_dac_8
00B8	L_dac_8:
00B8	MOVLW	0
00B9	MOVWF	STACK_11
00BA	MOVF	main_global_value_2,W
00BB	SUBWF	STACK_11,W
00BC	BTFSS	STATUS,Z
00BD	GOTO	$+3
00BE	MOVF	main_global_value_1,W
00BF	SUBLW	0
00C0	BTFSC	STATUS,C
00C1	GOTO	L_dac_9
00C2	L_dac_12:
00C2	MOVLW	1
00C3	SUBWF	main_global_value_1,F
00C4	BTFSS	STATUS,C
00C5	SUBWF	main_global_value_2,F
00C6	GOTO	L_dac_10
00C7	L_dac_9:
00C7	L_dac_10:
00C7	GOTO	L_dac_5
00C8	L_dac_5:
00C8	MOVF	main_global_value_1,W
00C9	MOVWF	dac_dac_output_param_Value_1
00CA	MOVF	main_global_value_2,W
00CB	MOVWF	dac_dac_output_param_Value_2
00CC	CALL	dac_dac_output
00CD	MOVLW	2
00CE	MOVWF	STACK_1
00CF	MOVLW	255
00D0	MOVWF	STACK_2
00D1	MOVLW	255
00D2	MOVWF	STACK_3
00D3	DECFSZ	STACK_1,F
00D4	GOTO	$+2
00D5	GOTO	$+8
00D6	DECFSZ	STACK_2,F
00D7	GOTO	$+2
00D8	GOTO	$+4
00D9	DECFSZ	STACK_3,F
00DA	GOTO	$-1
00DB	GOTO	$-5
00DC	GOTO	$-9
00DD	MOVLW	6
00DE	MOVWF	STACK_1
00DF	MOVLW	255
00E0	MOVWF	STACK_2
00E1	DECFSZ	STACK_1,F
00E2	GOTO	$+2
00E3	GOTO	$+4
00E4	DECFSZ	STACK_2,F
00E5	GOTO	$-1
00E6	GOTO	$-5
00E7	MOVLW	10
00E8	MOVWF	STACK_1
00E9	DECFSZ	STACK_1,F
00EA	GOTO	$-1
00EB	GOTO	L_dac_1
00EC	L_dac_2:
00EC	GOTO	$
00ED	;---endproc---
*************
Program size: 258 locations

**********************
***   HEX memory   ***
**********************
    	0000	0001	0002	0003	0004	0005	0006	0007	0008	0009	000A	000B	000C	000D	000E	000F
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
0000 | 	2884	3FFF	3FFF	3FFF	30A5	1303	1283	00F0	0BF0	2808	0000	0000	0008	30D7	1303	1683
0010 | 	0087	1283	0194	3040	1683	0094	1283	1694	0008	1303	1283	0822	0093	01F0	1683	1814
0020 | 	0AF0	3000	0270	1D03	2827	0000	281D	1283	0813	00A3	0008	1303	1283	01A8	0824	1383
0030 | 	0084	3001	00F1	0827	00F2	1903	283B	0DF1	1071	0BF2	2835	0871	01F0	0500	1D03	0AF0
0040 | 	0825	0270	1D03	2865	0826	3C00	1803	284E	2004	2004	3001	0226	00A6	2844	3001	00F2
0050 | 	0827	00F3	1903	2858	0DF2	1072	0BF3	2852	0872	01F1	0500	1D03	0AF1	0825	0271	1D03
0060 | 	2864	30FF	00A8	2864	2865	0008	1303	1283	1007	0825	00F0	300F	0570	00A6	3030	0426
0070 | 	00A6	0826	00A2	2019	0824	00A6	0826	00A2	2019	1407	0008	1303	1683	1406	1486	200D
0080 | 	1303	1683	1007	0008	207B	3000	1303	1283	00A4	3008	00A5	2066	3000	00A0	3008	00A1
0090 | 	3006	00A4	3000	00A7	3001	00A6	3001	00A5	202B	30FF	0228	1D03	28AA	289E	300F	0221
00A0 | 	1D03	28A4	30FF	0220	1803	28AA	0AA0	1903	0AA1	28C8	3006	00A4	3001	00A7	3001	00A6
00B0 | 	3001	00A5	202B	30FF	0228	1D03	28C7	28B8	3000	00F4	0821	0274	1D03	28C0	0820	3C00
00C0 | 	1803	28C7	3001	02A0	1C03	02A1	28C7	28C8	0820	00A4	0821	00A5	2066	3002	00F1	30FF
00D0 | 	00F2	30FF	00F3	0BF1	28D6	28DD	0BF2	28D9	28DC	0BF3	28D9	28D6	28D3	3006	00F1	30FF
************************
***   GP registers   ***
************************
Address      Name
-------------------
0020	main_global_value_1
0021	main_global_value_2
0022	SPIlib_S_A_spi_write_param_data
0023	SPIlib_S_A_spi_write_local_temp
0024	dac_dac_output_param_Value_1
0024	button_button_param_port
0025	dac_dac_output_param_Value_2
0025	button_button_param_activestate
0026	dac_dac_output_local_temp
0026	button_button_param_time
0027	button_button_param_pin
0028	button_button_result
0070	STACK_0
0071	STACK_1
0072	STACK_2
0073	STACK_3
0074	STACK_11

************************
***   SF registers   ***
************************
Address      Name
-------------------
FFFFFFFF	W
0000	INDF
0001	TMR0
0002	PCL
0003	STATUS
0004	FSR
0005	PORTA
0006	PORTB
0007	PORTC
0008	PORTD
0009	PORTE
000A	PCLATH
000B	INTCON
000C	PIR1
000D	PIR2
000E	TMR1L
000F	TMR1H
0010	T1CON
0011	TMR2
0012	T2CON
0013	SSPBUF
0014	SSPCON
0015	CCPR1L
0016	CCPR1H
0017	CCP1CON
0018	RCSTA
0019	TXREG
001A	RCREG
001B	CCPR2L
001C	CCPR2H
001D	CCP2CON
001E	ADRESH
001F	ADCON0
0081	OPTION_REG
0085	TRISA
0086	TRISB
0087	TRISC
0088	TRISD
0089	TRISE
008C	PIE1
008D	PIE2
008E	PCON
0091	SSPCON2
0092	PR2
0093	SSPADD
0094	SSPSTAT
0098	TXSTA
0099	SPBRG
009C	CMCON
009D	CVRCON
009E	ADRESL
009F	ADCON1
010C	EEDATA
010D	EEADR
010E	EEDATH
010F	EEADRH
018C	EECON1
018D	EECON2
2000	ID0
2001	ID1
2002	ID2
2003	ID3
2007	CONFIG
******************
***   Labels   ***
******************
Address        Label
--------------------
0004	delays_delay_500us:
000D	SPIlib_S_A_spi_init:
0019	SPIlib_S_A_spi_write:
001D	L_SPIlib_S_A_13:
0025	L_SPIlib_S_A_12:
0027	L_SPIlib_S_A_14:
002B	button_button:
0044	L_button_0:
0044	L_button_5:
0048	L_button_4:
004E	L_button_6:
0061	L_button_7:
0064	L_button_8:
0064	L_button_9:
0065	L_button_1:
0065	L_button_2:
0066	dac_dac_output:
007B	dac_init:
0084	main:
0090	L_dac_1:
0090	L_dac_0:
009E	L_dac_3:
00A6	L_dac_7:
00AA	L_dac_4:
00B8	L_dac_8:
00C2	L_dac_12:
00C7	L_dac_9:
00C7	L_dac_10:
00C8	L_dac_5:
00EC	L_dac_2:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -