Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:42 09 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Multitasking with MMBasic

     Page 2 of 2    
Author Message
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 06:19am 20 Jul 2013
Copy link to clipboard 
Print this post

  TZAdvantage said  
The simplest and most consistent is to mix interrupts, events, and tasks.
For the 'webserver' i would use an interrupt to catch and queue the request and a running task to process it.
The best would be to use interrupts to catch real world events and use tasks for processing. Because interrupt driven and tasks are not good at both.
Never use interrupts that includes processing and try not to use tasks for polling.


TZA, this discussion has been very good. I have been trying to figure out where I would use tasks instead of events and interrupts. For me, using tasks on a micro controller project is new.

Currently the wifly holds an IO high as long as a client is connected. IO going high triggers interrupt routine. Inside that routine I cancel the rising edge interrupt and wait for html request. The request is responded to and a falling edge interrupt is enabled. The falling interrupt is triggered when the client disconnects and does the final clean up and turns the rising edge interrupt back on. The slowest part of the web server is finding the html file, opening, reading and printing to the wifly serial port.

I hope this discussion continues.
 
cwilt
Senior Member

Joined: 20/03/2012
Location: United States
Posts: 147
Posted: 06:21am 20 Jul 2013
Copy link to clipboard 
Print this post

  vasi said   I guess you'll have to drop the VGA feature for a reliable real time MMBasic which is fine by me (the console is enough). If that is reliable enough for industrial real-time applications imagine the impact...


I turn video off whenever speed and memory is required.
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024