please dont rip this site

Scenix Lib IO OSI2 Parallel ADC08831SAMPLE.SRC

		device sx28l,stackx_optionx
		device oscxt5,turbo
		freq 50000000
		reset reset_entry

		org 10h
dato		ds	 1

CLK	equ	rb.6
D0	equ	rb.7
CS	equ	rb.5
;****************************************************************************************************************
;****************************************************************************************************************
salidapuerto	jmp	@salida_puerto
		ret
conversion	jmp	@conver_sion
		ret
sacodato	jmp	@saco_dato
		ret
pausa		jmp	@pau_sa
		ret
;****************************************************************************************************************
		org	50h
reset_entry 	
	 	mov	 rc,#%00000000 			;init rc
		mov 	 !rc,#%00000000
	 	mov	 rb,#%00100000 			;init rb
		mov 	 !rb,#%10000010
		mov	w,#$0E		;
		mov	M,w		;
 		mov	!rb,#%011111111	;
		mov	w,#$0F		;
		mov	M,w		;

		clrb	CLK
		setb	CS
;****************************************************************************************************************
; MAIN
;****************************************************************************************************************
;
principal
		call 	@conversion
		mov	rc,dato
		call	@salidapuerto
		jmp	principal

;******************************************************************************************************************
		org	400
;****************************************************************************************************************
;   SUBRUTINAS
;****************************************************************************************************************
salida_puerto
		clrb	rb.0	 ; WAIT line
nopasa		snb	rb.1	 ; Data Strobe line 
		jmp	nopasa	 ; 
		nop
		setb	rb.0
yafue		sb	rb.1	 ; finish the handshaking when the rb.1 is high 
		jmp	yafue
		retp
;****************************************************************************************************************
conver_sion			; devuelve el valor leido del conversor en la variable DATO.
		mov	dato,#0
		clrb	CLK
		clrb	CS
		call	@pausa
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
;
		call	@sacodato
;
		setb	CLK
		call	@pausa
		clrb	CLK
		call	@pausa
		setb	CS
		retp
;****************************************************************************************************************
saco_dato
		snb	D0             ; comparo el D0 para ver si era alto
		jmp	@cenalto
		jmp	@cenbajo
cenalto		setb	$03.0
		rl	dato            ;
		retp
cenbajo		clrb	$03.0
		rl	dato            ;
		retp
;****************************************************************************************************************
pau_sa					; 0.25 uSeg minimo total 13 ciclos de reloj a 50 Mhz
		nop
		nop
		nop
		nop
		nop
		retp
;****************************************************************************************************************













file: /Techref/scenix/lib/io/osi2/parallel/ADC08831sample.SRC, 3KB, , updated: 2002/2/14 17:03, local time: 2024/4/12 23:41,
TOP NEW HELP FIND: 
3.227.240.72:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://piclist.com/techref/scenix/lib/io/osi2/parallel/ADC08831sample.SRC"> scenix lib io osi2 parallel ADC08831sample</A>

Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .