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