DM163035 Microchip Technology, DM163035 Datasheet - Page 83

KIT DEVELOPMENT PICDEM LAB

DM163035

Manufacturer Part Number
DM163035
Description
KIT DEVELOPMENT PICDEM LAB
Manufacturer
Microchip Technology
Type
MCUr
Datasheet

Specifications of DM163035

Contents
Board, Cable, Components, CD, PICkit Programmer
Processor To Be Evaluated
PIC10F, PIC12F615, PIC16F616
Data Bus Width
8 bit
Operating Supply Voltage
1.3 V to 5 V
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC10, PIC12, PIC16
Silicon Core Number
PIC10F, PIC12F, PIC16F
Silicon Family Name
PIC10F2xx, PIC12F6xx, PIC16F6xx
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC10F206, PIC16F690, PIC16F819
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2009 Microchip Technology Inc.
FIGURE 5-3:
Following the Get_Inputs(), the 10-bit ADC result is now in the ADRESH:ADRESL
registers. The Decide() assigns the ADC result value, shifted four bit positions to the
right, to the LED_Output variable.
Finally, the Do_Outputs() assigns the contents of LED_Output to the PORTC
register that will light the LEDs connected to RC0, RC1, RC2 and RC3 accordingly.
5.2.3.3
Using the Project Wizard, create a new project called ADC_Lab1.mcp. Once com-
pleted, open the ADC_Lab1.c source file in MPLAB and make the following changes:
1. Copy/paste the code in Example 5-1 into the top of the main firmware source file
EXAMPLE 5-1:
2. Copy/paste the code in Example 5-2 into the top of the main firmware source file
Analog-to-Digital Converter Peripheral Labs
unsigned char LED_Output = 0;//assigned to PORTC to light
under the heading labeled:
//----------------DATA MEMORY---------------
under the heading labeled:
//----------------SUPPORT ROUTINES---------------
Gives ADC capacitor time to charge
PROCEDURE
Wait for ADC to complete
MAIN() SOFTWARE CONTROL LOOP FLOWCHART FOR
COMPARATOR LAB 1
GLOBAL VARIABLES USED IN LAB 1
Start conversion by setting
//connected LEDs
Get_Inputs()
Delay_1mS()
GO/DONE = 1
GO/DONE bit
END
?
NO
YES
DS41369A-page 79

Related parts for DM163035