参数资料
型号: DM164120-1
厂商: Microchip Technology
文件页数: 21/42页
文件大小: 0K
描述: BOARD DEMO PICKIT 2 LP COUNT
标准包装: 1
系列: PICkit™
类型: MCU
适用于相关产品: 28 引脚 PIC16C、16F、18C、18F
所含物品: 3 个板(1 个装有元件的板,2 个裸板)
产品目录页面: 659 (CN2011-ZH PDF)
LPC Demo Board Lessons
3.2.3
Lesson 3: Rotate (Move the LED)
Building on Lessons 1 and 2, which showed how to light up a LED and then make it
blink with a delay loop, this lesson adds rotation. It will light up DS4 and then shift it to
DS3, then DS2, then DS1 and back to DS4.
New Instructions
MOVLW
MOVWF
MOVF
RRF
RLF
Note:
Loads Wreg with a literal value
Moves the contents of Wreg to a file register
Moves the contents of a file register, either to Wreg or back
into the file register (see note)
Rotate file register right
Rotate file register left
Moving a file register to itself looks like a NOP at first. However, it has a
useful side effect in that the Z flag is set to reflect the value. In other words,
MOVF fileregister,f is a convenient way to test whether or not the
value is zero without affecting the contents of the Wreg.
Rotate Program Flow
?
?
?
?
First, initialize the I/O port and the Display,
Copy the Display variable to the I/O Port, then
Delay for a little while
Rotate the display
FIGURE 3-1:
ROTATE PROGRAM FLOW
Initialize I/O Port
Put Up Display
Delay
Rotate Display
? 2005 Microchip Technology Inc.
Did it overflow?
No
Reset Display
Yes
DS51556A-page 17
相关PDF资料
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
相关代理商/技术参数
参数描述
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