I'm trying to read from the ATD pins PAD8...PAD15, and I'm only getting zeroes. I am able to get data from PAD0...PAD7 however. I've been going through the manual back to back, and I'm stuck. Any suggestions?
Here's my code:
ATD0CTL2 = 0x80; /* Power up A/D, no interrupts */
ATD0CTL3 = 0x40; /* Do eight conversions */
ATD0CTL4 = 0x05; /* 10-bit mode, 7 us/conversion */
ATD0CTL5 = 0x90;
while ((ATD0STAT0 & 0x80) == 0 ) ; /* Wait for sequence to finish */
printf("%d %d %d %d %d %d% %d %d %d %d %d %d %d %d% %d %d\r\n", ATDDR0, ATDDR1, ATDDR2, ATDDR3, ATDDR4, ATDDR5, ATDDR6, ATDDR7, ATDDR8, ATDDR9, ATDDR10, ATDDR11, ATDDR12, ATDDR13, ATDDR14, ATDDR15);
Here's a typical result from the printf line:
517 165 98 317 35 558 75 55 0 0 0 0 0 0 0 0
What am I doing wrong?