Hello! Welcome to Embedic!
This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Embedded Events > ADC Reference Voltage of PIC16F Series Microcontroller 2023

ADC Reference Voltage of PIC16F Series Microcontroller 2023

Date: 13-03-2023 ClickCount: 505

Welcome to this article about the ADC reference voltage of PIC16F series microcontrollers! If you're working with these microcontrollers, you're probably aware that the Analog-to-Digital Converter (ADC) is a key component for converting analog signals into digital values that can be processed by the microcontroller. However, one critical aspect of ADC operation is the reference voltage that is used to compare the input voltage to determine its digital value.

 

In this article, we'll dive into the details of ADC reference voltage for the PIC16F series microcontrollers, including how it works, its importance in ADC accuracy, and how to configure it for your specific application. So, whether you're just starting out with PIC16F microcontrollers or are looking to optimize your ADC performance, this article will provide valuable insights and practical tips.

 

Part1. Brief Overview of PIC16F Series Microcontroller

 

PIC16F series microcontroller is a family of low-cost, high-performance 8-bit microcontrollers designed by Microchip Technology. These microcontrollers are widely used in a variety of applications such as consumer electronics, automotive, industrial automation, and medical devices.

 

pic16f series microcontroller

The PIC16F series microcontroller features a wide range of peripherals, including analog-to-digital converters, digital-to-analog converters, timers, UARTs, SPIs, and I2Cs. The microcontroller also has a flexible and easy-to-use architecture, which enables designers to create customized solutions for their applications.

 

Additionally, the PIC16F series microcontroller has a low power consumption, which makes it ideal for battery-operated devices. The microcontroller is programmed using Microchip's MPLAB IDE, which is a free, integrated development environment that includes a debugger, assembler, and simulator. Overall, the PIC16F series microcontroller is a versatile and cost-effective solution for embedded system applications.

 

Pros and Cons of PIC16F Series Microcontroller

 

Download PIC16F pdf datasheet here.

 

Here are some of the pros and cons of the PIC16F series microcontroller:

 

Pros:

 

  • Low cost: The PIC16F series microcontroller is a low-cost solution for embedded system applications.
  • Easy to use: The microcontroller is easy to use and has a simple instruction set, making it easy for beginners to program and use.
  • Versatile: The PIC16F series microcontroller is versatile and can be used in a wide range of applications, from consumer electronics to automotive and industrial automation.
  • Low power consumption: The microcontroller has low power consumption, making it ideal for battery-powered devices.
  • Wide range of peripherals: The microcontroller features a wide range of peripherals, including analog-to-digital converters, digital-to-analog converters, timers, UARTs, SPIs, and I2Cs, which make it easy to interface with other devices.
  • Multiple oscillator options: The microcontroller has multiple oscillator options, which provide flexibility in system design.

 

Cons:

 

  • Limited processing power: The PIC16F series microcontroller is an 8-bit microcontroller with limited processing power, which may not be suitable for complex applications.
  • Limited memory: The microcontroller has limited program memory, which may limit the complexity of the code that can be executed on it.
  • Limited support for real-time operating systems: The microcontroller may not be suitable for real-time applications that require a real-time operating system due to its limited processing power and memory.
  • Limited hardware debugging options: The microcontroller has limited hardware debugging options, which can make debugging complex applications more difficult.
  • Limited community support: Compared to other microcontrollers, the PIC16F series has a smaller community of users, which may limit the availability of resources and support for troubleshooting issues.
  • Overall, the PIC16F series microcontroller is a popular choice for low-cost and low-power applications that do not require a high level of processing power or memory.

 

Part2. What is ADC and Reference Voltage?

 

ADC stands for Analog to Digital Converter. It is a device or a module that converts analog signals into digital signals. An analog signal is a continuous signal that varies in amplitude and frequency over time, whereas a digital signal is a binary signal with discrete levels representing the original analog signal.

 adc

Reference voltage is the voltage against which the analog signal is compared to produce a digital output. In other words, it is the voltage level that the ADC uses as a reference point to convert the analog signal into a digital signal.

 

The reference voltage is important in the ADC because it determines the resolution of the ADC. The resolution of the ADC is the number of bits used to represent the analog signal digitally. For example, an 8-bit ADC can represent the analog signal with 256 levels (2^8=256).

 

Therefore, the selection of an appropriate reference voltage is crucial in ensuring that the ADC accurately represents the analog signal. The reference voltage can be either internal or external to the microcontroller, depending on the type of ADC used.

 

Part3. ADC Reference Voltage of PIC16F Series Microcontroller

 

1. ADC reference voltage

 

Everyone in the use of microcontroller acquisition of analog signals, often use low-cost program, that is, the use of microcontroller built-in AD module for analog conversion. For products with low accuracy requirements may be able to meet the requirements, but for slightly higher accuracy, and do not want to use external AD conversion chip, then only in the reference port of the microcontroller to add a reference voltage regulator chip, such as TI's REF series reference voltage regulator chip.

 

Reference voltage regulator chip

 reference voltage regulator chip

Baseline voltage regulator chip schematic

 baseline voltage regulator chip schematic

PIC16F685 microcontroller

 

2. Port multiplexing

 

