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

📄 pwmart.ls

📁 该程序是ST7MC驱动三洋压缩机(交流)
💻 LS
📖 第 1 页 / 共 2 页
字号:
2239  017f a601          	ld	a,#1
2242  0181 81            	ret	
2243  0182               L5131:
2244                     ; 236 		return ( FALSE );
2246  0182 4f            	clr	a
2249  0183 81            	ret	
2273                     ; 241 BOOL ART_IsSequenceCompleted(void)
2273                     ; 242 {
2274                     	switch	.text
2275  0184               _ART_IsSequenceCompleted:
2278                     ; 243 	if ( TimeBaseStatus & SEQUENCE_COMPLETED )
2280  0184 c60015        	ld	a,L7401_TimeBaseStatus
2281  0187 a504          	bcp	a,#4
2282  0189 270b          	jreq	L1331
2283                     ; 245 		TimeBaseStatus &= (u8)(~SEQUENCE_COMPLETED); //	Clear Flag
2285  018b c60015        	ld	a,L7401_TimeBaseStatus
2286  018e a4fb          	and	a,#251
2287  0190 c70015        	ld	L7401_TimeBaseStatus,a
2288                     ; 246 		return ( TRUE );
2290  0193 a601          	ld	a,#1
2293  0195 81            	ret	
2294  0196               L1331:
2295                     ; 250 		return ( FALSE );
2297  0196 4f            	clr	a
2300  0197 81            	ret	
2324                     ; 255 BOOL ART_Is_TimeInMsElapsed(void)
2324                     ; 256 {
2325                     	switch	.text
2326  0198               _ART_Is_TimeInMsElapsed:
2329                     ; 257 	if ( TimeBaseStatus & MS_TIME_ELAPSED )
2331  0198 c60015        	ld	a,L7401_TimeBaseStatus
2332  019b a508          	bcp	a,#8
2333  019d 270b          	jreq	L5431
2334                     ; 259 		TimeBaseStatus &= (u8)(~MS_TIME_ELAPSED); //	Clear Flag
2336  019f c60015        	ld	a,L7401_TimeBaseStatus
2337  01a2 a4f7          	and	a,#247
2338  01a4 c70015        	ld	L7401_TimeBaseStatus,a
2339                     ; 260 		return ( TRUE );
2341  01a7 a601          	ld	a,#1
2344  01a9 81            	ret	
2345  01aa               L5431:
2346                     ; 264 		return ( FALSE );
2348  01aa 4f            	clr	a
2351  01ab 81            	ret	
2375                     ; 269 BOOL ART_IsMainTimeElapsed(void)
2375                     ; 270 {
2376                     	switch	.text
2377  01ac               _ART_IsMainTimeElapsed:
2380                     ; 271 	if ( TimeBaseStatus & MAIN_TIMEBASE_ELAPSED )
2382  01ac c60015        	ld	a,L7401_TimeBaseStatus
2383  01af a580          	bcp	a,#128
2384  01b1 270b          	jreq	L1631
2385                     ; 273 		TimeBaseStatus &= (u8)(~MAIN_TIMEBASE_ELAPSED); //	Clear Flag
2387  01b3 c60015        	ld	a,L7401_TimeBaseStatus
2388  01b6 a47f          	and	a,#127
2389  01b8 c70015        	ld	L7401_TimeBaseStatus,a
2390                     ; 274 		return ( TRUE );
2392  01bb a601          	ld	a,#1
2395  01bd 81            	ret	
2396  01be               L1631:
2397                     ; 278 		return ( FALSE );
2399  01be 4f            	clr	a
2402  01bf 81            	ret	
2426                     ; 283 BOOL ART_IsWdgTimeElapsed(void)
2426                     ; 284 {
2427                     	switch	.text
2428  01c0               _ART_IsWdgTimeElapsed:
2431                     ; 285 	if ( Status & WDG_TIMEBASE_ELAPSED )
2433  01c0 c60014        	ld	a,L1501_Status
2434  01c3 a501          	bcp	a,#1
2435  01c5 270b          	jreq	L5731
2436                     ; 287 		Status &= (u8)(~WDG_TIMEBASE_ELAPSED); //	Clear Flag
2438  01c7 c60014        	ld	a,L1501_Status
2439  01ca a4fe          	and	a,#254
2440  01cc c70014        	ld	L1501_Status,a
2441                     ; 288 		return ( TRUE );
2443  01cf a601          	ld	a,#1
2446  01d1 81            	ret	
2447  01d2               L5731:
2448                     ; 292 		return ( FALSE );
2450  01d2 4f            	clr	a
2453  01d3 81            	ret	
2502                     ; 312 void ART_Interrupt(void)
2502                     ; 313 {
2503                     	switch	.text
2504  01d4               _ART_Interrupt:
2506       00000101      OFST:	set	257
2507  01d4 88            	push	a
2510                     ; 316 	Dummy = ARTCSR;		// Clear OVF flag
2512  01d5 96            	ld	x,s
2513  01d6 b679          	ld	a,_ARTCSR
2514  01d8 d70101        	ld	(OFST+0,x),a
2515                     ; 318 	if (DebounceButton != 0) DebounceButton--;
2517  01db c60016        	ld	a,_DebounceButton
2518  01de 2707          	jreq	L7141
2521  01e0 c60016        	ld	a,_DebounceButton
2522  01e3 4a            	dec	a
2523  01e4 c70016        	ld	_DebounceButton,a
2524  01e7               L7141:
2525                     ; 320 	RegCounter--;
2527  01e7 c60013        	ld	a,L3501_RegCounter
2528  01ea 4a            	dec	a
2529  01eb c70013        	ld	L3501_RegCounter,a
2530                     ; 321 	if (RegCounter == 0)
2532  01ee c60013        	ld	a,L3501_RegCounter
2533  01f1 260e          	jrne	L1241
2534                     ; 323 		TimeBaseStatus |= REG_PERIOD_ELAPSED;	// Used in IsTestTimeBaseElapsed
2536  01f3 c60015        	ld	a,L7401_TimeBaseStatus
2537  01f6 aa02          	or	a,#2
2538  01f8 c70015        	ld	L7401_TimeBaseStatus,a
2539                     ; 324 		RegCounter = RegTimeBase; 				// Continue with same period
2541  01fb c60012        	ld	a,L5501_RegTimeBase
2542  01fe c70013        	ld	L3501_RegCounter,a
2543  0201               L1241:
2544                     ; 327 	MainCounter--;
2546  0201 ce0002        	ld	x,L7701_MainCounter
2547  0204 c60003        	ld	a,L7701_MainCounter+1
2548  0207 a001          	sub	a,#1
2549  0209 88            	push	a
2550  020a 9f            	ld	a,x
2551  020b a200          	sbc	a,#0
2552  020d c70002        	ld	L7701_MainCounter,a
2553  0210 84            	pop	a
2554  0211 c70003        	ld	L7701_MainCounter+1,a
2555                     ; 328 	if (MainCounter == 0)
2557  0214 c60003        	ld	a,L7701_MainCounter+1
2558  0217 2619          	jrne	L3241
2559  0219 ce0002        	ld	x,L7701_MainCounter
2560  021c 2614          	jrne	L3241
2561                     ; 330 		TimeBaseStatus |= MAIN_TIMEBASE_ELAPSED;// Used in ART_IsMainTimeElapsed
2563  021e c60015        	ld	a,L7401_TimeBaseStatus
2564  0221 aa80          	or	a,#128
2565  0223 c70015        	ld	L7401_TimeBaseStatus,a
2566                     ; 331 		MainCounter = MainTimeBase;  			// Continue with same period
2568  0226 ce0000        	ld	x,L1011_MainTimeBase
2569  0229 cf0002        	ld	L7701_MainCounter,x
2570  022c c60001        	ld	a,L1011_MainTimeBase+1
2571  022f c70003        	ld	L7701_MainCounter+1,a
2572  0232               L3241:
2573                     ; 334 	WdgCounter--;
2575  0232 c60010        	ld	a,L1601_WdgCounter
2576  0235 4a            	dec	a
2577  0236 c70010        	ld	L1601_WdgCounter,a
2578                     ; 335 	if (WdgCounter == 0)
2580  0239 c60010        	ld	a,L1601_WdgCounter
2581  023c 260e          	jrne	L5241
2582                     ; 337 		Status |= WDG_TIMEBASE_ELAPSED;// Used in ART_SetWatchdogRefreshPeriod
2584  023e c60014        	ld	a,L1501_Status
2585  0241 aa01          	or	a,#1
2586  0243 c70014        	ld	L1501_Status,a
2587                     ; 338 		WdgCounter = WdgTimeBase; 			// Continue with same period
2589  0246 c60011        	ld	a,L7501_WdgTimeBase
2590  0249 c70010        	ld	L1601_WdgCounter,a
2591  024c               L5241:
2592                     ; 341 	if ( !(TimeBaseStatus & TIMEOUT_LOCK))	// No TimeOut modification on-going
2594  024c c60015        	ld	a,L7401_TimeBaseStatus
2595  024f a510          	bcp	a,#16
2596  0251 2631          	jrne	L7241
2597                     ; 343 		TimeOutCounter--;
2599  0253 ce000e        	ld	x,L3601_TimeOutCounter
2600  0256 c6000f        	ld	a,L3601_TimeOutCounter+1
2601  0259 a001          	sub	a,#1
2602  025b 88            	push	a
2603  025c 9f            	ld	a,x
2604  025d a200          	sbc	a,#0
2605  025f c7000e        	ld	L3601_TimeOutCounter,a
2606  0262 84            	pop	a
2607  0263 c7000f        	ld	L3601_TimeOutCounter+1,a
2608                     ; 344 		if (TimeOutCounter == 0)
2610  0266 c6000f        	ld	a,L3601_TimeOutCounter+1
2611  0269 2619          	jrne	L7241
2612  026b ce000e        	ld	x,L3601_TimeOutCounter
2613  026e 2614          	jrne	L7241
2614                     ; 346 			TimeBaseStatus |= TIMEOUT_ELAPSED; // Used in ART_IsTimeOutElapsed
2616  0270 c60015        	ld	a,L7401_TimeBaseStatus
2617  0273 aa01          	or	a,#1
2618  0275 c70015        	ld	L7401_TimeBaseStatus,a
2619                     ; 347 			TimeOutCounter = TimeOutPeriod;    // Reload programmed period
2621  0278 ce000c        	ld	x,L5601_TimeOutPeriod
2622  027b cf000e        	ld	L3601_TimeOutCounter,x
2623  027e c6000d        	ld	a,L5601_TimeOutPeriod+1
2624  0281 c7000f        	ld	L3601_TimeOutCounter+1,a
2625  0284               L7241:
2626                     ; 351 	if ( !(TimeBaseStatus & SEQUENCE_LOCK))	// No Sequence modification on-going
2628  0284 c60015        	ld	a,L7401_TimeBaseStatus
2629  0287 a520          	bcp	a,#32
2630  0289 2631          	jrne	L3341
2631                     ; 353 		SequenceCounter--;
2633  028b ce000a        	ld	x,L7601_SequenceCounter
2634  028e c6000b        	ld	a,L7601_SequenceCounter+1
2635  0291 a001          	sub	a,#1
2636  0293 88            	push	a
2637  0294 9f            	ld	a,x
2638  0295 a200          	sbc	a,#0
2639  0297 c7000a        	ld	L7601_SequenceCounter,a
2640  029a 84            	pop	a
2641  029b c7000b        	ld	L7601_SequenceCounter+1,a
2642                     ; 354 		if (SequenceCounter == 0)
2644  029e c6000b        	ld	a,L7601_SequenceCounter+1
2645  02a1 2619          	jrne	L3341
2646  02a3 ce000a        	ld	x,L7601_SequenceCounter
2647  02a6 2614          	jrne	L3341
2648                     ; 356 			TimeBaseStatus |= SEQUENCE_COMPLETED;	// Used in ART_IsTimeOutElapsed
2650  02a8 c60015        	ld	a,L7401_TimeBaseStatus
2651  02ab aa04          	or	a,#4
2652  02ad c70015        	ld	L7401_TimeBaseStatus,a
2653                     ; 357 			SequenceCounter = SequencePeriod;		// Reload programmed period
2655  02b0 ce0008        	ld	x,L1701_SequencePeriod
2656  02b3 cf000a        	ld	L7601_SequenceCounter,x
2657  02b6 c60009        	ld	a,L1701_SequencePeriod+1
2658  02b9 c7000b        	ld	L7601_SequenceCounter+1,a
2659  02bc               L3341:
2660                     ; 361 	if ( !(TimeBaseStatus & MS_TIME_LOCK))	// No Sequence modification on-going
2662  02bc c60015        	ld	a,L7401_TimeBaseStatus
2663  02bf a540          	bcp	a,#64
2664  02c1 2631          	jrne	L7341
2665                     ; 363 		ms_Counter--;
2667  02c3 ce0006        	ld	x,L3701_ms_Counter
2668  02c6 c60007        	ld	a,L3701_ms_Counter+1
2669  02c9 a001          	sub	a,#1
2670  02cb 88            	push	a
2671  02cc 9f            	ld	a,x
2672  02cd a200          	sbc	a,#0
2673  02cf c70006        	ld	L3701_ms_Counter,a
2674  02d2 84            	pop	a
2675  02d3 c70007        	ld	L3701_ms_Counter+1,a
2676                     ; 364 		if (ms_Counter == 0)
2678  02d6 c60007        	ld	a,L3701_ms_Counter+1
2679  02d9 2619          	jrne	L7341
2680  02db ce0006        	ld	x,L3701_ms_Counter
2681  02de 2614          	jrne	L7341
2682                     ; 366 			TimeBaseStatus |= MS_TIME_ELAPSED;	// Used in ART_IsTimeOutElapsed
2684  02e0 c60015        	ld	a,L7401_TimeBaseStatus
2685  02e3 aa08          	or	a,#8
2686  02e5 c70015        	ld	L7401_TimeBaseStatus,a
2687                     ; 367 			ms_Counter = ms_TimeBase;				// Reload programmed period
2689  02e8 ce0004        	ld	x,L5701_ms_TimeBase
2690  02eb cf0006        	ld	L3701_ms_Counter,x
2691  02ee c60005        	ld	a,L5701_ms_TimeBase+1
2692  02f1 c70007        	ld	L3701_ms_Counter+1,a
2693  02f4               L7341:
2694                     ; 371 }
2697  02f4 84            	pop	a
2698  02f5 80            	iret	
2847                     	xdef	_ART_Interrupt
2848                     	switch	.bss
2849  0000               L1011_MainTimeBase:
2850  0000 0000          	ds.b	2
2851  0002               L7701_MainCounter:
2852  0002 0000          	ds.b	2
2853  0004               L5701_ms_TimeBase:
2854  0004 0000          	ds.b	2
2855  0006               L3701_ms_Counter:
2856  0006 0000          	ds.b	2
2857  0008               L1701_SequencePeriod:
2858  0008 0000          	ds.b	2
2859  000a               L7601_SequenceCounter:
2860  000a 0000          	ds.b	2
2861  000c               L5601_TimeOutPeriod:
2862  000c 0000          	ds.b	2
2863  000e               L3601_TimeOutCounter:
2864  000e 0000          	ds.b	2
2865  0010               L1601_WdgCounter:
2866  0010 00            	ds.b	1
2867  0011               L7501_WdgTimeBase:
2868  0011 00            	ds.b	1
2869  0012               L5501_RegTimeBase:
2870  0012 00            	ds.b	1
2871  0013               L3501_RegCounter:
2872  0013 00            	ds.b	1
2873  0014               L1501_Status:
2874  0014 00            	ds.b	1
2875  0015               L7401_TimeBaseStatus:
2876  0015 00            	ds.b	1
2877                     	xdef	_ART_IsWdgTimeElapsed
2878                     	xdef	_ART_SetWdgRfrshTime
2879                     	xdef	_ART_IsMainTimeElapsed
2880                     	xdef	_ART_SetMainTimeBase
2881                     	xdef	_ART_Is_TimeInMsElapsed
2882                     	xdef	_ART_Set_TimeInMs
2883                     	xdef	_ART_IsRegPeriodElapsed
2884                     	xdef	_ART_SetSpeedRegPeriod
2885                     	xdef	_ART_IsSequenceCompleted
2886                     	xdef	_ART_SetSequenceDuration
2887                     	xdef	_ART_IsTimeOutElapsed
2888                     	xdef	_ART_SetTimeOutDuration
2889                     	xdef	_ART_Start
2890                     	xdef	_ART_Init
2891  0016               _DebounceButton:
2892  0016 00            	ds.b	1
2893                     	xdef	_DebounceButton
2913                     	end

⌨️ 快捷键说明

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