Microchip Technology SW006021-1N Manuel D’Utilisation
![Microchip Technology](https://files.manualsbrain.com/attachments/cf42c3c895ef469f06d2e47e97fd98d738fcf5cf/common/fit/150/50/7340124dc8aa983aaf764094e2f06faab86f306c03111c5817f7e4e53fb2/brand_logo.gif)
Library Functions
2012 Microchip Technology Inc.
DS52053B-page 317
Example
#include <xc.h>
void
main (void)
{
control |= 0x80;
_delay(10); // delay for 10 cycles
control &= 0x7F;
}
See Also
_delay3(), __delay_us()
, __delay_ms()
_DELAY3()
Synopsis
#include <xc.h>
void _delay3(unsigned char cycles);
Description
This is an inline function that is expanded by the code generator. When called, this rou-
tine expands to an inline assembly delay sequence.The sequence will consist of code
that delays for 3 times the number of cycles that is specified as argument. The argu-
ment can be a byte-sized constant or variable.
tine expands to an inline assembly delay sequence.The sequence will consist of code
that delays for 3 times the number of cycles that is specified as argument. The argu-
ment can be a byte-sized constant or variable.
Example
#include <xc.h>
void
main (void)
{
control |= 0x80;
_delay(10); // delay for 30 cycles
control &= 0x7F;
}
See Also
_delay
ABS
Synopsis
#include <stdlib.h>
int abs (int j)
Description
The abs() function returns the absolute value of j.