| Author |
Message |
amitdandyan
Joined: 08 May 2009 Posts: 14
|
23 Sep 2009 10:48 Minimum Delay using a PIC? |
|
|
|
|
| Can anyone please tell me, what is the minimum delay I can get using a PIC ? I want a delay of 500ns.....Please also specify the series of the PIC...
|
|
| Back to top |
|
 |
btbass
Joined: 20 Jul 2001 Posts: 1187 Helped: 113 Location: Oberon
|
23 Sep 2009 17:13 Re: Minimum Delay using a PIC? |
|
|
|
|
The minimum delay would be one 'nop()' instruction.
Which with a 4 Meg oscillator would give you 1uS delay.
An 8 Meg oscillator would give you your 500nS delay.
|
|
| Back to top |
|
 |
Google AdSense

|
23 Sep 2009 17:13 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
amitdandyan
Joined: 08 May 2009 Posts: 14
|
06 Oct 2009 10:07 Re: Minimum Delay using a PIC? |
|
|
|
|
void main()
{
TRISB = 0;
PORTB = 0;
for(;;)
{
PortB.F0 = 0;
asm
NOP;
PortB.F1 = 1;
}
}
I have developed this program to get the minimum delay from PIC16F876-A.....I hv used a crystal of freq. 20MHz.....but i hv not been able to solve the purpose...as no output is visible on Oscilloscope....!!!!!!!!!!!!!!!!!!!
Please help...
|
|
| Back to top |
|
 |
madhan7710
Joined: 19 Jun 2007 Posts: 13 Helped: 1
|
06 Oct 2009 10:57 Re: Minimum Delay using a PIC? |
|
|
|
|
Hi,
Try giving equal delay for both on cycle and off cycle.
like this...
loop:
portb.0 =0
nop
portb.0 =1
nop
goto loop
|
|
| Back to top |
|
 |