I'm happy for the interrupt to be taking 75%+ of the CPU time, as the light text processing is neither time consuming or time sensitive.Įven better, it would potentially be possible to look deeper into other workings of the library, and tell the interrupt to fire off at exactly the right time, though I'm not sure how complex this would be to do. What I'd like is to offload the call to n() to a timed interrupt such that I can ignore it from the body of my code, has any one tried this? Are there any references or examples that are available? I'm confident that it wouldn't be hard to do, I just can't help but think that there must be a gotcha in there somewhere. I could use trial and error to determine how far apart in the code such calls can be, but this all feels a little cluttered and inefficient. Unfortunately things get a little more complex when data is found on the serial port as all of the code to process such events must be filled with frequent calls to n() to avoid skipping steps. I've just started writing pseudo code, and the code effectively checks the serial port then runs n() time about. Most instructions will be to move to a location, followed by progress report every few hundred ms, there will be no high frequency short moves happening. I'd like to write something that basically boils down to a custom g-code interpreter, my needs are not too complex so it will be massively cut down relative to the likes of GRBL etc, but it will be custom enough that I do want to do it myself. I'm completely new to using the library, but am very impressed so far. I've been lurking on here for a while, and have searched for references to this, but see nothing that looks relevant.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |