 

;****************************************************************
;
;       RESETCKT.ASM  - EXP40 program to reset P89LPC9408 into
;       ISP mode
;       BERT VAN DEN BERG
;  
;       20/05/06 Ver10	Initial Version 
;
; TO DO:
;
; NOTES:
;
;	11.06Mhz reasonator 
;	RS2323 serial input (P3.0) connected to P89LPC9408 Vcc
;	P89LPC9408 Reset input (P1.5) connected to P1.0
;	Power up RESET CIRCUIT and then turn on power to 
;       P89LPC9408
;
$MOD52
$NOPAGING
$PAGEWIDTH(132)
;
;
;
        	CSEG
	ORG     00H
;
        SETB    P3.0
START:	CLR	P1.0
	JB	P3.0,START
;
	CALL	Dly1S
;
	SETB	P1.0		;1 - toggle reset high
	CALL	Dly16uS
	CLR	P1.0
	CALL	Dly16uS
;
	SETB	P1.0		;2
	CALL	Dly16uS
	CLR	P1.0
	CALL	Dly16uS
;
	SETB	P1.0		;3
	CALL	Dly16uS
	CLR	P1.0
	CALL	Dly16uS
;
DONE:	SETB	P1.0		;keep reset high
	CALL	Dly16uS
	JMP	Done
;
;
Dly1S:	MOV	R4,#175		;1 second delay for transients
DSb:	MOV	R3,#175
DSc:	MOV	R2,#175
DSf:	call	Dly16uS
	djnz	R2,DSf
	djnz	R3,DSc
	djnz	R4,DSb
;
Dly16uS:
	MOV	R1,#6		
	DJNZ	R1,$		;Approx 12uS +2 +2
	RET			
;

;
	END

