SW006011 Microchip Technology, SW006011 Datasheet - Page 48

C COMPILER FOR 18XXXXX FAMILY

SW006011

Manufacturer Part Number
SW006011
Description
C COMPILER FOR 18XXXXX FAMILY
Manufacturer
Microchip Technology
Type
MPLAB® PIC18 C Compilerr
Datasheets

Specifications of SW006011

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC18
Core Architecture
PIC
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
SW006011
Manufacturer:
Microchip Technology
Quantity:
135
MPLAB
apRNOVR^-page 44
C18 C Compiler Getting Started
void InitializeBuzzer (void)
{
}
void SoundBuzzer (void)
{
}
void main (void)
{
}
T2CON = 0x05;
TRISCbits.TRISC2 = 0;
PR2 = 0x80;
CCPR1L = 0x80;
CCP1CON = 0x0F;
while (1);
EnableHighInterrupts ( );
InitializeBuzzer ( );
OpenRB0INT (PORTB_CHANGE_INT_ON & /* enable the RB0/INT0 interrupt */
SoundBuzzer ( );
PORTB_PULLUPS_ON &
FALLING_EDGE_INT);
/* turn the buzzer on */
/* wait for the S3 button to be pressed */
/* postscale 1:1, Timer2 ON, prescaler 4 */
/* configure the CCP1 module for the buzzer */
/* initialize the PWM period */
/* initialize the PWM duty cycle */
/* configure the RB0 pin for input */
/* trigger interrupt upon S3 button
depression */
2002 Microchip Technology Inc.

Related parts for SW006011