DM163045 Microchip Technology, DM163045 Datasheet - Page 36

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
PICDEM
DS41369A-page 32
TM
• PORTC
• Timer0
3.3.6.3
Using the firmware developed in the previous lab, make the following changes:
1. Copy/paste the code in Example 3-8 at the top of the main firmware source file
EXAMPLE 3-8:
2. Copy/paste the code in Example 3-9 into the Initialize() over the code from
Lab Development Board User’s Guide
The Initialize() now configures the PIC16F690 peripherals as follows:
- Set all bits in PORTC high
- Make all PORTC pins digital output
- Use the internal instruction clock (F
- Increment TMR0 register on low-to-high transition of F
- Assign the prescaler to Timer0 and configure to increment on every 256th
/*---------------------------------------------------------
---------------------------------------------------------*/
void Delay_1S(void)
{
}
transition of F
under the heading labeled:
/**SUPPORT ROUTINES**********************************/
the previous lab.
Subroutine: Delay_1S
Parameters: none
Returns:nothing
Synopsis:Creates a 1S delay when called
//Create an 8-bit variable called counter
//and initialize it to 0
unsigned char counter = 0;
while(counter <=
{
//Make sure the T0IF is cleared
T0IF = 0;
//Clear the TMR0 register
TMR0 = 0;
//Sit here and wait for Timer0 to overflow
}
PROCEDURE
while (T0IF == 0);
++counter;
OSC
DELAY_1S() CODE FOR LAB 3
/4
15)
OSC
/4) as the TMR0 register clock source
© 2009 Microchip Technology Inc.
OSC
/4

Related parts for DM163045