Files
microchip-application-pec93…/Examples/pga/pga_src_internal

pga_src_internal

This example is used to demo the PGA module which uses internal signals as input/output

Only PGA0 supports internal source

  • Configure the amplifier gain

    // at main.c
    /**
     *  The amplify gain, @ref OPAMP_PGAGainTypeDef
     *  ps. OPAMP_PGAGain_1 ~ OPAMP_PGAGain_16
     */
    #define CONFIG_AMP_GAIN             OPAMP_PGAGain_1
    
  • Configure the reference mVoltage of ADC to convert the sampled value to mVoltage

    // at main.c
    /**
     *  The reference mVoltage of ADC on board
     */
    #define CONFIG_ADC_REF_mVOLTAGE         3300
    

Log

Use serial port with baudrate 115200, 8bit, no parity check.

  • Internal signal

    • Temperature: Analog signal output to PA8 (0.686 V)
    • DAC0 : Analog signal output to PA8 (1.627 V)
    • DAC1 : Analog signal output to PA8 (1.659 V)
    • VBuf 1.5v : Analog signal output to PA8 (1.511 V)
    • VDDL : Analog signal output to PA8 (1.521 V)
    • VSS : Analog signal output to PA8 (0.002 V)
    • VDD : Analog signal output to PA8 (3.288 V)
    Oct  1 2025 15:48:50
    Run PGA-0 (Programmable Gain Amplifier) internal source
      The gain 1
      VinP= Internal signal
      VinM= GND
      Vout= ADC AIN0
    
    Set internal signal: Temperature
      ADC samples the PGA Vout= 0x00000353 (685 mV)
    
    Set internal signal: DAC 0
      ADC samples the PGA Vout= 0x000007D7 (1616 mV)
    
    Set internal signal: DAC 1
      ADC samples the PGA Vout= 0x000007F0 (1637 mV)
    
    Set internal signal: VBuf 1.5
      ADC samples the PGA Vout= 0x0000074C (1504 mV)
    
    Set internal signal: VDDL
      ADC samples the PGA Vout= 0x00000757 (1513 mV)
    
    Set internal signal: VSS
      ADC samples the PGA Vout= 0x00000006 (4 mV)
    
    Set internal signal: VDD
      ADC samples the PGA Vout= 0x00000FEF (3286 mV)
    
    Set internal signal: Temperature
      ADC samples the PGA Vout= 0x0000034F (682 mV)
    
    Set internal signal: DAC 0
      ADC samples the PGA Vout= 0x000007CE (1609 mV)
    
    Set internal signal: DAC 1
      ADC samples the PGA Vout= 0x00000822 (1677 mV)
    
    Set internal signal: VBuf 1.5
      ADC samples the PGA Vout= 0x0000074F (1507 mV)
    
    Set internal signal: VDDL
      ADC samples the PGA Vout= 0x0000074C (1504 mV)
    
    Set internal signal: VSS
      ADC samples the PGA Vout= 0x00000004 (3 mV)
    
    Set internal signal: VDD
      ADC samples the PGA Vout= 0x00000FED (3284 mV)
    
    Set internal signal: Temperature
      ADC samples the PGA Vout= 0x0000034F (682 mV)
    
    Set internal signal: DAC 0
      ADC samples the PGA Vout= 0x000007E2 (1625 mV)
    
    Set internal signal: DAC 1
      ADC samples the PGA Vout= 0x000007F2 (1638 mV)
    
    Set internal signal: VBuf 1.5
      ADC samples the PGA Vout= 0x00000747 (1500 mV)
    
    Set internal signal: VDDL
      ADC samples the PGA Vout= 0x00000755 (1512 mV)
    
    Set internal signal: VSS
      ADC samples the PGA Vout= 0x00000008 (6 mV)
    
    Set internal signal: VDD
      ADC samples the PGA Vout= 0x00000FF6 (3291 mV)
    
    ...