Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/02/02 11:55
Read: times


 
#25148 - RE: timer tick handling
pranav r .phatak wrote:

"Do you really need a RTOS ?"

"yes. my application involves interfacing with ethernet."


Where is the interrelation ???

I use also Ethernet in a main loop application.
There is no problem to execute some delayed functions e.g. time out handler.

I use a sheduler to serve a list of delayed functions. Every entry in this list need 4 bytes (delay time difference to the previous entry, number of the following entry and address of the function to be executed).

This sheduler can work very fast, since if no time out expired, only a DJNZ was to do.

To use this sheduler two functions available, one to insert delayed functions and the other to remove it before the time out expired.


I call this sheduler inside the main loop every 50msec. So a maximum wait time of 12 sec can be served. For the list are 40 bytes reserved, thus up to 10 delayed functions can be inserted at the same time.

The routine was written in C, so its no problem to use 16 bit delay time or place the list in the XDATA space to add more delayed functions.



Peter


List of 16 messages in thread
TopicAuthorDate
timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      
RE: timer tick handling            01/01/70 00:00      

Back to Subject List