This is file Delay.c
This file is part of HX711 routines
//============================================================================== #include <pic.h> #include "Delay.h" //============================================================================== unsigned char _Delay_us( unsigned char t ) { asm( " clrf 3 " ); asm( "_Delay_us01: clrwdt " ); asm( " addlw -1 " ); asm( " btfsc 3,0 " ); asm( " goto _Delay_us01 " ); asm( " return " ); return t; } /*============================================================================*/ void Delay_ms( unsigned short t ) { asm( "clrf 3" ); asm( "movlw 250" ); asm( "clrwdt" ); asm( "nop" ); asm( "goto $+1" ); asm( "goto $+1" ); asm( "addlw -1" ); asm( "btfss 3, 2" ); asm( "goto $-6" ); asm( "movlw 249" ); asm( "clrwdt" ); asm( "nop" ); asm( "goto $+1" ); asm( "goto $+1" ); asm( "addlw -1" ); asm( "btfss 3, 2" ); asm( "goto $-6" ); asm( "nop" ); asm( "movf ?_Delay_ms+0,f" ); asm( "btfsc 3,2" ); asm( "decf ?_Delay_ms+1,f" ); asm( "decf ?_Delay_ms+0,f" ); asm( "movf ?_Delay_ms+0,w" ); asm( "iorwf ?_Delay_ms+1,w" ); asm( "btfss 3,2" ); asm( "goto $-24" ); } //==============================================================================
file: /Techref/member/IMB-yahoo-J86/delay.c.htm, 1KB, , updated: 2019/8/20 03:16, local time: 2024/11/17 19:39,
owner: IMB-yahoo-J86,
18.189.184.250: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? <A HREF="http://massmind.ecomorder.com/Techref/member/IMB-yahoo-J86/delay.c.htm"> <PRE></PRE></A> |
Did you find what you needed? |