Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Discussion Groups

Discussion Groups | Freescale DSPs | Rif: 805 ADC current readings

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Rif: 805 ADC current readings - Author Unknown - Nov 23 11:04:00 2002




The array ResultReg contain the converted results from ADC channel scan
that you have incude in the channel list register. For example if you want
to get the ADC read of input AN0, AN1, AN5 you must include three samples
in appconfig.h:
#define INCLUDE_ADCA_SAMPLE_0
#define INCLUDE_ADCA_SAMPLE_1
#define INCLUDE_ADCA_SAMPLE_2

and configure the channels in "open" function assigning the appropriate
SampleMask to any channel. SampleMask=0x0001 correspond to
&ArchIO.AdcA.ResultReg[0], SampleMask=0x0002 correspond to
&ArchIO.AdcA.ResultReg[1], SampleMask=0x0004 correspond to
&ArchIO.AdcA.ResultReg[2],etc..

Here is an initalization example with channel AN0,AN1 and AN5: void ADC_Init(void)
{
const adc_sState sadc0 = {
/* AnalogChannel = */ ADC_CHANNEL_0, /* motor current phase
U */
/* SampleMask = */ 0x0001,
/* OffsetRegister = */ 0,
/* LowLimitRegister = */ 0,
/* HighLimitRegister = */ 0xffff, /* ISR limit checking
not activated */
/* ZeroCrossing = */ 0,
};

const adc_sState sadc1 = {
/* AnalogChannel = */ ADC_CHANNEL_1, /* motor current phase
W */
/* SampleMask = */ 0x0002,
/* OffsetRegister = */ 0,
/* LowLimitRegister = */ 0,
/* HighLimitRegister = */ 0xffff, /* ISR limit checking
not activated */
/* ZeroCrossing = */ 0,
};

const adc_sState sadc2 = {
/* AnalogChannel = */ ADC_CHANNEL_5, /* dc-bus voltage */
/* SampleMask = */ 0x0004,
/* OffsetRegister = */ 0,
/* LowLimitRegister = */ FRAC16(BRAKE_LOW_LIMIT/APP_VOLT_MAX), /*
Brake - Low limit */
/* HighLimitRegister = */ FRAC16(BRAKE_HIGH_LIMIT/APP_VOLT_MAX), /*
Brake - High limit */
/* ZeroCrossing = */ 0,
};

/* open adc power module PM001 channels */
ADC0_Handle = open(BSP_DEVICE_NAME_ADC_0, 0, &sadc0);
ADC1_Handle = open(BSP_DEVICE_NAME_ADC_0, 0, &sadc1);
ADC2_Handle = open(BSP_DEVICE_NAME_ADC_0, 0, &sadc2);
} After ADC scan, you will find read result in

&ArchIO.AdcA.ResultReg[0]=> result of conversion AN0
&ArchIO.AdcA.ResultReg[1]=> result of conversion AN1
&ArchIO.AdcA.ResultReg[2]=> result of conversion AN5

but you can read the result of conversion with:

read(ADC0_Handle, &ph_U_curr, sizeof(ph_U_curr));
read(ADC1_Handle, &ph_W_curr, sizeof(ph_W_curr));
read(ADC2_Handle, &u_dc_bus, sizeof(u_dc_bus));

Best regards,

--------------------------------------------------------------------------------\
--------

Marco Pellizzaro
QEM srl
S.S. 11 Km 339 Località Signolo
36054 Montebello Vic.no - VI - ITALY
Phone +39-0444-440061 Fax. +39-0444-440229
e-mail:
http://www.qem.it
--------------------------------------------------------------------------------\
-------- "chrisaustin2003"

<chrisaustin2003@ Per:

yahoo.com> Cc:

Oggetto: [motoroladsp] 805 ADC
current readings
22/11/02 20.32
Hi there. I'm trying to find out how to read the DC bus current from
the ADC. I know that you can read the DC bus voltage by using
periphMemRead(&ArchIO.AdcA.ResultReg[0]). I'm assuming that there is
a way to read current from the ADC with a similar call. Does anyone
know were i can find a list of outputs for ResultReg, ie if i change
0 to 1, what am i getting? This will help a lot. Thanks - Chris
_____________________________________
/groups.php3




(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )