ShihChe Tseng

ATD problem in S12XDP512

Discussion created by ShihChe Tseng on Sep 9, 2009
Latest reply on Oct 16, 2009 by Wolodymyr Barabash



Currently I'm using a start kit from softec to implement a base environment for motor control, but I encountered some problem when I deal with ATD module. follow is my initial code for ATD module:


ATD1CTL3 = 0x38;
ATD1CTL4 = 0x80;
ATD1CTL0 = 0x05;
ATD1CTL2 = 0x80;
ATD1CTL5 = 0x32;


but in this code, I can't get any data from AD0~AD7, I can only get data from AD8~AD15.

the relation is as follow:





but data--->PAD00---> can't found in any register....


So it's really bother me a lot. Could somebody also have encountered this problem before? could you give me some hint about this? Thanks a lot in advance.