PIC12CE674 Datasheet

  • PIC12CE674

  • 8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...

  • 1264.35KB

  • 129页

  • Microchip   Microchip

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC12CE67X
8.4
A/D Conversions
Example 8-2 show how to perform an A/D conversion.
The GP pins are con铿乬ured as analog inputs. The ana-
log reference (V
REF
) is the device V
DD
. The A/D inter-
rupt is enabled, and the A/D conversion clock is F
RC
.
The conversion is performed on the GP0 channel.
Note:
The GO/DONE bit should
NOT
be set in
the same instruction that turns on the A/D.
Clearing the GO/DONE bit during a conversion will
abort the current conversion. The ADRES register will
NOT be updated with the partially completed A/D con-
version sample. That is, the ADRES register will con-
tinue to contain the value of the last completed
conversion (or the last value written to the ADRES reg-
ister). After the A/D conversion is aborted, a 2T
AD
wait
is required before the next acquisition is started. After
this 2T
AD
wait, an acquisition is automatically started
on the selected channel.
EXAMPLE 8-2:
BSF
CLRF
BSF
BCF
MOVLW
MOVWF
BCF
BSF
BSF
;
;
;
;
DOING AN A/D CONVERSION
RP0
ADIE
RP0
;
;
;
;
;
;
;
;
;
Select Page 1
Configure A/D inputs
Enable A/D interrupts
Select Page 0
RC Clock, A/D is on, Channel 0 is selected
Clear A/D interrupt flag bit
Enable peripheral interrupts
Enable all interrupts
STATUS,
ADCON1
PIE1,
STATUS,
0xC1
ADCON0
PIR1,
INTCON,
INTCON,
ADIF
PEIE
GIE
Ensure that the required sampling time for the selected input channel has elapsed.
Then the conversion may be started.
BSF
:
:
ADCON0, GO
; Start A/D Conversion
; The ADIF bit will be set and the GO/DONE bit
; is cleared upon completion of the A/D Conversion.
DS40181B-page 42
Preliminary
1998 Microchip Technology Inc.

PIC12CE674相关型号PDF文件下载

您可能感兴趣的PDF文件资料

热门IC型号推荐

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!