PICDEM-1 User’s Guide
4.1
Main Routine
The main routine of demo71.asm handles the initialization of the PIC16C71
and then uses the A/D interrupt flag to signal a completed A/D conversion and
update the value on the LEDs. The first few lines set PORTB as outputs (for
the LEDs). InitializeAD , the Analog-to-Digital converter initialization
routine, is then called. After the return from InitializeAD , the value in the
A/D output register is retrieved and displayed on the LEDs. The routine then
waits for T AD (A/D conversion clock) and then starts an A/D conversion of a
value specified by the potentiometer. When the A/D conversion is complete
(ADIF bit set), the program loops back to display the current conversion value
on the LEDs and to get another A/D value for conversion.
Start
Configure PORTB
Initialize A/D module
(InitializeAD )
Get value in A/D output register
and display on LEDs
Wait for T AD
( SetupDelay )
Start A/D conversion
Clear interrupt flag ADIF
Yes
A/D Complete?
No
Figure 4.2: Main Routine
DS33015C-page 16
? 1999 Microchip Technology Inc.
相关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
DM163012 BOARD DEMO PICDEM FOR 16C781/782
DM163024 BOARD DEMO PICDEM.NET 2
DM163025 PIC DEM FULL SPEED USB DEMO BRD
相关代理商/技术参数
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 接口类型: 工作电源电压:
DM163005 功能描述:开发板和工具包 - PIC / DSPIC PICDEM PIC16C432/3 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163006 功能描述:开发板和工具包 - PIC / DSPIC 18R PIC18C601/801 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163007 功能描述:开发板和工具包 - PIC / DSPIC For PIC18C658/858 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: