??? 01/01/06 08:37 Modified: 01/01/06 09:38 Read: times |
#106330 - Time Machine |
I just designed a variable time delay generator where I control the digits by the arrow keys, the fire button triggers the pulse width.
![]() It is all fine except I need the time width to vary from 10uSeconds to 999.990 mSeconds with a 10uSec resolution. My first attempt was to convert the 5 digit BCD to one big binary number (long int variable) then make a 10uSec timer interrupt to keep decrimenting this variable to 0. It worked for small numbers but when I go above 400mSec my program gets stuck. It gets stuck for small numbers below 100mSec also. This is the only time I miss Assembly! my instruction cycle is 200ns and I'm programming with C. My second thought was to use two timing algorithms, one for small values (LSB digit) so that I only compare one digit for speed, second algorithm for other digits with bigger timer interrupt steps if these digits are non zero, then switch to 10uSec timer interrupt resolution for LSB digit. I can make the resolution 20uSec if 10uSec too tight. All suggestions are welcome. Mahmood |
Topic | Author | Date |
Time Machine | 01/01/70 00:00 | |
Different question | 01/01/70 00:00 | |
Datasheet? | 01/01/70 00:00 | |
Orientation | 01/01/70 00:00 | |
HMC16215 SG-LY-12- | 01/01/70 00:00 | |
Orientation | 01/01/70 00:00 | |
Mine is different | 01/01/70 00:00 | |
Related question | 01/01/70 00:00 | |
Code ? | 01/01/70 00:00 | |
Concept not code or variant problem | 01/01/70 00:00 | |
Timers | 01/01/70 00:00 | |
20 useconds interval | 01/01/70 00:00 | |
Good Luck | 01/01/70 00:00 | |
variable time delay generator hardware | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
maybe a stupid idea![]() | 01/01/70 00:00 |