How to read the actual N76E003 band-gap voltage?

Post Reply
a_ziliu
Posts: 116
Joined: 20 Mar 2017, 10:52

27 Mar 2017, 14:55

The N76E003 ADC can select an internal band-gap voltage as the input pin, which can be used to get the ADC reference voltage, for more accurate ADC results.
At room temperature, all N76E003 band-gap voltage values will be calibrated within the range of 1.17V to 1.27V. If you want to get the actual band-gap value for N76E003, read the 2 bytes value after the UID address.
There are 2 bytes after the UID address that store the actual band-gap value, but the actually valid bit is 12.
The first byte is the upper 8 bits, and the lower 4 bits of the second byte are the lower 4 bits of the 12 bit.

Reading and calculation steps:
Read a bad-gap value with IAP by reading UID;
Merge the upper 8 bits and the lower 4 bits;
Use the following formula to convert to an actual voltage value.
Formula:


Calculation example:
Read the 2 bytes value after the UID address, wherein the first byte value is 0x64, and the second byte value is 0x0E, merged as 0x64E = 1614. The conversion result is as follows:


Example samples:
void READ_BANDGAP()
{
UINT8 BandgapHigh,BandgapLow;
set_IAPEN;
IAPAL = 0x0C;
IAPAH = 0x00;
IAPCN = READ_UID;
set_IAPGO;
BandgapHigh = IAPFD;
IAPAL = 0x0d;
IAPAH = 0x00;
IAPCN = READ_UID;
set_IAPGO;
BandgapLow = IAPFD;
BandgapLow = BandgapLow&0x0F;
clr_IAPEN;
Bandgap_Value = (BandgapHigh<<4)+BandgapLow;
Bandgap_Voltage = 3072/(0x1000/Bandgap_Value);
}

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest