timer interup in 20 X2

Hansen

Member
How to make Interrup every 100 msec ?

without have externe chips

I use a 20x2 and want to make a counter that make interupt and add 1 to W1 every 20msec


i need it to see if some off the function is finish

how do i build the 100msec interrup

after it have the interrup it need to returp where it come from



Start
Random B1 max
on B1 a,b,c
go start

gosub a
If not finish return
job a it send a seriel command and it ready again after 1.5 sec bot it possible to send another command
return

gosub b
If not finish return
job b it send a seriel command and it ready again after 1.2 sec
return

gosub c
If not finish return
job c it send a seriel command and it ready again after 0.9 sec
return

there can be up to 10 off this function
 
Last edited:

womai

Senior Member
Have a good read through this thread:

http://www.picaxeforum.co.uk/showthread.php?t=8541

It shows exactly how to do this, including the complete code to set up and run the interrupt at a repetition rate of your choice.

Note that I originally developed the code for the Picaxe 28X1, but it should be possoble to adapt it to the 20X2 with only minimal changes (due to different clock frequencies).

Wolfgang
 
Last edited:
Top