Interrupts & Timers

For maximum flexibility, roZetta is designed to make use of many of the features that ZBasic has built in to their ZX-40a chip. However, the ZX-40a has finite resources and some features will interfere with or impinge on others. A basic understanding of these limitations and interactions will help users decide on the best configuration for their specific application. A good place to start is by reading the sections on Interrupts and Timers in the ZBasic System Library Reference Manual beginning on page 16.

See... http://www.zbasic.net/doc/ZBasicSysLib.php?page=16

roZetta uses InputCaptureEX to capture wireless inputs from the internal RF or IR receiver. This may interfere with RS232 reception on S1-S4 which use software UARTs.

roZetta uses PulseOut to send pulse-trains to IR emitters and/or RF transmitters using the GPIO pins (33-40). This may also interfere with RS232 reception on S1-S4.

If the optional RTC daughterboard is installed, roZetta uses the I²C related commands to communicate with it. This may also interfere with RS232 reception on S1-S4.

This means that those who use an internal wireless receiver (IR or RF) and those who transmit pulse-trains, will likely miss any simultaneous incoming data on the software UART RS232 ports. The MR26A (or MR26E) can be used on S1-S4 and can draw power from roZetta. It reports each RF code received and since most X-10 RF transmitters always send 5 or more copies of the code, the odds of missing a code are greatly reduced. Note that roZetta will only report the first received copy, ignoring any duplicates that occur within ~500µS.

There are external module designs for wireless inputs that will be released shortly after roZetta is released. The MR26X is merely a replacement PIC for the standard MR26A/E that allows it to report X-10 security RF as well as codes from the CR14A (Ninja Camera Remote), Digimax 210 RF Thermostat (Europe 433.92MHz) and, in N. America) Chamberlain garage door sensors (which need to be tuned to 310MHz from 312MHz).

Other than the MR26X, most of my external module designs can use either RS232 or RS485. roZetta supports RS485 on S4. RS485 modules are polled for input. This reduces the chances of missing an input but increases input latency as the polling of the modules is spread out to reduce the load on the ZX-40a. All active RS232 input buffers are checked on each pass through the main loop but only one RS485 module is polled (and some time is allowed for it to respond before another is polled) so RS232 input latency is much lower than RS485 input latency.

If any GPIO pins (33-40) are configured as digital inputs, any change in logic level will trigger a ZX-40a Interrupt. These are handled within a few ticks of the ZX-40a RTC (512 ticks per second).

Copyright: No part may be reproduced except as authorized by written permission. This restriction extends to reproduction in all media.