please dont rip this site

Scenix Lib IO OSI2 IR DA Main

MainInfoSeg	MACRO
;********************************************************************************
;  Main Code
;********************************************************************************
		ENDM

MainCodeSeg	MACRO
;********************************************************************************
;  Main Code
;********************************************************************************

ledRX		=	ra.0
ledTX		=	ra.1
ledCON		=	ra.2
ledERR		=	ra.3

Startup
	mov	m, #TRIS
	mov	 ra, #%0000		;init Port A
	mov	!ra, #%0000		;Port A (LEDs) - Outputs

	mov	 rb, #%00001100		;init rb - UartTx (bit 2) and UartCTS (bit 3) = idle high
	mov	!rb, #%01110011		;Direction
	mov	m, #PLP
	mov	!rb, #%11001111		;Enable pullup on unused pins (bits 4 and 5)
	mov	m, #WKED
	mov	!rb, #%11111110		;IrRx (bit 6) = falling edge, UartRx (bit0) = rising edge

	clr	rc			;Init output to 0
	mov	m, #TRIS
	mov	!rc, #%10101011		;Port C (IO Port) direction - set for jumper use
	mov	m, #PLP
	mov	!rc, #%01010100		;Port C (IO Port) pullup - enabled on input pins

	clr	fsr			;reset all ram banks
:loop	setb	fsr.4
	clr	ind
	ijnz	fsr,:loop

	call	@IsrInit

	call	@a2flReset
	call	@a2plReset
	call	@a2lapReset
	call	@a2lmpReset
	call	@a2appReset

Asynchronous				;Note: flags are global
	snb	IrdaRxAvail		;Irda byte received ?
	call	@a2flRxAvail
	snb	IrdaTxEmpty		;Irda TxEmpty flag set ?
	call	@a2flTxEmpty
	snb	UartRxAvail		;Uart byte received ?
	call	@a2appRxAvail
	snb	TimerOverflow		;Timer Overflow flag set ?
	call	@a2lapTimer
	jmp	Asynchronous

;********************************************************************************

		ENDM


file: /Techref/scenix/lib/io/osi2/ir/da/MAIN.SRC, 1KB, , updated: 1999/12/6 14:37, local time: 2017/12/14 02:23,
TOP NEW HELP FIND: 
54.82.112.193:LOG IN

 ©2017 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://www.piclist.com/techref/scenix/lib/io/osi2/ir/da/MAIN.SRC"> scenix lib io osi2 ir da MAIN</A>

Did you find what you needed?

  PICList 2017 contributors:
o List host: MIT, Site host massmind.org, Top posters @20171214 RussellMc, Van Horn, David, Sean Breheny, James Cameron, alan.b.pearce, IVP, Neil, Bob Blick, David C Brown, John Gardner,
* 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 www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .