please dont rip this site

PIC Microcontoller Delay Method

Delay X cycles (7-1030) exclusive (11 to 1034 cycles inclusive of call and return)

From Dwayne Reid

;10 bit delay routine providing 1 cycle resolution.  Works with both 12 & 14 bit core PICs.
;Original idea from Mike Harrison.  This version by Dwayne Reid
;
;enters with upper 8 bits of delay in DELAYU, lower 2 bits in bits 1,0 of DELAYL
;bits 7..2 in DELAYL can be used as flags for whatever purpose desired.
;returns with W destroyed
Delay10bit      ;delay is 10 bit value + 7 cycles ( + call + return, if any)
     incf        DELAYU,F        ;correct for dec & test instead of test & dec
Dly10bLoop
     comf        DELAYL,W        ;invert LSBs
     decfsz      DELAYU,F
       goto      Dly10bLoop      ;coarse delay to closest 4 cycles
     andlw       b'00000011'
     addwf       PCL,F
     nop
     nop
     nop


file: /Techref/microchip/delay/10b1cr15m-dr.htm, 1KB, , updated: 2001/1/10 14:37, local time: 2024/11/23 08:30,
TOP NEW HELP FIND: 
18.190.153.77: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://techref.massmind.org/Techref/microchip/delay/10b1cr15m-dr.htm"> PIC Microcontoller Delay Method - Delay X cycles (7-1031) exclusive</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .