SW500009 Microchip Technology, SW500009 Datasheet - Page 197
SW500009
Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet
1.SW500009.pdf
(444 pages)
Specifications of SW500009
Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
778-1003
778-1003
- Current page: 197 of 444
- Download datasheet (3Mb)
Library Functions
DI, EI
Synopsis
Description
The di() and ei() routines disable and re-enable interrupts respectively. These are implemented as
macros defined in pic.h. The example shows the use of ei() and di() around access to a long
variable that is modified during an interrupt. If this was not done, it would be possible to return an
incorrect value, if the interrupt occurred between accesses to successive words of the count value.
Example
#include <htc.h>
void ei (void)
void di (void)
#include <htc.h>
long count;
void
interrupt tick (void)
{
}
long
getticks (void)
{
}
count++;
long val;
di();
val = count;
ei();
return val;
/* Disable interrupts around access
to count, to ensure consistency.*/
183
Related parts for SW500009
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: