PIC16F887 DELAY TIME
Posted: Thu Sep 27, 2018 3:33 pm
Hello to all!
I made some tests with PIC16F887, to get some delays that I need for a code..I make a simple code to check the duration accuracy of delays...I note that for a delay 80μs at FC7 code the scope shows 100μs and for delay 5μs the scope shows 20μs....Is there something wrong with FC7 code configuration, or something else? ...at hardware there are a crystal 20.000 MHz , 2X22pF for crystal, and a led to check the code run...the test code run well, but the delay timing is wrong..I send you the test code for any idea about to how to have the correct timing...thanks.
I made some tests with PIC16F887, to get some delays that I need for a code..I make a simple code to check the duration accuracy of delays...I note that for a delay 80μs at FC7 code the scope shows 100μs and for delay 5μs the scope shows 20μs....Is there something wrong with FC7 code configuration, or something else? ...at hardware there are a crystal 20.000 MHz , 2X22pF for crystal, and a led to check the code run...the test code run well, but the delay timing is wrong..I send you the test code for any idea about to how to have the correct timing...thanks.