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