Advanced Member level 4
If I want to have 1 ns delay, what should I do ? divide 1us by 1000 ? since if I put TH0 and TL0 = FF, it's about 1 us delay for 11.0592 Mhz
is it possible if I create 100 ns, since my oscilator is 11.0592 Mhz ?1ns is not possible with any embedded mcu.
1ns is the period of 1GHz which is a huge frequency, I doubt that you can achieve that even if you try an external clock divider, even an FPGA wouldn't be able to give such a delay.
The shortest delay would be the execution of an instruction requiring the minimum amount of instruction cycles.is it possible if I create 100 ns, since my oscilator is 11.0592 Mhz ?
I'm using AT89S52 and create delay with timer, so far the fastest from timer is 1uS, is it possible to make it become 100nS ( divide by 10 ) ?The shortest delay would be the execution of an instruction requiring the minimum amount of instruction cycles.
You do not appear to mention the specific MCU, therefore without further details a definitive answer cannot be given.
However, many MCUs offer a No Operation (NOP) which essentially delays execution flow for the minimum number of instruction cycles. You can usually call this assembly instruction from within both assembly and C code. If using a C Compiler, consult your compiler's documentation concerning the use of assembly language from within C code.
If your MCU does not have a NOP instruction, there is usually an instruction which can provide similar results.
The short answer is NO.I'm using AT89S52 and create delay with timer, so far the fastest from timer is 1uS, is it possible to make it become 100nS ( divide by 10 )?
How about 100 nS ? I want to make a delay for array of LEDThe short answer is NO.
A system clock frequency of 11.0592MHz generates a system clock period of approximately 90ns. However, a single instruction cycle of a AT89S52 requires 12 system clock cycles. Therefore the period of a single instruction cycle of a AT89S52 with a 11.0592MHz system clock is approximately 1.09ms.
Using a timer can rarely achieve a shorter delay than the execution of a single instruction. Besides the time overhead of configuring the timer there is also the time overhead required for the MCU to respond to the timer overflow.
What are you attempting to accomplish exactly? What is the task requiring a 1ns delay?