DM163035+TEFLCST3 Microchip Technology, DM163035+TEFLCST3 Datasheet - Page 82

no-image

DM163035+TEFLCST3

Manufacturer Part Number
DM163035+TEFLCST3
Description
KIT, PICDEMLAB+FLOWCODE-HOME BUNDLE/
Manufacturer
Microchip Technology
Datasheet

Specifications of DM163035+TEFLCST3

Kit Contents
Component Kit, PICDEM Lab Development Board, PICkit 2 Programmer/ Debugger, CD Containing User Guide
Svhc
No SVHC (15-Dec-2010)
Development Tool Type
Hardware / Software - Dev
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC10, PIC12, PIC16
Silicon Core Number
PIC10F, PIC12F, PIC16F
Silicon Family Name
PIC10F2xx, PIC12F6xx, PIC16F6xx
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PICDEM
DS41381A-page 78
TM
3.2.6.3
1. Create a new project in Flowcode using steps 1-9 from GPIO_Lab1 in the
2. Create a new macro for the Initialize functional block. Rename the macro
FIGURE 3-12:
The Properties: C Code window should now resemble Figure 3-13.
Lab Flowcode Companion Guide
//Comparator 2 Initialization
trisc.TRISC4 = 0; //set the RC4/C2OUT pin as output
cm2con0 = 0b10100001; //configure Comparator 2
//TMR0 Clock Source Initialization
//Make RA2/T0CKI pin a digital input
trisa.TRISA2 = 1;
ansel.ANS2 = 0;
preceding chapter saving the project as Comparator_Lab3.fcf in the
C:\PICDEM_Lab\flowcode\Comparator_Labs\Comparator_Lab3
directory.
Init_Peripherals and provide a description. Within the macro flowchart,
drag/drop a C Code icon that will be used to initialize the Comparator 2 and
Timer0 peripherals and pins. Double-click on the C Code icon to open the
Properties: C Code window and rename to Init_C2_TMR0 adding the following
lines of C code to the “C Code:” section:
-1 TMR0 increment:128 clock source pulse
-1 TMR0 increment: 256 clock source pulse
PROCEDURE
ADDING LINES OF C CODE
//Turn on Comparator 2
//Enable Comparator 2 output on the
//C2OUT pin
//Connect Comparator non-inverting
//reference to RC0/C2IN+ pin
//to RC1/C12IN1- pin
//Connect Comparator inverting reference
© 2009 Microchip Technology Inc.

Related parts for DM163035+TEFLCST3