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

  • i dont want to use timer or interrupt.please help

    You don't want to use timer or interrupt. You must mean: It isn't possible to use timer or interrupt.

    By the way 1: What do you want to delay 50 ns?

    By the way 2: nS represents nano-Siemens (Siemens is a measurement of conductance, i.e. A/V or 1/ohm) or normally written 20 Mohm.

  • Assembler syntax is NOP.

    I don't think there's an explicit opcode in the instruction set for NOP, but rather, some instruction with no net effect is actually assembled instead, say ORR R0, R0, 0 with the update-the-CPSR-bit not set in the instruction.

  • nS is nano seconds,i want a delay of 50nS as i want to genarate a frequency of 10 MHz at output pin of LPC2129. Please let me knoe where can i find the instruction set of ARM7 containing the machine cycle details of each instruction.

  • why you not just do searhc page ???

    havve you try google it???

    i tryed and get more 1000000 matcccches!!!

    try www.simplemachines.it/.../arm_inst.pdf

    10mhz is big speed yes

    has CPU got pcm output???

  • nS is nano seconds,

    No, that is what you want it to be. But it isn't. The internationally standardized symbol for the SI unit 'second' is still a lower-case 's'.

    And you're thorougly misled about your choice of techniques. You say you "don't want" to use timers for this job, when timers are exactly what you should use for it. More to the point, you should be using some kind of hardware PWM generator fed off a timer. 20 MHz is way too high a frequency to be done by software-only methods, even on an ARM.

  • 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.

  • Sorry that I put my post before yours. Sometimes, my posts are not accepted immediately - the site complains about my mail address. When I come back later, I have to try to post again :(

  • "nS is nano seconds"

    No, it is not!

    The symbol for seconds (the SI unit of time) is a lowercase 's'.

    As Per Westermark has already explained, an uppercase 'S' is the symbol for siemens - the SI unit of conductance.

  • See: www.8052.com/.../read.phtml

    Includes links to the UK National Physical Laboratory, and the US National Institute of Standards and Technology - in case you doubt the credentials of posters here...

  • Hi, Thank you for letting me know the SI systems,everybody here is trying to be smart explaining me the units, no one pointing to the problem i am facing. LPC2129 will be generating only one task,that is of 10MHz frequency generation.

    Datasheets of LPC2129 says the slew rate of I/O pin is 10ns, and with 60 Mhz osc frequency the 1 machine cycle comes out to be 16.666ns.So 3 cycles are well enough to generate 50ns.Please tell me where can i find the machine cycles details of ARM7 instructions.

    No hard feelings friends,i said what is truth.

    Regards,
    Divya

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

    No hard feelings, but if you are so clever, you should be able to find them yourself.

  • i said you answer before!

    use your internet and seearccch!!!

    i found more 1000000 matches for dociment

    try www.simplemachines.it/.../arm_inst.pdf

  • I have the instruction set with me,however i dont find the machine cycles required for each instruction.

  • We are not here for a debate,I think people are here to help each other and not to find who is clever and who isnt.