[SOLVED] Delays routine in PIC18F1230

Status
Not open for further replies.

panos_papajohn

Member level 2
Joined
Mar 18, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,640
Hi,

I want to make a delay with PIC18F1230.I am using MCC18 compiler. How can I calculate the time that each machine cycle lasts? I want to use the library delays.h and have a delay of 1000ms. Oscillator frequency is 20MHz.

Thank you in advance
Panos
 

you can generate delay using software by just counting the number instructions but its inaccurate and require the program to wait for the completion of delay period or you can use timers interrupt based which is accurate and doesn't require waiting for.....
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…