ee3954_fall13_10_adc

0 s time for tad so ad conversion time 115 20 s 23

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ration 2 * Tosc 8 * Tosc 32 * Tosc use internal ‘RC’ TAD Time 0.50 µs 2.00 µs 8.00 µs ( ≈ 2 – 6 µs ) Select ADCS1, ADCS0 to 0,1 since this gives 2.0 µs time for TAD. So A/D conversion Time = 11.5 * 2.0 µs = 23 µs ADC.38 Time for A/D Conversion - Summary 19.75 µs (example) 11.5 * TAD = 2 3 µs Note – You must wait at least 2 * TAD before next acquisition is started. ADC.39 ADC The configuration … ADC.40 ADC Use … Flow Chart Configure A/D Module Configure A/D Interrupt* •  •  •  Wait for TACQ •  Configure analog pins/ voltage reference and digital I/O (ADCON1) Select ADC input channel (ADCON0) Select ADC conversion clock (ADCON0) Turn on ADC module (ADCON0) Start Conversion (set GO) Wait for conversion to complete Read A/D Result Wait for at least 2TAD before next acquisition *if desired ADC.41 ADC Use … Flow Chart Configure A/D Module Configure A/D Interrupt* Wait for TACQ •  •  •  •  Clear ADIF bit Set ADIE bit Set PEIE bit Set GIE bit Start Conversion (set GO) Wait for conversion to complete Read A/D Result Wait for at least 2TAD before next acquisition *if desired ADC.42 ADC The interrupt … ADC.43 ADC Use … Flow Char...
View Full Document

This document was uploaded on 01/22/2014.

Ask a homework question - tutors are online