参数资料
型号: DM240002
厂商: Microchip Technology
文件页数: 22/42页
文件大小: 0K
描述: BOARD DEV EXPLORER 16 44-PIN
标准包装: 1
系列: Explorer 16 44 引脚
类型: MCU
适用于相关产品: dsPIC30,dsPIC33,PIC32,PIC24FJ,PIC24HJ
所含物品: Explorer 16 开发板,PIC24FJ64GA004 和 dsPIC33FJ32GP204 PIM 模块
产品目录页面: 659 (CN2011-ZH PDF)
44-Pin 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.
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:
ROTATE LEFT
Carry
File Register
EXAMPLE 3-4:
Start:
BSF
CLRF
BCF
MOVLW
MOVWF
MainLoop:
ROTATE EXAMPLE
STATUS,RP0 ; select Register Bank 1
TRISD ; make IO PortD all output
STATUS,RP0 ; back to Register Bank 0
0x80
Display
MOVF
MOVWF
OndelayLoop:
Display,w
PORTD
; Copy the display to the LEDs
DECFSZ
GOTO
DECFSZ
GOTO
Delay1,f ; Delay .197 s
OndelayLoop
Delay2,f
OndelayLoop
BCF
RRF
BTFSC
BSF
STATUS,C
Display,f
STATUS,C
Display,7
;
;
;
;
ensure the carry bit is clear
rotate display right
Did the bit rotate into the carry?
yes, put it into bit 7.
DS41296B-page 18
GOTO
MainLoop
? 2007 Microchip Technology Inc.
相关PDF资料
PDF描述
DM240011 KIT STARTER MPLAB FOR PIC24F MCU
DM240021 KIT STARTER MPLAB FOR PIC24H
DM240311 BOARD DEV PIC24F16KA102 XLP
DM300018 BOARD DEMO DSPICDEM 2
DM300019 BOARD DEMO DSPICDEM 80L STARTER
相关代理商/技术参数
参数描述
DM240002 制造商:Microchip Technology Inc 功能描述:Explorer 16 kit(44-PIN) w/ PIC24FJ64GA00
DM240011 功能描述:开发板和工具包 - PIC / DSPIC MPLAB Starter Kit for PIC24F MCU RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM240012 功能描述:开发板和工具包 - PIC / DSPIC PIC24E USB Starter Kit RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM240013-1 功能描述:开发板和工具包 - PIC / DSPIC Microstick for 3V PIC24F K-series RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM240013-2 功能描述:开发板和工具包 - PIC / DSPIC RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: