参数资料
型号: DM164120-1
厂商: Microchip Technology
文件页数: 26/42页
文件大小: 0K
描述: BOARD DEMO PICKIT 2 LP COUNT
标准包装: 1
系列: PICkit™
类型: MCU
适用于相关产品: 28 引脚 PIC16C、16F、18C、18F
所含物品: 3 个板(1 个装有元件的板,2 个裸板)
产品目录页面: 659 (CN2011-ZH PDF)
Low Pin Count Demo Board User’s Guide
3.2.5
Lesson 5: Variable Speed Rotate
Lesson 5 combines Lessons 3 and 4 by using the Analog-to-Digital Converter (ADC)
to control the speed of rotation.
New Instructions
BTFSS
BTFSC
Bit test, skip if set
Bit test, skip if clear
A conversion is run on every pass through the main loop. The result controls the length
of the outer loop (see Example 3-5).
EXAMPLE 3-5:
...
VARIABLE SPEED ROTATE EXAMPLE
BSF
BTFSS
GOTO
MOVF
ADDLW
MOVWF
ADCON0,GO
ADCON0,GO
$-1
ADRESH,w
1
Delay2
;start conversion
;this bit will change to zero when the
;conversion is complete
;Copy the display to the LEDs
A2DDelayLoop
DECFSZ Delay1,f
;Delay Loop shortened by the ADResult as
;controlled by the Pot.
GOTO A2DDelayLoop
DECFSZ Delay2,f
GOTO A2DDelayLoop
FIGURE 3-3:
VARIABLE SPEED ROTATE PROGRAM FLOW
Initialize I/O Port
Initialize ADC
Put Up Display
Get ADC Result
Delay Using ADC
Rotate Display
DS51556A-page 22
Did it overflow?
No
Reset Display
Yes
? 2005 Microchip Technology Inc.
相关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