User's Manual

PAGE 25
Technical support (650) 384-0000 www.avalanwireless.com
MOD090-HP
User’s Manual
Programming Examples
Note that these examples apply to SPI mode.
Initialization Example
To initialize the MOD090-HP follow these steps:
1. At startup delay for 300 ms to allow the MOD090-HP enough time to
initialize.
2. Assert /CS_BB (drive the line low) and issue setNetworkKey (0x82) com-
mand and delay for 4 µs.
3. Send 3 bytes with 24-bit Network Key value.
4. Deassert /CS_BB (drive the line high) and delay for 6 µs.
5. Assert /CS_BB and issue setPrivateKey (0x83) command and delay for 4 µs.
6. Send 16 bytes with 128-bit Private Key value.
7. Deassert /CS_BB and delay for 6 µs.
8. Assert /CS_BB and issue setDeviceID (0x84) command and delay for 4 µs.
9. Send one byte indicating what type of device and ID number.
10. Deassert /CS_BB and delay for 6 µs.
11. Assert /CS_BB and issue setStatus (0x81) command and delay for 4 µs.
12. Send one byte with bit 6 set to take radio out of standby mode.
13. Deassert /CS_BB.
14. Wait for Connected Flag to be set
The MOD090-HP is now initialized and connected, ready to send and receive data.
Send Data Example (AP Side)
1. If Connected Flag is clear or FIFO Full Flag is set then end.
2. Else assert /CS_BB (drive line low) and issue setPacket (0x8A) command
and delay for 4 µs.
3. Send rst byte indicating if a broadcast packet or a unicast packet.
4. Send two bytes indicating data size in bytes.
5. Send all data bytes
6. Deassert /CS_BB (drive line high) and delay for 6 µs.