Hi,
I am using mc9s12zvml128 board for my project and I need to access the ADC channels AN0_3 and AN1_3.
volatile char ADC0CommandList[COMMAND_NO][COMMAND_LENGTH] = {
{0x40,0xD0,0x00,0x00}, // end of sequence [40], current sense channel [D0] - dc bus current on op-amp0
{0x40,0xD0,0x00,0x00}, // end of sequence [40], current sense channel [D0] - dc bus current on op-amp0
{0x40,0xD0,0x00,0x00}, // end of sequence [40], current sense channel [D0] - dc bus current on op-amp0
{0xC0,0xD0,0x00,0x00}, // end of list + no int [C0], current sense channel [D0] - dc bus current on op-amp0
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00}
};
volatile char ADC1CommandList[COMMAND_NO][COMMAND_LENGTH] = {
{0x40,0xCB,0x00,0x00}, // end of sequence + no int [40], DC-Link VOltage
{0xC0,0xC9,0x00,0x00}, // end of List + no int [C0], TEMP [C9], 4 clock cycles sample time [00], reserved [00]
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00}
};
In the CommandList I do not know how to access the AN0_3 channel and there is no help in datasheet.
I also want to know what is the adc0readlist is doing and it's structure. What is the meaning of 32758 in adc0readlist.
Hi @ImranAviconn,
You have currently one ADC conversion in a single sequence.
Every sequence requires a trigger.
If there is anough time for two conversions in a sequence (between triggers), you can add one Normal Conversion to the list.
For example:
{0x40,0xD0,0x00,0x00}, // end of sequence [40], current sense channel [D0] - dc bus current on op-amp0
{0x00,0x30,0x00,0x00}, // normal conversion [00], AN3 [0x30]
{0x40,0xD0,0x00,0x00}, // end of sequence [40], current sense channel [D0] - dc bus current on op-amp0
Regards,
Daniel