This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ADC1CF |= 0x01; Enable converter: ADC1CN = 0x80; Conduct A/D conversion: Set pin to convert with AMUX1SL: AMUX1SL = XX ; //XX: 0-7 Clear conversion complete bit: ADC1CN &= ~0x20; Start conversion: ADC1CN |= 0x10; Wait for conversion complete: while((ADC1CN & 0x20) == 0x00); Read Results: Access results register: ADresult = ADC1;...
View Full Document
- Spring '08