Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Minimum Delay using a PIC?

Status
Not open for further replies.

amitdandyan

Newbie level 6
Joined
May 8, 2009
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
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...
 

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.
 

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

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
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top