In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: pjv, Will you be sharing your source code with the SX community? I think what you are offering could be quite useful. Others more qualified than I will need to weigh in on the feasibility of incorporating it directly in SX/B. Bean, Virtual peripherals that run in the background in SX/B would be great! I am envisioning a Serin command that receives a specified number of bytes in the background then [b]calls[/b] a user-defined subroutine to process the data when it is ready. For Serout, I envision it sending a declared number of bytes from a buffer, then [b]call[/b]ing a user-defined subroutine when the buffer in empty. The user-defined subroutines could be as simple as setting a flag or more complex such as processing or formating data. From my perspective, having the VP [b]call[/b] a subroutine when it needs more data or has data ready to be processed is more useful and seems like it would make more efficient use of CPU time. Sure I can always check the registers to see if more data is ready or needed but I think having the VP trigger a call to that section of code is a better approach. Other thoughts... It seems like a code-generating "Wizard" might be useful here. It could ask you questions about your clock rate, the number of tasks to be run, the required update frequency of each task, etc. and maybe warn you that although you requested an update frequency of X for task Y the best that can be achieved with the current configuration is a rate of Z. When the "Wizard" completes it would generate a section of code to achieve the functions requested. pjv again, I am clearly more familiar with preemptive multitasking as it has a "set it and forget it" mentality to it. For a cooperative environment, it seems much more likely that a change to subroutine "Z" might suddenly have an adverse effect upon the timing of everything else that is trying to run. It may be a more powerful environment, but if it is not easy to use only power users will benefit from it. This might be ok and in my opinion is better than not having it all. But since you asked for input, I will volunteer my opinion that the easier it is to implement the more useful it will be... to me anyway! ;) - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157842#m160937 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)