PIC A/D Converter

Publisher:CaptivatingEyesLatest update time:2016-08-26 Source: eefocusKeywords:PIC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
PIC16C7X (Except 710/71/711) When ADCON1 is configured to set all analog pins as digital I/O, VREF is internally tied to ground. This causes the ADRES register to read 0xFF every time an analog conversion is performed, since every input voltage is above VREF.

I have used one of the PIC16C7X series devices and found that the analog-to-digital conversion results are not always accurate. How can I improve the accuracy?

1. Make sure all timing specifications are met. If you turn the ADC off and then on, you should wait at least a minimum delay before sampling; if you change the input channel, you should also wait a minimum delay; and finally, Tad, which is the time selected for each bit conversion. This time is selected in ADCON0 and should be between 2 and 6us. If Tad is too short, the result will not be fully converted at the end of the conversion, and if Tad is too long, the voltage on the sampling capacitor may have dropped before the conversion is completed. These timing specifications are provided in the data sheet in the form of tables or formulas and should be reviewed for specific devices and specific situations.

2. Usually the source impedance of analog signals is high (greater than 1K ohm), so the source impedance output current will affect the accuracy of charging the sampling capacitor. If the input signal does not change too fast, try connecting a 0.1uF capacitor to the analog input. This capacitor will charge to the sampled analog voltage and provide the instantaneous current required to charge the 52pf internal sampling capacitor.

3. On the PIC16C71, an analog input pin is right next to an oscillator pin. Generally, when their traces are adjacent to each other, the noise on the oscillator will couple to the analog circuit. This is especially true if the clock source is an external oscillator box, because unlike the slowly rising sine wave provided by the crystal oscillator circuit, the external oscillator produces a square wave with steep edges and high-frequency components. Of course, decoupling the analog pin will help improve noise coupling, and if you can leave the pin empty, turn it into an output and drive it low, you can actually eliminate cross-coupling to the analog circuit.

4. Finally, a quote from the data sheet: "In systems where the device frequency is lower, it is better to use the A/D clock from the device oscillator... This will greatly reduce the effects of digital switching noise." And, "In systems where the device goes to sleep after starting the A/D conversion, it is required to select an RC clock source... It will provide the highest accuracy."

Keywords:PIC Reference address:PIC A/D Converter

Previous article:PIC program optimization
Next article:PIC microcontroller learning experience

Recommended ReadingLatest update time:2024-11-16 17:29

Suzhou Tongfu Chaowei 1A comprehensive factory building capped
On April 30, the topping-out ceremony of the expansion of Suzhou TFMC's 1A integrated factory building (456-storey addition project) was held at the TFMC Suzhou Park project site. It is reported that this project is a general contracting project for the expansion of the existing 1A comprehensive factory building (th
[Mobile phone portable]
读写PIC16F877內部EEPROM的实例
//**********************************************Write 1 byte to eerom************************************////// void write_eprom(unsigned char date,unsigned char addr) { while(wr==1);//Wait for the write cycle to complete eeadr=addr;//Prepare the address to be written eedata=date;//Prepare the data to be written eepg
[Microcontroller]
Interface and program design of 12-bit A/D converter ADS7804 and 51 microcontroller
    Abstract: ADS7804 is a new 12-bit A/D converter launched by BURR-BROWN Company in the United States. The article introduces its characteristics and functions, provides a simple and novel interface method with the 51 microcontroller, and also provides a data collection application program written in C language.
[Analog Electronics]
Using the internal DAC of PIC16F1824 as a sine wave generator test
The sine wave synthesis uses the simplest timer scanning code table. The internal DAC is only 5 bits, so the waveform is average. If an RC filter is added, it should be okay! In addition to the IC, there is also a reset switch and a decoupling capacitor underneath. The rest are connectors and a universal board.
[Microcontroller]
Using the internal DAC of PIC16F1824 as a sine wave generator test
Fluke 8845A digital multimeter maintenance case - Antai test maintenance
1. Instrument model: 8845A; 2. Fault description: The current gear is burnt out and cannot be tested ; 3. Analysis, test and judgment: After testing, it was found that the device in the current channel was burnt out, causing the fault; 4. Repair and treatment: Replace the damaged device and repair the faulty modu
[Test Measurement]
Fluke 8845A digital multimeter maintenance case - Antai test maintenance
STC12C5A60S2_PWM
#include reg52.h #include intrin.h #define uint unsigned int  #define uchar unsigned char sfr CCON = 0XD8; sbit CCFO = CCON^0; sbit CCF1 = CCON^1; sbit CR = CCON^6; sbit CF = CCON^7; sfr CMOD = 0XD9; sfr CL = 0XE9; sfr CH = 0XF9; sfr CCAPM0 = 0XDA; sfr CCAP0L = 0XEA; sfr CCAP0H = 0XFA; sfr CCAMP1 = 0XDB; sfr CCAP1L
[Microcontroller]
Natural wind generator realized by PIC16F84 microcontroller
1. Hardware circuit and principle     To make the electric fan send out natural wind, it is necessary to change the strength of the electric fan, that is, it is necessary to change the voltage and current of the fan motor, thereby changing its speed. As shown in Figure 1, the fan socket is connected in series with the
[Microcontroller]
Natural wind generator realized by PIC16F84 microcontroller
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号