Often times in project coding development, the programmer need to generate some sort of delay. It is hard and tedious to calculate by hand, an alternative way is to use the Pic Delay Code Generator for ASM Programmers made by N Golovchenko.

This is a very useful software for Pic Programming in Assembly Language in ways that it saves both time and energy for delay calculation.



For long delays (> 10 cycles) the code is based on nested loops using 'decfsz' and 'goto' instructions. Small delays are built using 'goto $ + 1' (2 cycles delay) and 'nop' (one cycle delay).

To calculate nested loop counter values the code generator uses an optimum search algorithm. The algorithm finds such values for counters that achieve good approximation to the specified delay.

Even if there is an error in the first block of nested loops, the rest of the code fixes that. As a result, one cycle resolution is achieved.


Download:

http://techref.massmind.org/cgi-bin/delay.exe

Views: 15701

Comment

You need to be a member of Personal Mechatronics Lab to add comments!

Join Personal Mechatronics Lab

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service