instruction timing

I can’t seem to find anywhere in the manual for my LPC2148 as to what the actual instruction cycle is on this processor. I know that in the PICs I used to always use, it was 1/4 the system clock. I am using Jim Lynch’s example stuff for the chip if that helps. The main reason I’m wanting to know this is to get a rough delay function without having to set up the timer/counter module.

Also, I noticed in Jim’s tutorial that the VPB (peripheral bus) clock (PCLK) is set to 1/4 the system clock (CCLK). Is it okay to run PCLK at 60 MHz like CCLK is? I am using fast I/O, so I’m hoping it can keep up. I just can’t seem to find any of the electrical characteristics for this chip that would tell me all this information (maximum frequencies, etc.). Thanks for any help you guys can offer.

Hi Brennen,

ARMs are not PICs and instructions have no fixed execution time! especially if the microcontroller have cache, MAM and so on

you should use only timers for delay function if you want it to be acurate

Tsvetan

Hi Brennen.

I looked at my text and you have uncovered a small error. The comment says that the peripheral clock (pclk) is set to the same speed as the system clock (cclk) whilst the code selects 1/4 speed, as you observed. I’ll fix that in the next revision.

The Philips peripherals can all run flat-out at 60 mhz so you can safely set the peripheral clock equal to the system clock. VPBDIV = 1;

However, they will draw more power at that speed and that is why I left them in the factory default setting (1/4 speed) to conserve power since the examples aren’t excercising any peripherals save a LED bit.

Cheers,

Jim Lynch