DM163045 Microchip Technology, DM163045 Datasheet - Page 75

no-image

DM163045

Manufacturer Part Number
DM163045
Description
PICDEM Lab Development Kit (with PICkit 3) General Purpose
Manufacturer
Microchip Technology
Series
PICDEM™r
Type
MCUr
Datasheet

Specifications of DM163045

Contents
Board, PIC kit 3
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
PIC Micro® MCU

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM163045
Manufacturer:
MICROCHIP
Quantity:
12 000
© 2009 Microchip Technology Inc.
FIGURE 4-7:
The TMR0_ISR() first checks if a Timer0 interrupt has occurred (good programming
practice). If so, then the Timer0 interrupt flag is cleared and Timer1 is turned off to stop
counting the oscillator clock pulses on the T1CKI pin. Next, the 4 MSbs of the Timer1
16-bit result is assigned to the RC0, RC1, RC2 and RC3 pins to light the associated
LEDs. Finally, the Timer1 result register pair are cleared and Timer1 is turned on to
begin a new count.
4.2.6.3
Using the firmware developed in the previous lab, make the following changes:
1. Copy/paste the code in Example 4-4 into the top of the main firmware source file
under the heading labeled:
//----------------INTERRUPT CODE---------------
PROCEDURE
TMR0_ISR FLOWCHART FOR COMPARATOR LAB 3
Assign PORTC the T1MRH value
Clear the Timer1 result register
shifted 4 bits to the right
pair TMR1H:TMR1L
Clear T0IF Flag
Turn off Timer1
Turn on Timer1
TMR0_ISR()
Comparator Peripheral Labs
T0IF = 1
?
YES
NO
Keep PORTC the same
END
DS41369A-page 71

Related parts for DM163045