Status LEDs and MD Button
For the basic control and status indication TiOS devices rely on a single push-button and a pair of red and green status LEDs. The push-button is knows as the "MD", "M", or "setup" button.
Tibbo Project System (TPS) devices, programmable serial controllers, and boards all have the LEDs and the MD button onboard.
Programmable modules, such as the EM1000, provide I/O lines for connecting the LEDs and the button externally (more) .
Every good design incorporating a Tibbo module should feature the status LEDs and the MD button on the product's host board. Some modules, such as the EM1206+RJ203 carry the status LEDs onboard in addition to providing the I/O lines for wiring in external LEDs.
Many Tibbo devices have additional status LEDs for the Ethernet link and Wi-Fi status indication. Some devices also have the reset button. I will not be delving into these here.
You realize, of course, that if I gave the status LEDs and the MD button a topic in The Introduction section then they must be pretty important — and they are!
These are very useful for judging the current device's state.
Presented above are three important patterns that you may see when the VM is not executing your application.
These patterns are "fast-blinking", almost at the limit of your eye's ability to discern them.
When the VM is executing your application the status LEDs are under the control of the pat. (pattern) object. Hence, your application can also use status LEDs for its own needs.
Finally, these LEDs play yet another set of patterns when the device is booted in the Monitor/Loader .
The MD button
This button serves three purposes:
1. To get you into the the Monitor/Loader.
The Monitor/Loader (M/L) is a resident firmware that is always present on all Tibbo devices.
The M/L allows you to upload TiOS firmware (possibly, with a Tibbo BASIC/C app attached) into your device.
Normally, such uploads can be done from within TiOS, but this becomes impossible if you accidentally brick your device (for example, by uploading a wrong firmware file).
In this case, the only way to "unbrick" it is by using the firmware upgrade function of the M/L.
To enter the firmware upgrade mode of the M/L, power up your device with the MD button pressed.
For more information see the Monitor/Loader section.
2. To bypass the password.
Tibbo devices can be password-protected .
If you don't remember the password, performing a device-related action in the Device Explorer while keeping the MD button pressed will allow you to bypass the password.
For example, if you forgot the password then keeping the MD button pressed while you click Set password... will allow you to clear the password or set a new one. Without the MD button pressed you would be required to enter the old password first.
3. To serve as a generic button.
The button. object gives your applications access to the MD button.
This is very useful as there is almost always the need to use a button for something .
In fact, the very first code example you saw relied on using the MD button.