DM164120-1 Microchip Technology, DM164120-1 Datasheet - Page 19

BOARD DEMO PICKIT 2 LP COUNT

DM164120-1

Manufacturer Part Number
DM164120-1
Description
BOARD DEMO PICKIT 2 LP COUNT
Manufacturer
Microchip Technology
Type
MCUr
Datasheet

Specifications of DM164120-1

Contents
3 Boards (1 Populated, 2 Bare)
Processor To Be Evaluated
PIC16F690
Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC16
Silicon Core Number
PIC16F
Silicon Family Name
PIC16F6xxx
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
28-pin PIC16C, 16F, 18C, 18F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM164120-1
Manufacturer:
Microchip Technology
Quantity:
135
© 2005 Microchip Technology Inc.
3.2.2
The first lesson showed how to turn on a LED, this lesson shows how to make it blink.
While this might seem a trivial change from Lesson 1, the reasons will soon become
apparent.
New Instructions
EXAMPLE 3-2:
While adding a BCF instruction and making it loop will make it blink, it will blink so fast
you won’t see it. It will only look dim. That loop requires 4 instruction times to execute.
The first instruction turns it on. The second one turns it off. The GOTO takes two instruc-
tion times, which means it will be on for 25% of the time.
As configured, the PICmicro executes 1 million instructions per second. At this rate, the
blinking needs to be slowed down so that the blinking can be seen, which can be done
by using a delay loop.
Note:
CLRF
INCF
DECF
INCFSZ
DECFSZ
GOTO
Loop
BSF
BCF
GOTO
Lesson 2: Delay Loop (Blink a LED)
Counting cycles – Relating clock speed to instruction speed. The processor
requires 4 clocks to execute an instruction. Since the internal oscillator as
used in these lessons runs at 4 MHz, the instruction rate is 1 MHz.
PORTC,0
PORTC,0
Loop
PICkit 2, LESSON 2: BLINK
Clear file register
Increment file register
Decrement file register
Increment file register, Skip next instruction if zero
Decrement file register, Skip next instruction if zero
Jump to a new location in the program
;turn on LED C0
;turn off LED C0
;do it again
LPC Demo Board Lessons
DS51556A-page 15

Related parts for DM164120-1