参数资料
型号: DM163001
厂商: Microchip Technology
文件页数: 24/57页
文件大小: 0K
描述: BOARD DEMO PICDEM-1
标准包装: 3
其它名称: DM163001R
DM163001R-ND
PICDEM-1
PICDEM-1 User’s Guide
4.5
Source Code – PIC16C71
LIST P=16C71
;
;
;
;
;
;
;
;
;
;
;
TITLE "Single channel A/D (SAD)"
This program is a simple implementation of the PIC16C71’s
A/D. One channel is used (CH0).
The A/D is configured as follows:
Vref = +5V internal.
A/D Osc. = internal RC
A/D Channel = CH0
Hardware for this program is the PICDEM1 board. The program
converts the potentiometer value on CH0 and displays it as
a 8 bit binary value on PORTB.
;
;
#include <P16C71.INC>
;
TEMP
equ
10h
ADIF
ADGO
equ
equ
1
2
;A/D interrupt flag
;A/D enable bit
;
org
0x00
;
;
;
Start
goto
org
goto
org
movlw
movwf
bsf
Start
0x04
Service_int
0x10
B’00000000’
PORTB
STATUS, RP0
;reset vector
;interrupt vector
;set port b as
;all outputs
CLRF
bcf
TRISB
STATUS, RP0
;
/
;
call
Update
InitializeAD
movf
movwf
call
bcf
bsf
Loop
btfsc
goto
goto
;
DS33015C-page 20
ADRES,W
PORTB
SetupDelay
ADCON0,ADIF
ADCON0,ADGO
ADCON0,ADIF
Update
Loop
;get a/d value
;output to port b
;setup time >= 20uS.
;clear int flag
;start new conversion
;a/d done?
;yes then update new value.
;no then keep checking
? 1999 Microchip Technology Inc.
相关PDF资料
PDF描述
DM163004-LT BOARD DEMO PICDEM.NET
DM163005 KIT EVAL PIC16C432/433 LIN BUSS
DM163007 PICDEM CAN-LIN 1 FOR 18C658/858
DM163008 KIT MCP2120/2150 FOR IRDA COMM
DM163010 BOARD DEMO PICDEM USB
相关代理商/技术参数
参数描述
DM163002 制造商:Microchip Technology Inc 功能描述:PIC16C64/74 DEMO BOARD
DM163003 功能描述:开发板和工具包 - PIC / DSPIC PICDEM 3 PIC16C923/4 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 功能描述:开发板和工具包 - PIC / DSPIC USE 579-DM163004-LT RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 制造商:Microchip Technology Inc 功能描述:DEMO BOARD W/TCP/IP ((NW))
DM163004-LT 功能描述:开发板和工具包 - PIC / DSPIC PICDEM.net Demo Kit w/o TCP/IP Lean Book RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: