I'm truly amazed tonight
I've managed to get Henriks DIV32 program to run and the accuracy is absolutely spot on! And I mean absolutely spot on!
I wanted a program that could PAUSE randomly within a period of 1ms to 3000ms.
Here's part of the code:
To test it I ran it through the Serial Communicator with no pauses to speed the runs up and set up a series of IF_THEN_STOP statements if any of the conditions were met. Sure enough 2997,2998 and 2999ms were within the program range and stopped the program.Code:main: Random X Y = X * 1000 Z = DIV32 21845 SEROUT2 PORTC.3, 16780, [DEC Z, 13, 10] IF Z = 2997 THEN STOP IF Z = 2998 THEN STOP IF Z = 2999 THEN STOP IF Z = 3000 THEN STOP IF Z = 3001 THEN STOP GOTO main
Then for the big one 3000ms, that was also there and stopped the program!
What about 3001.....Nope, the program runs from 1 to 3000ms absolutely stop on.
Henrik, mackrackit, thank you both and good night.
Dave





Bookmarks