DM163035 Microchip Technology, DM163035 Datasheet - Page 39

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.
The Decide() first checks the current value in LED_Output for two specific condi-
tions:
• Is the Most Significant bit ‘1’? This means that on the next shift, the contents will
• Is the value currently a ‘0’?
If either condition exists, the function re-initializes LED_Output to set the Least Signif-
icant bit. Otherwise, there will be a period when none of the LEDs are lit.
The shift is implemented in code as follows:
LED_Output <<= 1;
This translates to: “LED_Output is equal to the current contents of LED_Output
shifted to the left by 1 bit position”
Conversely, to shift the bit to the right the code would be as follows:
LED_Output >>= 1;
The Do_Outputs() will then assign the contents of the LED_Output variable to the
PORTC register and whichever bit is high will light the connected LED. (See
Figure 3-17.)
FIGURE 3-17:
The Initialize() now configures the PIC16F690 peripherals as follows:
• PORTC
• Timer0
• Initialize the LED_Output variable to ‘0’
Next time through main():
First time through main():
LED_Output variable
LED_Output variable
be all ‘0’s.
- Initialize PORTC so that the 7 Most Significant bits are ‘0’ and the Least
- 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
0
0
Initialize() determines initial
Significant bit is ‘1’
transition of F
LED_Output Left by 1 bit position
0
Decide() shifts contents of
0
contents of LED_Output
0
0
0
0
General Purpose Input/Output Labs
OSC
0
0
RESULTS OF DO_OUTPUT()
/4
0
0
0
1
1
0
LED_Output to
Do_Outputs()
LED_Output to
Do_Outputs()
PORTC
assigns
assigns
PORTC
OSC
/4) as the TMR0 register clock source
PORTC
0
PORTC
0
0
0
0
Corresponding LED lights
0
Corresponding LED lights
OSC
0
0
/4
0
0
0
0
DS41369A-page 35
0
1
1
0

Related parts for DM163035