I'm using the MC9S08GT60 and I want to transmit data of the ADC from a device to a coordinator in a 802.15.4 network. My actual problem is not the transmitting of the data but the correct use of the ADC.
I want to use PTB2 and so I initialize the registers as follows:
So I would expect that test contains the value of the last conversion, but it just contains a 1 which isn't correct.
ATDPE=0b00000100; ATDC=0b10100000; ATDSC=0b00100010; test=ATDRH;
The problem I have is if I use exactly (!!) the same code in a "normal" Code Warrior project without any MAC software, it works fine and the register of the MCU contains the values I expected.
Has anybody an idea what I have to do to use the ADC in combination with the 802.15.4 MAC SW?