piclist 2001\01\11\090528a >
Thread: Re: Bit banging Asynchronous Serial Communication
www.piclist.com/techref/microchip/ios.htm?key=serial
face picon face BY : Olin Lathrop email (remove spam text)



>  ORG 4
>
>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;
> ;; Interrupt
>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;
>
> INTERRUPT
> ;Disable Interrupts
>  bcf intcon,gie ;Disable Global

This is a waste of time.  GIE is automatically disabled by the interrupt.
That's why you have to return with RETFIE instead of RETURN.

> ;Check if TMR0 interrupt - if not then exit interrupt routine
>  btfss intcon,t0if

This will cause an infinite interrupt loop if you get something other than a
timer 0 interrupt.  Since you are only handling one interrupt and have
nothing intelligent to do if you encounter an unexpected one, I see little
point in testing which interrupt it is.

>  retfie


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinspamspamspam_OUTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-request@spam@spamKILLspammitvma.mit.edu


<004b01c07bd5$3751eba0$260bf6cd@pc> 7bit

See also: www.piclist.com/techref/microchip/ios.htm?key=serial
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Re: Bit banging Asynchronous Serial Communication

month overview.

new search...