Configuring Interface Lines
|Top Previous Next|
The GA1000 add-on interacts with your BASIC/C-programmable device 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 shows related schematic diagrams.
All Tibbo devices except the EM500 allow remapping of SPI lines. That is, any four GPIO lines of your device can be chosen to control the GA1000. 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.
The GA1000 also has a reset (RST) line. As Connecting GA1000 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.
This said, some Tibbo hardware has all the choices made for you already. We are talking about the NB1000 board (part of DS100x) and the EM1206EV board. On these boards, all the necessary hardware connections to the GA1000 are already there, so your mapping just has to follow them. With the exception of the EM500, you have a complete freedom to map any way you want on all other devices, but why would you? We recommend you to follow this scheme:
The above sets three schemes: one for the EM500 module and related devices, the second one for the EM1206, DS1101, DS1102, and related devices, and the third one for all other devices including the EM1000, EM1202, etc.
Here is the code snippet that prepares GPIO lines: