EmbDev.net

Forum: ARM programming with GCC/GNU tools Using the clock.


Author: Tim (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

We are students who have to do a project using the Philips LPC2148. Our
goal is to draw a Bode diagram of a DUT using a quickstart board from
Embedded Artists with an LPCP2148 quickstart board mounted on it.

(http://www.embeddedartists.com/products/boards/prototype.php and
http://www.embeddedartists.com/products/boards/lpc2148.php)

To draw this Bode diagram we have to use a DDS (Direct Digital
Synthesizer: AD9832) to generate sines with different frequencies and
send them through the DUT. The DDS needs an input clock signal. We could
use an external clock but we think it's possible to use the the ARM7's
clock, although we have no idea how.
We have gone through schematics in the hopes of finding a pin that
"carries" the clock signal, but to no avail. Then we thought that we may
have to include a way to "bind" the clock to a certain pin in our code
but we have no idea how or if that's even possible at all. I've looked
at code from another ARM project but didn't find an answer.

Is there an easy way to get the clock from the ARM7 to the DDS?

Author: Mh Tay (lpc2103)
Posted on:

Rate this post
0 useful
not useful
Hi,

Cpu clock only available on LQFP144 versions (e.g. 2214/2294)
You can use any of the timers' match/pwm outputs to generate
clock waveform but max frequency will be 1/2 cpu clock.

Cpu clock means the clock ARM7 core is running.  It can
be multiple of 2-3 times of the external crystal frequency
after the internal PLL frequency multipler.

Hope it helps,
Regards

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
Tim wrote:

> We have gone through schematics in the hopes of finding a pin that
> "carries" the clock signal, but to no avail.

You should be 'going through' the user manual for the LPC2148
microcontroller itself, it contains the details of the on-chip
peripherals and how to program them. The link you posted has a LPC2148
user manual link, but it appears to download an invalid PDF (and rather
short). The LPC2148 manual is available form
http://www.semiconductors.philips.com/acrobat/user....
You could use either the Timer/Counter, or the PWM peripherals to
generate external timing signals (Chapter 15 (Timer/Counter), or Chapter
16 (Pulse Width Modulator)).

Clifford

Author: Randall Aiken (Guest)
Posted on:

Rate this post
0 useful
not useful
> Is there an easy way to get the clock from the ARM7 to the DDS?

You could go the other way around - use an external crystal oscillator
module to drive the LPC in slave mode and also drive your DDS at the
same time.  Most oscillator modules will have enough drive capability to
run the CPU and your external DDS, or you could use a buffer to give
more fan-out capability.

If you are handy with Xilinx tools (available free on the web) and
Verilog, there is an excellent DDS/NCO module in the Xilinx Coregen
library.  Even if you don't use it, you should read the Coregen
datasheet for the DDS module, as it contains lots of useful information
on the design of these things, including plots showing the advantage of
dithering for lower noise floor and less resource utilization.  It will
also help you pick a good operating frequency for your oscillator, as it
will set the maximum output frequency attainable from your NCO and
indirectly control the resolution of your generated sine waves.

Randall Aiken

Author: Tim (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks for the replies. I think I have a pretty good idea of it now.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.