SW006010 Microchip Technology, SW006010 Datasheet - Page 23

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.4.2
#include <p17c756.h>
#include <captur16.h>
#include <timers16.h>
#include <usart16.h>
void main(void)
{
}
unsigned int result;
char str[7];
// Configure Capture1
OpenCapture1(C1_EVERY_4_RISE_EDGE&CAPTURE1_CAPTURE);
// Configure Timer3
OpenTimer3(TIMER_INT_OFF&T3_SOURCE_INT);
// Configure USART
OpenUSART1(USART_TX_INT_OFF&USART_RX_INT_OFF&
while(!PIR1bits.CA1IF);
result = ReadCapture1(); // read result
uitoa(result,str);
if(!CapStatus.Cap1OVF)
{
}
CloseTimer3();
CloseUSART1();
return;
putsUSART1(str);
CloseCapture1();
Example of Use
USART_ASYNCH_MODE&USART_EIGHT_BIT&
USART_CONT_RX, 25);
Hardware Peripheral Library
// Wait for event
// convert to string
// write string
// to USART
apRNOVS^-page 19

Related parts for SW006010