DM164120-2 Microchip Technology, DM164120-2 Datasheet - Page 34

BOARD DEMO PICKIT 2 44PIN

DM164120-2

Manufacturer Part Number
DM164120-2
Description
BOARD DEMO PICKIT 2 44PIN
Manufacturer
Microchip Technology
Type
MCUr
Datasheets

Specifications of DM164120-2

Contents
3 Boards (1 Populated, 2 Bare)
Processor To Be Evaluated
PIC16F
Silicon Manufacturer
Microchip
Kit Contents
PIC16F Device, 2 PCB Boards
Features
Small Surface Mount Prototype Area, Two Bare PCB Boards
Development Tool Type
Hardware - Daughter Card
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC16F887
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DM164120-2
Manufacturer:
Microchip Technology
Quantity:
135
44-Pin Demo Board User’s Guide
DS41296B-page 30
FIGURE 3-10:
3.2.11
The FSR (File Select Register) allows a file register address to be specified. A subse-
quent read or write to the INDF (Indirect File register) refers to the file register
addressed by the FSR.
This may be used to implement a moving average filter. The moving average keeps a
list of the last n values and averages them together. The Filter needs two parts: A
circular queue and a function to calculate the average.
FIGURE 3-11:
Calculating averages in a mid-range PIC microcontroller is best accomplished by using
the FSR to keep track of where the next value will be inserted. This ensures the oldest
value is always overwritten with the newest and doesn’t waste time moving values
within the memory.
Conceptual View
Implementation View
Time
Time
n + 1
n + 2
n + 1
n + 2
Newest value inserted here
n
n
Lesson 11: Indirect Data Addressing
105
106
107
106
106
110
The rest move down one
Before
SWAPF INSTRUCTION
MOVING AVERAGES
After
102
105
106
105
105
110
Pointer to oldest value
101
102
105
101
102
103
Older value overwritten, pointer advanced
1 0 1 0
0 0 1 1
104
101
102
104
101
Pointer advanced
99
104
101
99
99
99
99
0 0 1 1
1 0 1 0
103
104
101
101
101
99
© 2007 Microchip Technology Inc.
105
103
102
102
102
99
107
105
103
105
105
105
Average
Average
103
103
104
103
103
104

Related parts for DM164120-2