
Read_Sig:
	lcall	InitPowerUp

	mov	dptr,#Sigbits_Str	;
	lcall	print_string
	mov	r7,#002h		;2 bytes to receive

	setb	Prog	
	clr	P33
	clr	P34
	clr	P35
	clr	P37
	
	lcall Delay                ;385.50us @ 16 MHz
	
	mov	a,#0ffh
	mov	P1,a			
	nop
	nop

Read_Sig1:
	mov	a, P1
	lcall	h2a			;print ascii to terminal with space
	lcall	PulseXtal		;inc address counter
	djnz	r7,Read_Sig1		;read 2 bytes
	
	ljmp	End_Prog		;end prog
;------------------------------------------------------
;resets device,leaves 5V connected to reset
InitPowerUp:
	setb	LM317			;disconnect VPP from reset, leaving reset low
	clr	Xtal			;ensure LOW
	setb	Vpp			;5V to reset
	clr	LM317			;join Vpp to reset
	setb	Busy			;Busy = input
	setb	Prog			;keep Prog high
	lcall	Del_100mS		;100mS Delay
	ret				;
;------------------------------------------------------
;pulse Xtal1 to increment address counter by one.
PulseXtal:
	setb	Xtal
	nop
	nop
	clr	Xtal
	ret
