Configuring Interface Lines

The GA1000 and WA2000 interact with your Tibbo BASIC/C-programmable devices through an SPI interface. The SPI interface has four signals: chip select (CS), clock (CLK), data in (DI), and data out (DO). On the EM500 and EM510, DI and DO are combined together (this saves one GPIO line on a module that has very few of them). Another line is saved by producing a reset signal from the combination of two other interface lines. Connecting GA1000 and WA2000 shows related schematic diagrams.


All Tibbo devices except the EM500 and EM510 allow the remapping of SPI lines. That is, any four GPIO lines of your device can be chosen to control the GA1000 or WA2000. The wln.csmap, wln.clkmap, wln.dimap, and wln.domap properties exist for this purpose. Manipulating these properties on the EM500 and EM510 makes no difference.

For many Tibbo devices, the interface lines between the main CPU and the Wi-Fi add-on module have already been defined in hardware, and so your mapping must follow the existing arrangement. The code shown below will work on the majority of our devices.

Note that the GPIO line mapping cannot be changed when the Wi-Fi hardware is already booted (wln.enabled = 1 — YES).


The GA1000 and WA2000 also have a reset (RST) line. As Connecting GA1000 and WA2000 explains, the RST line can be driven by a dedicated GPIO line of your device, or through a "joint effort" of CLK and DO, which, again, spares one GPIO pin of your device. There isn't any property to remap the RST line. This is because the RST line is supposed to be controlled by your application directly. It exists outside of the wln. object's realm, so choose any GPIO to control it.