Go to Triangle Digital Support Home Page TDS9092 TECHNICAL MANUAL
Programming
Multitasking summary
Live website search
Enter key words
 

MULTITASKING SUMMARY

AVAILABILITY

One form of multitasking is available on the TDS9092 embedded computer. If you need a full pre-emptive multitasker, look at the TDS2020F computer.

 

q       Interrupt Multitasking where an interrupt swaps the Forth system for a new one at regular intervals, runs one pass through a high level Forth word and then returns, so forming a background loop. This is a standard feature of TDS9092 in the Forth ROM.

 

In addition, high level Forth code can be attached to any interrupt, whether internal or external.

MULTITASKING WORDS

This is a list of words defined within the Forth ROM and files _TIMING.TDS and _EVERY.TDS which are available for use in application programs which require multitasking.

 

ASSIGN

( addr - )

Used at compile-time only to allow a Forth word to be executed on interrupt or as a regular background task. See pages  90-95. E.g. OCI ASSIGN RINGER associate RINGER with output compare interrupt of 16-bit timer)

DELAY

( d - )

Delay by 32-bit number d units. 1 unit=814ns

EVERY

( d - )

Perform following word every d tenths of a second. Maximum that can be used is 1638.3  secs (27 mins). d is a 32-bit number but only lower 16 bits used. Application is background execution of one or many programs at defined time intervals. E.g. Run routine AAAA every 100ms, BBBB every second and CCCC each minute.

LATER

( u - )

Used in interrupt multitasking to specify that the word it is included in should be run again u timeslots later. 1 slot=814ns.

LONG

( - addr )

A variable forming a 16-bit extension to the 16-bit free-running timer.

LONGER

( - addr )

A variable forming a 16-bit extension to LONG

MS

( u - )

Delay by 1 to 65535 milliseconds. The Forth ROM version is based on software loops but the redefinition in _TIMING.TDS gives real-time.

REAL

( - t )

Returns real time as 48-bit 2s complement no. Each unit is 814ns; there are 1228800 per second. 32-bit counter overflows every 58 mins 15.253 secs, 48-bit counter overflows every 7 years 95 days E.g. REAL DROP gives a double number repeating every 58mins

RETURN;

( - )

Used instead of ; to end a high level Forth word which is to execute on interrupt and which will be the subject of an ASSIGN statement. See INTERRUPTS.

Go to Triangle Digital Support Home Page Go to top   Next page