Exact match. Not showing close matches.
'[PIC]: ISR snippet'
Just looking through my code to try to reduce some cycles and came up with
this method for compensating for lost time during ISR servicing.
If you're doing a PWM loop or otherwise performing some loop count timing
and get interrupted, you might be able to compensate for the lost time with:
;; No context saving required.
btfsc flag, 0 ; to indicate whether or not you're inside PWM loop
decfsz counter ; loop counter for PWM
Note that the last incfsz (not incf!) is needed so your counter doesn't go
below zero, which could hurt if you're using decfsz to monitor your loop
counter. It would never skip the last retfie.
Of course, the path through the ISR has to be equal in time to the time
through one PWM loop for this to be at all valuable.
Just thought I'd throw it out there as a useful snippet if anyone is
Get your FREE download of MSN Explorer at http://explorer.msn.com
http://www.piclist.com hint: To leave the PICList
> ;; No context saving required.
> btfsc flag, 0 ; to indicate whether or not you're inside PWM loop
> decfsz counter ; loop counter for PWM
> incfsz counter
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- New search...