Author Topic: timed interrupt routine on axon  (Read 1552 times)

0 Members and 1 Guest are viewing this topic.

Offline TomasTopic starter

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 0
timed interrupt routine on axon
« on: August 04, 2009, 06:06:41 AM »
Hi. I want my axon to check if there is any data in the uart buffer. If there is data there, I want it to change the value in a global variable to the number 1. I want it to do this, lets say, one hundred times a second.

Version 1.08 does interrupt a bit different than the last one I used (1.01 I believe). Could anyone provide an example on how to do a timed interrupt function with the new sourcecode? Im at work right now so I cant provide the error message I got when I tried the code that worked in 1.01, but there was a few errors I could not resolve (I know the interrupt function has changed it name slightly, thats not the problem)

I'll provide my error log when I come home. But if anyone could have provided an example in the meantime, I would be very pleased :)

Thanks for any help :)

Offline sonictj

  • Supreme Robot
  • *****
  • Posts: 416
  • Helpful? 11
    • Tim's Workshop
Re: timed interrupt routine on axon
« Reply #1 on: August 04, 2009, 08:48:55 AM »
Here is some code I use for doing just about that.  The way it works is the received bytes are cast into a buffer.  the way to tell how many bytes you have is to see what the difference is between head and tail.


Get Your Ad Here