中文English
电压基准芯片ichaiyang 2024-05-10 7:35 29
51 MCU (refers to the MCU based on the Intel 8051 architecture does not have the function of directly setting the reference voltage. A reference voltage usually refers to a stable...

51 MCU how to set the reference voltage?

51 MCU (refers to the MCU based on the Intel 8051 architecture) does not have the function of directly setting the reference voltage. A reference voltage usually refers to a stable voltage for reference and comparison, which can be used in applications such as a reference voltage source in an analog circuit or a comparator in a digital circuit.

If you need to use the reference voltage in the 51 MCU, it can be achieved through an external circuit. Here is a common implementation:

< br >

1. Use a reference voltage chip: Choose a reference voltage chip that suits your application needs, such as the LM7805 (5V regulator) or the LM431 (adjustable regulator). The chip is connected to the power supply line of the single chip computer to provide a stable reference voltage.

2. Use a voltage regulator diode: Another simple method is to use a voltage regulator diode, such as the 1N4148. The voltage regulator diode is connected to the power supply line of the single chip computer, and the required reference voltage is generated by selecting the appropriate resistor and diode.

3. No matter which method you choose, you need to make circuit connection and parameter selection according to the specific application requirements and circuit design. Please ensure that the design is in accordance with the relevant codes and standards, and pay attention to ensure the stability and reliability of the circuit.

Please note that the above method is only a general recommendation, and the specific circuit design and implementation need to be adjusted and optimized according to your specific needs and application scenarios. If you are not familiar with circuit design and MCU programming, it is recommended to consult professionals or consult relevant materials for more detailed understanding and guidance.


In 51 MCU, setting the reference voltage is usually achieved by configuring the reference voltage of the ADC (analog-to-digital converter). Here are the general setup steps:

Determine the reference voltage source: First, determine the reference voltage source you want to use. 51 Microcontrollers usually provide two options: internal reference voltage and external reference voltage. The internal reference voltage is a fixed voltage source provided by the MCU, which is generally 2.56V. The external reference voltage can be provided via an external circuit, and the appropriate voltage value can be selected as required.

Configure ADC registers: In 51 SCM, ADC-related registers are used to configure and control ADC modules. Specifically, you need to set the reference voltage bit (REFS) bit in the ADC register to select the reference voltage source. The REFS bit usually has two or three optional values corresponding to the internal reference voltage and the external reference voltage.

Start the ADC module: After configuring the ADC register, you need to start the ADC module to start the analog-to-digital conversion. The specific starting method can refer to the relevant documents or manuals of 51 microcontroller.
It should be noted that the specific setting method may vary depending on the single chip microcomputer model. Therefore, before setting, it is recommended to consult the relevant MCU documentation or manual to ensure that the reference voltage is correctly configured.