Low Pin Count Demo Board User’s Guide
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.
PICmicro MCUs 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.
FIGURE 3-2:
ROTATE LEFT
Carry
File Register
EXAMPLE 3-4:
Start
ROTATE EXAMPLE
BSF
CLRF
BCF
MOVLW
MOVWF
MainLoop
MOVF
STATUS,RP0
TRISC
STATUS,RP0
0x08
Display
Display,w
;select Register Page 1
;make I/O PORTC all output
;back to Register Page 0
;Copy the display to the LEDs
MOVWF
OndelayLoop
DECFSZ
GOTO
DECFSZ
GOTO
PORTC
Delay1,f
OndelayLoop
Delay2,f
OndelayLoop
;Delay .197S
BCF
RRF
BTFSC
BSF
STATUS,C
Display,f
STATUS,C
Display,3
;ensure the carry bit is clear
;Rotate Display right
;Did the bit rotate into the carry?
;yes, put it into bit 3.
DS51556A-page 18
GOTO
MainLoop
? 2005 Microchip Technology Inc.
相关PDF资料
DM164120-3 BOARD DEMO PICKIT2 28-PIN
DM164120-5 BOARD DEMO PICKIT 2 64/80-PIN
DM164123 KIT MANAGEMENT SYSTEM PICDEM
DM180021 KIT STARTER MPLAB FOR PIC18F MCU
DM183022 BOARD DEMO PIC18FXX22 64/80TQFP
DM183032 BOARD EXPLORER PICDEM PIC18
DM240001 BOARD DEMO PIC24/DSPIC33/PIC32
DM240002 BOARD DEV EXPLORER 16 44-PIN
相关代理商/技术参数
DM164120-1 制造商:Microchip Technology Inc 功能描述:DEVELOPMENT TOOLS - PICKIT 2 LOW PIN COU
DM164120-2 功能描述:开发板和工具包 - PIC / DSPIC PICkit 2 44-Pin Count Demo Brd RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM164120-3 功能描述:开发板和工具包 - PIC / DSPIC PICkit 2 Count Demo Board RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM164120-4 功能描述:开发板和工具包 - PIC / DSPIC PICkit 2 1 Dem Board RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM164120-4 制造商:Microchip Technology Inc 功能描述:PICkit 2 18-Pin Demo Board
DM164120-4/16F1827/PG164130 制造商:Microchip Technology Inc 功能描述:PICKIT PIC16F648A DEMO BOARD 制造商:Microchip Technology Inc 功能描述:KIT STARTER 18PIN F1 ENHANCED CORE 制造商:Microchip Technology Inc 功能描述:PICKIT, PIC16F648A, DEMO BOARD 制造商:Microchip Technology Inc 功能描述:PICKIT, PIC16F648A, 18 PIN, DEMO BOARD; Silicon Manufacturer:Microchip; Core Architecture:PIC; Core Sub-Architecture:PIC16; Silicon Core Number:PIC16F; Silicon Family Name:PIC16F18xx; Kit Contents:Demo Board, 2x Bare PCB Boards
DM164120-5 功能描述:开发板和工具包 - PIC / DSPIC PICkit 2 64 demoBoard RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM164123 功能描述:开发板和工具包 - PIC / DSPIC PICDEM Sys Mgmt Board RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: