This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

50nS delay generation on LPC2129

Hi, How do i generate a delay of 50nS using C.is there any NOP instruction in ARM7.i dont want to use timer or interrupt.please help

Regards,
Divya

Parents Reply Children
  • No, nS is not nanoseconds. nS is nanosiemens. If you are talking about nanoseconds, then you should write ns - small s. Actual transfer of information is only meaningful if everyone do care about identical definitions. In this case the SI system. Even if you don't live in a metric country, it should be obvious that the difference between m (milli) and M (mega) is tremendous. The same goes for most other charactesr used in units.

    Your original post was for a delay, not the generation of a frequency. You must always be very explicit when you ask questions. The less you know about the answer, the more explicit you must be about the question. Always make sure that your question answers our why, to make sure that we actually know what you are trying to do!

    Don't try to generate such a high frequency in software. It can't fix exact timing. If we assume that one nop instruction (and all other processor instructions too) take 25ns and you want to generate a limited pulse train, then your coude would be:

    pin_high
    nop
    pin_low
    nop
    ...

    This would require the processor to do 40 million instructions/second. Quite hefty for a processor supporting max 60MHz operation, don't you say?

    If we assume that no nop is required between each toggle, your requirement is still extremely high for sw frequency output, with a need for 20 million instructions/second.

    If you don't want just a limited burst, but want to generate a continuous frequency, you must also have time for a jump instruction, to restart the loop. And time for doing anything else.

    Obviously, the chip can't support an interrupt ticking at 20MHz either.

    That leaves you with the hw timers. The data sheet for the chip will tell you if the timer may support the generation of a 10MHz output signal.

  • i tryed and get more 1000000 matcccches!!!

    CChheecckk yyoouurr dduupplleexx sswwiittcchh!!

    Please tell me where can i find the machine cycles details of ARM7 instructions.

    No hard feelings friends,i said what is truth.

    And you feel better, now?...Good.

    Read this document:

    www.arm.com/.../DDI0234A_7TDMIS_R4.pdf