MC1026
| About | |
|---|---|
| ID | MC1026 |
| Self Triggered | No |
| Clickable | No |
| Input | Yes |
| Output | Yes |
| First line | UNIX TIME |
| Second line | [MC1026] |
| Third line | x (optional; default 2) |
| Fourth line | y (optional; default 0) |
| Craftbook Page | |
Details
- Second Line
- [MC1026]
- Third Line
- x (optional; default 2) = The divisor
- Fourth Line
- y (optional; default 0) = The number to compare the remainder to
When activated, outputs high if the current Unix time (in seconds) mod x is greater than y. Otherwise, outputs low.
In other words: outputs high if ([Unix time] % x) > y. Or: output will be high for x - y - 1 out of every x seconds.
Unix time in this case is the current timestamp provided by the system, in seconds.
Generally speaking, the smaller the value of x is the faster the IC will activate. Additionally, if y is closer to 0 the IC will likely output high for a longer period of time, where as if it is closer to x it will only be on for short pulses.
Default behaviour is to output high if the current Unix time is odd. More specifically, x is set to 2 and y is set to 0 by default.
Examples
The following table shows the output of MC1026 for x = 5 and y = 3:
| Seconds | Remainder | Output |
|---|---|---|
| 1 | 1 | LOW |
| 2 | 2 | LOW |
| 3 | 3 | LOW |
| 4 | 4 | HIGH |
| 5 | 0 | LOW |
| 6 | 1 | LOW |
| 7 | 2 | LOW |
| 8 | 3 | LOW |
| 9 | 4 | HIGH |
| 10 | 0 | LOW |
Notable and Practical Uses
This IC can be used to make asymmetrical and long-period clocks. This can be useful for:
- Clocks that have periods of hours or days
- Lights that blink instead of staying on and off for the same amount of time
- Calendars
- Combining the functions of MCU440 and MC0420
Due to the Unix time value being independent from the game itself, this IC provides accurate real-world timing regardless of lag, skipping the night, or changes to the in-game time.
As such, this IC is well suited for long-period clocks, real-time scheduling systems, and other mechanisms requiring consistent real-world timing.