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

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.7
Lesson 7 combines Lessons 5 and 6 using the button to reverse the direction of rotation
when the button is pressed and adjusting the potentiometer to control the speed of
rotation.
The program needs to keep track of rotation direction and new code needs to be added
to rotate in the other direction.
Lesson 5 rotates right and checks for a ‘1’ in the Carry bit to determine when to restart
the sequence. In Lesson 7, we’ll also need to rotate left and check for a ‘1’ in bit 4 of
the display. When the ‘1’ shows up in bit 4 of the display, re-insert it into the bit 0
position.
EXAMPLE 3-6:
Original Version:
Rotate
Bidirectional Version:
Rotate
RotateRight
RotateLeft
RRF
BTFSC STATUS,C
BSF
BCF
BTFSS Direction,0
GOTO
RRF
BTFSC STATUS,C
BSF
GOTO
RLF
BTFSC Display,4
BSF
GOTO
Lesson 7: Reversible Variable Speed Rotate
Display,f
Display,3
STATUS,C
RotateLeft
Display,f
Display,3
MainLoop
Display,f
Display,0
MainLoop
REVERSIBLE VARIABLE SPEED ROTATE EXAMPLE
;Did the bit rotate into the carry?
;yes, put it into bit 3.
;ensure the carry bit is clear
;Did the bit rotate into the carry?
;yes, put it into bit 3.
;did it rotate out of the display
;yes, put it into bit 0
LPC Demo Board Lessons
DS51556A-page 25

Related parts for DM164120-1