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

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
Low Pin Count Demo Board User’s Guide
DS51556A-page 16
Increment or Decrement a File Register
EXAMPLE 3-3:
The GOTO Loop (in Example 3-3) backs up and does it again. This loop takes 3
instruction times; one for the decrement and two for the GOTO (see note) and the
counter will force it to go around 256 times, which takes it a total of 768 instruction times
(768 μs) to execute.
Even that is still too fast for the eye to see. It can be slowed down even more by adding
a second loop around this one.
The inner loop still takes 768 μs plus 3 for the outer loop, but now it’s executed another
256 times, 771 * 256 = 197376 μs = 0.197s.
Open Blink.asm and build the lesson. Next, import the hex file into the PICkit 2 and
program the device. Note the LED now flashes at about a 2 Hz rate.
Note:
CLRF
DECFSZ
Short Loop
Loop
Long Loop
Loop
The INCFSZ and DECFSZ instructions add or subtract one from the contents of
the file register and skips the next instruction when the result is zero. One use is
in the delay loop as shown in Example 3-3.
CLRF
DECFSZ
GOTO
CLRF
CLRF
DECFSZ
GOTO
DECFSZ
GOTO
GOTO instructions take two instructions due to the pipelined design of the
processor. The processor fetches the next instruction while executing the
current instruction. When a program branch occurs, the fetched instruction
is not executed.
Clears the counter location.
Decrements the location, and if the result is zero, the next
instruction is skipped.
Delay
Delay,f
Loop
Delay1
Delay2
Delay1,f
Loop
Delay2,f
Loop
DELAY LOOP
© 2005 Microchip Technology Inc.

Related parts for DM164120-1