Electronic Components Datasheet Search
  English  ▼

X  

PFS123 Datasheet(PDF) 65 Page - PADAUK Technology.

Part # PFS123
Description  8bit MTP Type MCU with 12-bit R-Type ADC
PDF  104 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  PADAUK [PADAUK Technology.]
Direct Link  http://www.padauk.com.tw/
Logo PADAUK - PADAUK Technology.

PFS123 Datasheet(HTML) 65 Page - PADAUK Technology.

Back Button PFS123 Datasheet HTML 61Page - PADAUK Technology. PFS123 Datasheet HTML 62Page - PADAUK Technology. PFS123 Datasheet HTML 63Page - PADAUK Technology. PFS123 Datasheet HTML 64Page - PADAUK Technology. PFS123 Datasheet HTML 65Page - PADAUK Technology. PFS123 Datasheet HTML 66Page - PADAUK Technology. PFS123 Datasheet HTML 67Page - PADAUK Technology. PFS123 Datasheet HTML 68Page - PADAUK Technology. PFS123 Datasheet HTML 69Page - PADAUK Technology. Next Button
Zoom Inzoom in Zoom Outzoom out
 65 / 104 page
background image
PFS123
8bit MTP MCU with 12-bit R-Type ADC
©Copyright 2020, PADAUK Technology Co. Ltd
Page 65 of 104
PDK-DS-PFS123-EN_V000-Aug. 26, 2020
5.15.4 Configure the analog pins
There are 14 analog signals can be selected for AD conversion, 13 analog input signals come from external
pins and one is from internal band-gap 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, pbdier or pcdier 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/C digital
input disable register (padier / pbdier / pcdier).
5.15.5 Using the ADC
The following example shows how to use ADC with PB0~PB3.
First, defining the selected pins:
PBC
=
0B_XXXX_0000;
//
PB0 ~ PB3 as Input
PBPH
=
0B_XXXX_0000;
//
PB0 ~ PB3 without pull-high resistor
PBPL
=
0B_XXXX_00XX;
//
PB2 ~ PB3 without pull-low resistor
PBDIER
=
0B_XXXX_0000;
//
PB0 ~ PB3 digital input is disabled
Next, setting ADCC register, example as below:
$
ADCC
Enable, PB3;
//
set PB3 as ADC input
$
ADCC
Enable, PB2;
//
set PB2 as ADC input
$
ADCC
Enable, PB0;
//
set PB0 as ADC input
Next, setting ADCM register, example as below:
$
ADCM /16;
//
recommend /16 @System Clock=8MHz
$
ADCM /8;
//
recommend /8 @System Clock=4MHz
Next, delay 400us, example as below:
.Delay 8*400;
//
System Clock=8MHz
.Delay 4*400;
//
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;
//
two bytes result: ADCRH and ADCRL
Data$1
=
ADCRH;
Data$0
=
ADCRL;
Data
=
Data >> 4;
The ADC can be disabled by using the following method:
$
ADCC
Disable;
or
ADCC
=
0;



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com