Connecting WA2000 to Tibbo Devices

The WA2000 communicates with Tibbo devices through an SPI interface. Five interface lines are involved:

  • CS — chip select;

  • CLK — clock;

  • DI — data in (must be connected to the DO line of the host);

  • DO — data out (must be connected to DI line of the host);

  • RST — reset.

Most Tibbo devices that can work with the WA2000 allow remapping of CS, CLK, DI, and DO lines. This is done through wln.csmap, wln.clkmap, wln.dimap, and wln.domap properties of the Wi-Fi (wln.) object. The only exception is the EM510 device, which has a fixed set of GPIO lines for interfacing to the WA2000.

The wln. object does not automatically configure these interface lines as inputs or outputs, this is the responsibility of your Tibbo BASIC/C application. To allow the proper communications with the WA2000, configure the following lines as outputs: CS, CLK, DO, and RST.

The wln. object works with these four interface lines: CS, CLK, DI, and DO. The RST line is not directly controlled by the wln. object, so providing a proper hardware reset is your application's responsibility. Any suitable GPIO line can be connected to the RST line. To reset the WA2000, set the RST line LOW, wait for 1 ms, then set the line HIGH.

Special case — the EM510

The diagram below shows how to connect the WA2000 to the EM510 module. GPIO lines are a precious commodity on the EM510 — there are only eight of them available. You get away with using only three lines to control the WA2000 (against the standard five lines).

The EM510 does not allow remapping of WA2000 lines, so the line assignment shown below cannot be changed.

wa2000_em510_connection

To allow the proper communications with the WA2000, configure the following lines as outputs: GPIO7 (CS), GPIO6 (CLK), and GPIO5 (DI/DO).

The wln. object works with these three interface lines: CS, CLK, and DI/DO. The RST line is not directly controlled by the wln. object, so providing a proper hardware reset is your application's responsibility. Here is how to reset the WA2000 from the EM510:

  • Set GPIO7 (CS) LOW

  • Set GPIO5 (DI/DO) HIGH

  • Wait 1 ms

  • Set GPIO7 (CS) HIGH