Configuring Interface Lines
|Top Previous Next|
The GA1000 and WA2000 interact with your 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, DI and DO are combined together (this saves one GPIO line on a module that has very few of them). Connecting GA1000 and WA2000 shows related schematic diagrams (the EM500 cannot work with the WA2000).
All Tibbo devices except the EM500 allow the remapping of SPI lines. That is, any four GPIO lines of your device can be chosen to control the GA1000 or WA2000. Wln.csmap, wln.clkmap, wln.dimap, and wln.domap properties exist for the purpose. There is no remapping on the EM500 and manipulating these properties makes no difference for it.
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.
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 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.
XXXXXXXXXXXXXXXXXXXX CODE XXXXXXXXXXXXXXXXXXXXXXXXXX