PFS122
8bit MTP MCU with 12-bit R-Type ADC
5.5.3 Using the comparator and bandgap 1.20V
The internal bandgap module can provide 1.20 volt, it can measure the external supply voltage level. The
bandgap 1.20 volt is selected as minus input of comparator and Vinternal R is selected as plus input. The
supply voltage of Vinternal R is VDD, and the VDD voltage level can be detected by adjusting the voltage level
of Vinternal R to compare with bandgap. If N (gpcs[3:0] in decimal) is the number to let Vinternal R closest to
bandgap 1.20 volt, the supply voltage VDD can be calculated by using the following equations:
For using Case 1: VDD = [ 32 / (N+9) ] * 1.20 volt ;
For using Case 2: VDD = [ 24 / (N+1) ] * 1.20 volt ;
For using Case 3: VDD = [ 40 / (N+9) ] * 1.20 volt ;
For using Case 4: VDD = [ 32 / (N+1) ] * 1.20 volt ;
Case 1:
$ GPCS VDD*12/40;
// 4.0V * 12/40 = 1.2V
$ GPCC Enable, BANDGAP, P_R; // - input: BANDGAP, + input: P_R(Vinternal R
)
….
if (GPC_Out)
// or GPCC.6
{
//
//
when VDD﹥4V
}
else
{
}
when VDD﹤4V
©Copyright 2020, PADAUK Technology Co. Ltd
Page 39 of 93
PDK-DS-PFS122-EN_V000-May 28, 2020