FAQ

FAQ

How to read the actual N76E003 band-gap voltage?  Issue Date:2016-12-22

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:
  1. Read a bad-gap value with IAP by reading UID;
  2. Merge the upper 8 bits and the lower 4 bits;
  3. 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 bytevalue is 0x64, and the second bytevalue 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);

     
Products: Microcontrollers ,8bit 8051 MCUs ,Low Pin Count 8051 Series ,N76E003
Applications:
Function: Peripherals,Analog,ADC