Page 117 - PDA Robotics Using Your Personal Digital Assistant to Control Your Robot
P. 117
PDA 05 5/30/03 11:35 AM Page 93
Chapter 5 / The Electronics
1. Configure the A/D module:
• Configure analog pins/voltage reference and digital I/O
(ADCON1).
• Select A/D input channel (ADCON0).
• Select A/D conversion clock (ADCON0).
• Turn on A/D module (ADCON0).
2. Configure A/D interrupt (if desired):
• Clear ADIF bit.
• Set ADIE bit.
Figure 5.39
A/D block diagram.
93