SW006010 Microchip Technology, SW006010 Datasheet - Page 103

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.
To enable the Capture4 interrupt, you must clear the following bit flags:
• The Peripheral Interrupt Request Register2’s (PIR2’s) Capture4 Interrupt Flag
• The Capture4 Overflow Status (CA4OVF) bit – [TCON3<6>].
• The INTSTA register’s Peripheral Interrupt Flag (PEIF) bit – [INTSTA<7>]. This
11.3.2.12 USART1 TRANSMIT INTERRUPT
There are two ways to enable the USART1 Transmit Interrupt:
Library Call
To enable the USART1 Transmit Interrupt through a library call, you must include the
usart16.h
also allows you to configure the USART1. For more information on how to configure
the USART1, please refer to the MPLAB CXX Reference Guide (DS51224). The
following code snippet only shows how you would go about enabling the USART1
Transmit Interrupt.
Modifying Register Bits
This section only discusses the bits necessary to enable the USART1 Transmit
Interrupt. For information on configuring the USART1, please refer to the section in
the appropriate data sheet on the Transmit Status and Control Register (TXSTA).
PIC17C7XX DEVICES
To enable the USART1 transmit interrupt for PIC17C7XX devices, you must clear the
following bit flags:
• The Peripheral Interrupt Request Register1’s (PIR1’s) USART1 Transmit Interrupt
• The INTSTA register’s Peripheral Interrupt Flag (PEIF) bit – [INTSTA<7>]. This
(CA4IF) bit – [PIR2<3>].
clears any previous occurrences of Capture4 interrupts. In addition, you must set
the following enable bits:
- The Peripheral Interrupt Enable Register2’s (PIE2’s) Capture4 Interrupt
- The INTSTA register’s Peripheral Interrupt Enable (PEIE) bit – [INTSTA<3>].
#include <usart16.h>
OpenUSART1(USART_TX_INT_ON, 25);
Flag (TX1IF) bit – [PIR1<1>].
clears any previous occurrences of USART1 transmit interrupts. In addition, you
must set the following enable bits:
- The Peripheral Interrupt Enable Register1’s (PIE1’s) USART1 Transmit
- The INTSTA register’s Peripheral Interrupt Enable (PEIE) bit – [INTSTA<3>].
Enable (CA4IE) bit – [PIE2<3>].
Interrupt Enable (TX1IE) bit – [PIE1<1>].
TCON3bits.CA4OVF = 0;
PIR2bits.CA4IF = 0;
PIE2bits.CA4IE = 1;
INTSTAbits.PEIF = 0;
INTSTAbits.PEIE = 1;
PIR1bits.TX1IF = 0;
PIE1bits.TX1IE = 1;
INTSTAbits.PEIF = 0;
INTSTAbits.PEIE = 1;
header file and call the
Enabling/Disabling Interrupts
OpenUSART1
function. The
OpenUSART1
apRNOVM^-page 97
function
Part
Part
Part
Part
1
2
3
4

Related parts for SW006010