We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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.
"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
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.
Thank you very much.
For details of the ARM architecture itself, go to http://www.arm.com
"LPC2129 will be generating only one task, that is of 10MHz frequency generation."
If that's really the one and only thing its doing, why do you need an ARM? In fact, why do you need any processor at all?!
Surely, this is just a simple oscillator or frequency divider?!
"So 3 cycles are well enough to generate 50ns."
and the processor will have absolutely no time left whatsoever to do anything else at all - so it really is just being a glorified oscillator or frequency divider! What a waste of an advanced 32-bit processor!
Running the chip at 60MHz just to get 10MHz, would probably be a contender for the worlds most power-inefficient 10MHz generator... If complemented with interrupts for other functions, it would also be the worlds most unstable frequency generator.
1) You wouldn't have got a long discussion about SI units, unless your answer to my footnote was that nS really did mean nanoseconds. That was a schoolbook example of how to start a debate.
2) You have never told us how much jitter and frequency error you can accept.
3) You have never told us why you do not want to look at the timers. Just "wanting to" is not a reason.
4) Your original post talked about a 50ns delay, instead of a 10MHz frequency. Only in a theoretical world are the two concepts interchangeable.
5) You have not told us if you need just a short burst, or if you need a continuous signal. A continuous signal needs time for a jump instruction too, since you can't have an infinitely unrolled loop. And a way to end the loop - unless the chip should generate 10MHz until power is removed... If you don't like timers/interrupts for the signal generation, then our assumption must be that you don't like interrupts for ending the generation either! Hence, an if statement and a loop counter is required.
6) I - and most other people on this forum - don't need 10MHz output from the chip. However, the timers are in a class of their own when it comes to generation of square-wave output with low jitter and constant frequency with a minimum of power consumption and processor load. Since you - and not I - need 10MHz, my recommendation was for you to look in the data sheet for support for 10MHz using the timers.
Somehow, I get the feeling that if we don't post finished code for a 10MHz generator, you are not satisfied with our answers. Why do you expect that? And why no feedback why you only accept a sw solution, even if the chip has to more or less break it's back to manage it?