;/***************************************************************************

					;版权所有

;****************************************************************************
  ;文 件 名	：Interrupt.c
  ;作    者	：xxx
  ;生成日期	：2017.05.16
  ;功能描述	：

  ;最后修改	：
  ;I.日    期	：2017.05.16
  ;作    者	：xxx
  ;修改内容	：初稿整理
;***************************************************************************/
;/*------------------------------------------------------------*
;* 文件包含									                  *
;*------------------------------------------------------------*/

;/*------------------------------------------------------------*
;* 模块配置项									              *
;*------------------------------------------------------------*/
ADCRESULT0	.set	0B00h
ADCRESULT1	.set	0B01h
ADCRESULT2	.set	0B02h
ADCRESULT3	.set	0B03h
ADCRESULT4	.set	0B04h
ADCRESULT5	.set	0B05h
ADCRESULT6	.set	0B06h
ADCRESULT7	.set	0B07h

DACVAL1		.set	6406h
DACVAL2		.set	6426h

TBCTR1		.set	06804h
TBPRDHRM1	.set	0682Ah
TBPRDHRM3	.set	068AAh
TBPRDM1		.set	0682Bh
CMPAHR1		.set	06808h
CMPAHR3		.set	06888h
CMPB1		.set	0680Ah
CMPB3		.set	0688Ah
AQCSFRC1	.set	0680Eh
AQCSFRC3	.set	0688Eh
DBFED1		.set	06811h

TIMER1TIM	.set	0C08h
PIEACK		.set	0CE1h

GPIOASET    .set	6FC2h
GPIOASETH	.set	6FC3h
GPIOACLR	.set	6FC4h
GPIOACLRH   .set	6FC5h
GPIOBSET	.set	6FCAh
GPIOBCLR	.set	6FCCh
;--------------------------------------------------------------------------

;--------------------------------------------------------------------------
;核心中断程序，300KHz(3.3us)
_isrDcdcCtrl:


_JUNP_PI_CHECK:
	MOVL         @0x16, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x26
	MOVW         DP, #0x54
	MOVL         @0x1a, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x28
	MOVW         DP, #0x54
	MOVL         @0x1e, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x2a
	MOVW         DP, #0x54
	MOVL         @0x22, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x2c
	MOVW         DP, #0x54
	MOVL         @0x26, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x2e
	MOVW         DP, #0x54
	MOVL         @0x2a, ACC

	MOVW         DP, #0x228
	MOVL         ACC, @0x30
	MOVW         DP, #0x54
	MOVL         @0x2e, ACC
	B            C$L8, UNC

C$L5:
	MOVW         DP, #0x200
	MOV          AL, @0x1c
	CMPB         AL, #0x3
	SB           C$L6, GEQ

	MOVW         DP, #0x200
	MOV          @0x14, #0

	MOV          @0x16, #0

	MOV          @0x18, #0

	MOV          @0x19, #0

	B            C$L8, UNC

C$L6:
	MOVW         DP, #0x52
	MOVL         ACC, @0xe
	MOVL         *-SP[2], ACC
	MOVB         AL, #0x0
	MOV          @AH, #0x4248
	LCR          FS$$CMP
	CMPB         AL, #0x0
	SB           C$L7, GT

	MOVW         DP, #0x200
	INC          @0x14

	MOV          @0x16, #0

	MOV          AL, @0x14
	CMPB         AL, #0xa
	B            C$L8, LO

	MOV          @0x14, #0

	MOV          @0x16, #0

	MOVB         @0x18, #0x01, UNC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVW         DP, #0x54
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x12
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x12, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x16
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x16, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x1a
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x1a, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x1e
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x1e, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x22
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x22, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x26
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x26, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x2a
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x2a, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x2e
	LCR          FS$$ADD
	MOVW         DP, #0x54
	MOVL         @0x2e, ACC
	SB           C$L8, UNC

C$L7:
	MOVW         DP, #0x52
	SETC         SXM
	MOVL         ACC, @0xe
	MOVL         *-SP[2], ACC
	MOV          ACC, #0x8490 << 15
	LCR          FS$$CMP
	CMPB         AL, #0x0
	SB           C$L8, LT

	MOVW         DP, #0x200
	INC          @0x16

	MOV          @0x14, #0

	MOV          AL, @0x16
	CMPB         AL, #0xa
	SB           C$L8, LO

	MOV          @0x14, #0

	MOV          @0x16, #0

	MOVB         @0x19, #0x01, UNC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVW         DP, #0x54
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x12
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x12, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x16
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x16, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x1a
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x1a, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x1e
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x1e, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x22
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x22, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x26
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x26, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x2a
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x2a, ACC

	MOVB         AL, #0x0
	MOV          @AH, #0x4000
	MOVL         *-SP[2], ACC
	MOVL         ACC, @0x2e
	LCR          FS$$SUB
	MOVW         DP, #0x54
	MOVL         @0x2e, ACC
	SB           C$L8, UNC
C$L8:
	SUBB         SP, #2