Here the PIC16F685 MCU as an example, through the pin diagram in the manual can be seen RA1 interface has a function is Vref, this pin function as shown in the figure, where VREF is the ADC reference voltage input pin. In use, we need to connect the output of the reference voltage regulator chip to the RA1 port of the microcontroller, so that the output voltage will be able to provide a reference voltage for the ADC of the microcontroller.

 

RA1 pin function

 ra1 pin function

RA1 port function block diagram

 

3. The configuration registers

 

The hardware is connected, and the next step is to configure the registers. The ADC function block diagram shows that the ADC reference voltage can be the microcontroller's operating voltage VDD or VREF, and the switch between them is controlled by the register VCFG, so here we need to set the configuration to 1.

VDFG=1;//use VREF as the reference voltage VCFG=0;//use VDD as the reference voltage

 adc function block diagram

ADC Function Block Diagram

 

Note: When using VREF as the reference voltage, note that the operating voltage of the microcontroller VDD needs to be greater than VREF, so that the data sampled and converted is accurate and stable, because VDD < VREF, it will make the sampling inaccurate, interested students can also use Proteus software simulation.

 

Part4. Example: ADC Reference Voltage Configuration in PIC16F Series Microcontroller

 

// Selecting the internal voltage reference of 2.048V for ADC

FVRCONbits.ADFVR = 0b11;

 

// Enable Fixed Voltage Reference

FVRCONbits.FVREN = 1;

 

// Configure ADC module

ADCON0bits.ADON = 1; // Enable ADC module

ADCON1bits.ADCS = 0b110; // Set ADC clock to Fosc/64

ADCON1bits.ADNREF = 0; // Select VREF- as negative reference

ADCON1bits.ADPREF = 0b11; // Select FVR as positive reference

 

In the above code, the internal reference voltage of 2.048V is selected for the ADC using the Fixed Voltage Reference (FVR) module. The FVR is enabled by setting the FVREN bit to 1.

 

Next, the ADC module is configured by enabling it using the ADON bit. The ADC clock is set to Fosc/64 using the ADCS bits. The negative reference voltage is set to VREF- using the ADNREF bit, and the positive reference voltage is set to the FVR using the ADPREF bits.

 

This configuration allows the ADC to convert the analog input signal with respect to the internal reference voltage of 2.048V, resulting in a digital output that accurately represents the analog input signal.

 

Conclusion

 

The ADC (Analog-to-Digital Converter) reference voltage of the PIC16F series microcontroller is an important parameter that affects the accuracy of the ADC conversion. The reference voltage determines the range of the input analog signal that can be accurately converted into digital values.

 

The PIC16F microcontroller offers different options for setting the ADC reference voltage. It can use an internal fixed reference voltage or an external reference voltage. The internal fixed reference voltage is set at 2.048V for most PIC16F devices, but some models may have different values. An external reference voltage can be applied to the VREF+ pin of the microcontroller.

 

Choosing the appropriate reference voltage for a specific application depends on the desired accuracy and resolution of the ADC conversion. The internal fixed reference voltage is a good option for general-purpose applications, but for more demanding applications, an external reference voltage with higher accuracy and stability may be needed.

 

In conclusion, the ADC reference voltage of the PIC16F series microcontroller is an important parameter that needs to be carefully selected based on the requirements of the specific application.

 

  • STM32F103C8T6 MCU Power Consumption Evaluation Guide 2023
  • [2023] How Intelligent Control Reduces Energy Consumption

FAQ

  • What is the typical value of the internal fixed reference voltage of the PIC16F microcontroller?
  • The typical value of the internal fixed reference voltage of most PIC16F microcontrollers is 2.048V.
  • Can an external reference voltage be used with the PIC16F microcontroller?
  • Yes, an external reference voltage can be applied to the VREF+ pin of the PIC16F microcontroller.
  • What is the purpose of the ADC reference voltage in the PIC16F microcontroller?
  • The ADC reference voltage sets the maximum voltage range that can be accurately converted into digital values by the ADC converter.
  • How does the selection of the ADC reference voltage affect the accuracy of the ADC conversion?
  • The accuracy of the ADC conversion is directly related to the stability and accuracy of the ADC reference voltage. Selecting a stable and accurate reference voltage can help improve the accuracy of the ADC conversion.

Author

Kristina Moyes is an experienced writer who has been working in the electronics industry for the past five years. With a deep passion for electronics and the industry as a whole, she has written numerous articles on a wide range of topics related to electronic products and their development. Kristina's knowledge and expertise in the field have earned her a reputation as a trusted and reliable source of information for readers interested in the latest advancements in electronics.

Hot Products

  • PIC16F1939-I/MV

    Manufacturer: Microchip

    IC MCU 8BIT 28KB FLASH 40UQFN

    Product Categories: 8bit MCU

    Lifecycle:

    RoHS:

  • TMS320C6745CPTP3

    Manufacturer: Texas Instruments

    IC DSP FIX/FLOAT POINT 176HLQFP

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • TMS320DM8168BCYG2

    Manufacturer: Texas Instruments

    IC DGTL MEDIA PROCESSR 1031FCBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • TMS320C6670XCYPA

    Manufacturer: Texas Instruments

    IC DSP FIX/FLOAT POINT 841FCBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

Customer Comments

  • Looking forward to your comment

  • Comment

    Verification Code * 

Compare products

Compare Empty