SW006010 Microchip Technology, SW006010 Datasheet - Page 61
![no-image](/images/manufacturer_photos/0/4/439/microchip_technology_sml.jpg)
SW006010
Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
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
- Current page: 61 of 160
- Download datasheet (3Mb)
2002 Microchip Technology Inc.
The ALUSTA, PCLATH, BSR and WREG are the registers that absolutely need to be
saved before we branch to the interrupt service function. However, there are other
registers used by the compiler that are worth saving under certain circumstances. The
following is an example that uses the Timer 0 Overflow Interrupt.
#include <p17c44.h>
unsigned char x;
void _ _TMR0()
{
}
void main()
{
// Install interrupt handler for timer 0 interrupt
// Set prescale value for TMR0
// Unmask TMR0 overflow interrupt
// Enable all unmasked interrupts
// Set Port B in o/p mode
}
Install
Timer 0 overflow interrupts. Then the appropriate prescale value, interrupt flag and
global interrupt enable flag are set. The program enters into an infinite loop when it
reaches the
the
displayed on LEDs.
x++;
PORTB = x;
x = 1;
Install_TMR0(_ _TMR0);
T0STA = 0b11100110;
INTSTA = 0b00000010;
CPUSTA = 0;
TRISB = 0;
while(1)
{
// Loop and wait for an interrupt to take place!
}
_ _TMR0()
_TMR0 (_ _TMR0)
while(1)
function where the value of ‘x’ is sent to PORT B and possibly
statement. When Timer 0 overflows, program control goes to
sets the function
_ _TMR0()
Runtime Environment
as the interrupt handler for
apRNOVM^-page 55
Part
Part
Part
Part
1
2
3
4
Related parts for SW006010
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1014-5.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.8VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-4.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.85VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: