--- In l..., "Arie Finkelstein" wrote: >
> Rowley's CrossWorks doesn't have the LPC2148 as a target. Are you using the > LPC2138 instead?
> If so, the PLL is not set correctly and the LPC2148 doesn't run at 60MHz but > rather at your cristal frequency speed.
> You'll have to change the header file to set the PLL registers or wait for > Rowley to supply a header file.
>
> Arie
Well, Rowleys Crosswrok does have the LPC2148 as a target.You must
send an e-mail to get all needed files for LPC214X.
Rowley's CrossWorks doesn't have the LPC2148 as a target. Are you
using the
LPC2138 instead?
If so, the PLL is not set correctly and the LPC2148 doesn't run at 60MHz
but
rather at your cristal frequency speed.
You'll have to change the header file to set the PLL registers or wait
for
Rowley to supply a header file.
Arie
----- Original Message -----
From: "heedaf"
To:
Sent: Saturday, May 13, 2006 8:37 AM
Subject: [lpc2000] ADC slow sampling rate problem
I'm using the following code for the ADC with the LPC2148 and
Rowley's CrossWorks:
//Start ADC//
ADCR=(ADCR & 0xFFFFFF00)|(1 << 1) & (~(1 << 24)); //Sets to channel 1
ADCR=(ADCR & 0xFFFFFF00)|((1 << 24)); //Starts the conversion
while((ADDR & 0x80000000) == 0) //get result - adjust to 10-bit
integer
;
return (ADDR>>6) & 0x3FF;
The LPC2148 manual lists 2.44 microseconds for a conversion time (at
11 clocks) but I'm getting about 44microseconds instead. I'm only
writing to an array so I can calculate the a full wave in order to
calculate the sample rate. Any ideas what might be causing it to
sample so slow?
Thanks,
Dewayne
Reply by heedaf●May 13, 20062006-05-13
I'm using the following code for the ADC with the LPC2148 and
Rowley's CrossWorks:
//Start ADC//
ADCR=(ADCR & 0xFFFFFF00)|(1 << 1) & (~(1 << 24)); //Sets to channel 1
ADCR=(ADCR & 0xFFFFFF00)|((1 << 24)); //Starts the conversion
while((ADDR & 0x80000000) == 0) //get result - adjust to 10-bit
integer
;
return (ADDR>>6) & 0x3FF;
The LPC2148 manual lists 2.44 microseconds for a conversion time (at
11 clocks) but I'm getting about 44microseconds instead. I'm only
writing to an array so I can calculate the a full wave in order to
calculate the sample rate. Any ideas what might be causing it to
sample so slow?
Thanks,
Dewayne