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

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
© 2007 Microchip Technology Inc.
EXAMPLE 3-10:
Lesson 11 adds a Moving Average Filter to the Analog-to-Digital code in Lesson 4.
Turning the potentiometer changes the value read by the Analog-to-Digital converter.
The averaged value is then sent to the LED display. The averaging filter only runs every
0.2 seconds to slow down the display changes and make it visible. The display appears
to count from the old potentiometer position to the new position.
The filter averages the last 8 readings. Choosing a power of two for the number of sam-
ples allows division by simple rotates instead of having to use a true division routine.
Additionally, rather than summing the array every time, it’s faster to keep a running
sum, then subtract out the oldest value in the queue and adding in the new value.
INCF
;insert new value into a queue, enter with new value in
;Wreg
MOVF
MOVF
MOVWF
MOVF
MOVWF
QueuePointer, f
temp
QueuePointer,w
FSR
temp,w
INDF
FILE SELECT REGISTER EXAMPLE
44-Pin Demo Board Lessons
;Advance the pointer
;save the latest value
;load FSR with the queue pointer
;Write the new value to the queue
DS41296B-page 31

Related parts for DM164120-2