SW006010 Microchip Technology, SW006010 Datasheet - Page 35

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
 2002 Microchip Technology Inc.
2.6.2
void INT_ISR(void)
{
}
void main(void)
{
}
OpenRA0INT
Device:
Function:
Include:
Prototype:
Arguments:
Remarks:
Return Value:
File Name:
Code Example:
#include<p17C756.h>
#include<int16.h>
PORTB++;
Install_INT(INT_ISR); // install INT pin interrupt vector
PORTB = 0x00;
DDRB = 0x00;
// enable external interrupt and detect rising edge
OpenRA0INT(INT_ON & INT_RISE_EDGE);
Enable();
while(PORTB != 0xFF); // wait for interrupt and check
Disable();
CloseRA0INT();
Example of Use
PIC17C4X, PIC17C756
Configures the external interrupt pin RA0/INT.
int16.h
void OpenRA0INT (static unsigned char config);
config
The value of config can be a combination of the following values
(defined in
INT_ON
INT_OFF
INT_RISE_EDGE
INT_FALL_EDGE
This function configures the RA0/INT pin for external interrupt
for interrupt on/off and edge select.
None
ra0open.c
OpenRA0INT(INT_ON);
// increment data register
// clear PORTB data register
// config PORTB as outputs
// enable global interrupts
// for max value of PORTB register
// disable global interrupts
// turn off INT pin interrupt
Hardware Peripheral Library
int16.h
):
Interrupt ON
Interrupt OFF
Interrupt on rising edge
Interrupt on falling edge
apRNOVS^-page 31

Related parts for SW006010