English
Language : 

W78E378 Datasheet, PDF (35/38 Pages) Winbond – MONITOR MICROCONTROLLER
Preliminary W78E378/W78C378/W78C374
Appendix A. Application Note for Usage of ADC
To use the ADC, users should pay attention to the following points:
(1) According to the absolute maximum ratings, the input voltage should not exceed VDD +0.3V,
especially for the ADC channel pins (P2.4−P2.7 & P3.5−P3.7). If a voltage over VDD +0.3V exists
on any of these ADC channel pins, the AD conversion will fail.
(2) Owing to the CMOS process, the ADC curve of some chip might differ from those of the others.
So, before using the ADC, the S/W should do the ADC calibration described below.
Step 1. Set (ADCS2, ADCS1, ADCS0, ADCcal) = (1, 1, 1, 0) and then do AD coversion to get
the ADC value for the on-chip 0.948V input. Suppose it is A.
Step 2. Set (ADCS2, ADCS1, ADCS0, ADCcal) = (1, 1, 1, 1) and then do AD coversion to get
the ADC value for the on-chip 2.924V input. Suppose it is B.
Step 3. Because the ADC curve in the usable range is linear, any V and X should meet the
formula:
(X-A)/(V-0.948) = (B-A)/(2.924-0.948),
where V is the key voltage (designed by users and thus known) and X is its predicted
ADC value. Then, we can get X = A + (V-0.948)(B-A)/(2.924-0.948), regardless of V >
0.948V or < 0.948V. (Of course, some effort should be paid in S/W to find X.)
Step 4. Suppose there are N keys used, the N predicted ADC values for these keys can be
found.
ADC value
B
X
A
Usable range
(is linear)
1.0 2.0 3.0 4.0 5.0
V
ADC input voltage
After finding these N predicted ADC values, the S/W can recognize which key is pressed by
comparing the ADC value of this key with the set of predicted values (found previously).
** Note: To get the exact on-chip calibration voltages (0.948V and 2.924V), the VDD should be 5.0V as close as possible.
- 35 -
Publication Release Date: December 1999
Revision A1