Alex,
When you do something like PORTB = 8, it sets all the pins in PORTB.
Since PORTB.2 is the A/D's Chip Select pin, every time you turn on an LED or Relay, you are also Enabling the A/D converter. Probably getting it confused.
And that chip can be clocked at up to 1 Mhz.
6 seconds is an awful long time to read 8 bits.
<br>
Bookmarks