cad – pic prof afonso ferreira miguel. cad – conversor analógico-digital resolution the...

18
CAD – PIC CAD – PIC Prof Afonso Ferreira Prof Afonso Ferreira Miguel Miguel

Upload: internet

Post on 21-Apr-2015

105 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

CAD – PICCAD – PIC

Prof Afonso Ferreira MiguelProf Afonso Ferreira Miguel

Page 2: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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.

Page 3: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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

Page 4: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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

Page 5: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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. .

Page 6: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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;

Page 7: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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;

Page 8: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

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);

Page 9: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Page 10: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

A máxima impedância recomendada para fontes analógicas é 10k ohms

Page 11: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Page 12: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Page 13: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Page 14: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Page 15: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Selecionando o clock do conversorSelecionando o clock do conversor

Page 16: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Temporização do CADTemporização do CAD

Page 17: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Justificação do resultado do CADJustificação do resultado do CAD

Page 18: CAD – PIC Prof Afonso Ferreira Miguel. CAD – Conversor Analógico-Digital Resolution The resolution of the converter indicates the number of discrete values

PIC16F877APIC16F877A

Quadro geral dos registradores do CADQuadro geral dos registradores do CAD