Upload
internet
View
105
Download
1
Tags:
Embed Size (px)
Citation preview
CAD – PICCAD – PIC
Prof Afonso Ferreira MiguelProf Afonso Ferreira Miguel
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
ResolutionResolution The resolution of the converter indicates the The resolution of the converter indicates the
number of discrete values it can produce over number of discrete values it can produce over the range of voltage values.the range of voltage values.
It is usually expressed in bits.It is usually expressed in bits. For example, an ADC that encodes an analog For example, an ADC that encodes an analog
input to one of 256 discrete values (0..255) input to one of 256 discrete values (0..255) has a resolution of eight bits, since 2has a resolution of eight bits, since 288 = 256. = 256.
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
ResolutionResolution Resolution can also be defined electrically, and Resolution can also be defined electrically, and
expressed in volts.expressed in volts. The voltage resolution of an ADC is equal to its The voltage resolution of an ADC is equal to its
overall voltage measurement range divided by the overall voltage measurement range divided by the number of discrete values. number of discrete values.
Example 1 Example 1 Full scale measurement range = 0 to 10 volts Full scale measurement range = 0 to 10 volts ADC resolution is 12 bits: 2ADC resolution is 12 bits: 21212 = 4096 quantization = 4096 quantization
levels;levels; ADC voltage resolution is: (10-0)/4096 = 0.00244 ADC voltage resolution is: (10-0)/4096 = 0.00244
volts = 2.44 mV volts = 2.44 mV
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
Example 2 Example 2 Full scale measurement range = -10 to +10 Full scale measurement range = -10 to +10
volts;volts; ADC resolution is 14 bits: 2ADC resolution is 14 bits: 21414 = 16384 = 16384
quantization levels quantization levels ADC voltage resolution is: (10-(-10))/16384 = ADC voltage resolution is: (10-(-10))/16384 =
20/16384 = 0.00122 volts = 1.22 mV 20/16384 = 0.00122 volts = 1.22 mV
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
In practice, the resolution of the converter In practice, the resolution of the converter is limited by the is limited by the signal-to-noise ratiosignal-to-noise ratio of of the signal in question.the signal in question.If there is too much noise present in the If there is too much noise present in the analog input, analog input, it will be impossible to it will be impossible to accurately resolve beyond a certain accurately resolve beyond a certain number of bits of resolutionnumber of bits of resolution, the , the "effective number of bits" (ENOB)."effective number of bits" (ENOB).While the ADC will produce a result, the While the ADC will produce a result, the result is not accurate, since its result is not accurate, since its lower bits lower bits are simply measuring noiseare simply measuring noise. .
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
Um CAD é susceptível a diversas fontes Um CAD é susceptível a diversas fontes de erros:de erros: QuantizaçãoQuantização: processo de restringir algo : processo de restringir algo
para um conjunto discreto de valores;para um conjunto discreto de valores;
CAD – Conversor Analógico-DigitalCAD – Conversor Analógico-Digital
LinearidadeLinearidade: a maioria dos CADs são : a maioria dos CADs são lineares, significando que a faixa de valores lineares, significando que a faixa de valores de entrada mapeados para cada valor de de entrada mapeados para cada valor de saída tem um relacionamento linear. saída tem um relacionamento linear. Deformidades nesta curva de relacionamento Deformidades nesta curva de relacionamento podem provocar erros de medida;podem provocar erros de medida;
PIC16F877APIC16F877A
CAD:CAD: 8 canais de entrada;8 canais de entrada; 10 bits de resolução;10 bits de resolução; Referências superior e inferior de conversão;Referências superior e inferior de conversão; Pode operar enquanto o processador está no Pode operar enquanto o processador está no
modo SLEEP (para reduzir ruído);modo SLEEP (para reduzir ruído);
PIC16F877APIC16F877A
PIC16F877APIC16F877A
A máxima impedância recomendada para fontes analógicas é 10k ohms
PIC16F877APIC16F877A
PIC16F877APIC16F877A
PIC16F877APIC16F877A
PIC16F877APIC16F877A
PIC16F877APIC16F877A
Selecionando o clock do conversorSelecionando o clock do conversor
PIC16F877APIC16F877A
Temporização do CADTemporização do CAD
PIC16F877APIC16F877A
Justificação do resultado do CADJustificação do resultado do CAD
PIC16F877APIC16F877A
Quadro geral dos registradores do CADQuadro geral dos registradores do CAD