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

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 18
Rotate
The rotate instructions (RRF or RLF) shift all the bits in the file register right or left by
one position, through the Carry bit. The Carry bit is shifted into the byte and receives
the bit shifted out of the byte. The Carry bit should be cleared before rotation so
unwanted bits are not introduced into the display byte. The Carry bit also indicates
when the display byte is empty. When it is, reinsert the ‘1’ at bit 3.
PIC microcontrollers have two rotate instructions: Rotate Left (RLF) and Rotate Right
(RRF). These instructions rotate the contents of a file register and Carry bit one place.
The Carry bit is found in the STATUS Special Function Register.
FIGURE 3-2:
EXAMPLE 3-4:
Start:
MainLoop:
OndelayLoop:
BSF
CLRF
BCF
MOVLW
MOVWF
MOVF
MOVWF
DECFSZ
GOTO
DECFSZ
GOTO
BCF
RRF
BTFSC
BSF
GOTO
STATUS,RP0 ; select Register Bank 1
TRISD
STATUS,RP0 ; back to Register Bank 0
0x80
Display
Display,w
PORTD
Delay1,f
OndelayLoop
Delay2,f
OndelayLoop
STATUS,C
Display,f
STATUS,C
Display,7
MainLoop
ROTATE LEFT
ROTATE EXAMPLE
Carry
; make IO PortD all output
; Copy the display to the LEDs
; Delay .197 s
; ensure the carry bit is clear
; rotate display right
; Did the bit rotate into the carry?
; yes, put it into bit 7.
File Register
© 2007 Microchip Technology Inc.

Related parts for DM164120-2