2 years, 11 months ago.

Generate 24Mhz clock on LPC1768?

How to generate a clock signal of about 24MHz from the mBed LPC1768? As the documentation says, the CLOCKRC signal pin is routed to some unaccessible pin. Thank you all for your time!

Comment on this question

1 Answer

2 years, 11 months ago.

Any PwmOut can do it, if you use FastPWM library to do it.

could you also please please please give me an indication how to get the frequency i want? should I set microseconds to 0.00041 ?

posted by angelo mottolese 20 Nov 2016

That would be 410ps, which is a bit little. But you can just look at the API. You can set sub-microsecond values either with the seconds or the microseconds function, or simply use the ticks one (96MHz clock, so 4 ticks period, 2 ticks pulsewidth).

Or with periods it is simply pwm.period(1/24000000.0);

posted by Erik Olieman 21 Nov 2016