欢迎访问ic37.com |
会员登录 免费注册
发布采购

PFS122-1J16A 参数 Datasheet PDF下载

PFS122-1J16A图片预览
型号: PFS122-1J16A
PDF下载: 下载PDF文件 查看货源
内容描述: [8bit MTP Type MCU with 12-bit R-Type ADC]
分类和应用:
文件页数/大小: 93 页 / 1946 K
品牌: PADAUK [ PADAUK Technology ]
 浏览型号PFS122-1J16A的Datasheet PDF文件第55页浏览型号PFS122-1J16A的Datasheet PDF文件第56页浏览型号PFS122-1J16A的Datasheet PDF文件第57页浏览型号PFS122-1J16A的Datasheet PDF文件第58页浏览型号PFS122-1J16A的Datasheet PDF文件第60页浏览型号PFS122-1J16A的Datasheet PDF文件第61页浏览型号PFS122-1J16A的Datasheet PDF文件第62页浏览型号PFS122-1J16A的Datasheet PDF文件第63页  
PFS122  
8bit MTP MCU with 12-bit R-Type ADC  
5.13.2 ADC clock selection  
Before starting the AD conversion, the minimum signal acquisition time should be met for the selected  
analog input signal, the selection of ADCLK must be met the minimum signal acquisition time.  
The clock of ADC module (ADCLK) can be selected by adcm register; there are 8 possible options for  
ADCLK from CLK÷1 to CLK÷128 (CLK is the system clock). Due to the signal acquisition time TACQ is one  
clock period of ADCLK, the ADCLK must meet that requirement. The recommended ADC clock is to  
operate at 2us.  
5.13.3 Configure the analog pins  
There are 12 analog signals can be selected for AD conversion, 11 analog input signals come from  
external pins and one is from internal bandgap reference voltage 1.2V. For those external pins defined as  
analog input, to avoid leakage current from the digital circuit of the shared IO ports, please always  
remember to disable the digital input function (set the corresponding bit of padier or pbdier register to be  
0).  
Due to the measurement signals of ADC are very small; user should avoid the measured signal to be  
interfered during the measurement period. Thus, the selected pin should: (1)be set to input mode; (2) turn  
off weak pull-high and pull-low resistor; (3) set the corresponding pin to analog input by port A/B digital  
input disable register (padier / pbdier).  
5.13.4 Using the ADC  
The following example shows how to use ADC with PB0~PB3:  
First, defining the selected pins:  
PBC  
=
=
=
=
0B_XXXX_0000;  
0B_XXXX_0000;  
0B_XXXX_0000;  
0B_XXXX_0000;  
//  
//  
//  
//  
PB0 ~ PB3 as Input  
PBPH  
PBPL  
PBDIER  
PB0 ~ PB3 without pull-high resistor  
PB0 ~ PB3 without pull-low resistor  
PB0 ~ PB3 digital input is disabled  
Next, setting ADCC register, example as below:  
$
$
$
ADCC Enable, PB3;  
ADCC Enable, PB2;  
ADCC Enable, PB0;  
//  
//  
//  
set PB3 as ADC input  
set PB2 as ADC input  
set PB0 as ADC input  
Next, setting ADCM register, example as below:  
$
$
ADCM /16;  
ADCM /8;  
//  
//  
recommend /16 @System Clock=8MHz  
recommend /8 @System Clock=4MHz  
Then, start the ADC conversion:  
AD_START = 1;  
// start ADC conversion  
while(!AD_DONE) NULL;  
// wait ADC conversion result  
Finally, it can read ADC result when AD_DONE is high:  
WORD  
Data$1  
Data;  
ADCRH;  
//  
two bytes result: ADCRH and ADCRL  
=
©Copyright 2020, PADAUK Technology Co. Ltd  
Page 59 of 93  
PDK-DS-PFS122-EN_V000-May 28, 2020  
 
 
 
 复制成功!