The Adafruit XBee adapter kit arrived today and now I have a working wireless ZBasic setup. For those interested, I offer step-by-step instructions for point-to-point communication with two XBee Pro XBP24 modules between a ZX-40n device and a Windows 7 desktop:
STEP 1: Configure Xbee devices with X-CTU software.
--------------------------------------------------------------------
* Download X-CTU from:
http://www.digi.com/support/productdeta ... =utilities
* For those running 64-bit Windows 7,
www.digi.com only offers a 32-bit version of X-CTU. Download it anyway. AFTER THE DOWNLOAD, RIGHT CLICK ON THE X-CTU ICON, SELECT PROPERTIES, SELECT THE COMPATIBILITY TAB, AND SELECT THE CHECKBOX CALLED "Run this program in compatibility mode for: Windows XP (Service Pack 3). This worked for my 64-bit system.
* Connect first XBee device to PC.
* Set "PAN ID"
* Set "MM-MAC MODE" to: Option 2 - 802.15.4 WITH ACKS
* Set "BAUD RATE". Start with 19200 (factory setting is 9600)
* Repeat process above for 2nd XBee. Make sure all settings exactly the same.
* In X-CTU, make sure XBee devices function properly by pushing the "Test/Query" button in the main "PC Settings" tab. Make sure baud rate is set to correct speed (19200 if you followed the settings above). Make sure you select the correct Com Port.
STEP 2: Configure ZX-40n with Hard Serial Line
-------------------------------------------------------------
* The steps below assume you have a working system with Windows, the ZBasic IDE, and the ZX chip. Steps also assume you have downloaded programs successfully on the host ZX chip.
* Make sure your ZX chip has bootloader v1.4 or later.
* Make sure your ZBasic IDE (v1.5.6) and compiler (v3.3) are up to date. The versions in paranthesis worked for me.
* Open the IDE.
* Open your ZBasic program that worked successfully with a hard serial line.
* Open "Serial Port Options"
* Select the "Use ATN Character" checkbox, select an ATN charater, AND UN-CHECK THE "CHANGE SPEED FOR DOWNLOAD" TO PREVENT SPEED CHANGE FOR DOWNLOADING. THIS IS REQUIRED BECAUSE XBEE DEVICES CAN NOT ADAPTIVELY CHANGE BAUD SPEEDS.
* Set Baud Rate to value programmed in XBee devices in STEP 1.
* Reminder: all steps up to this point are with the hard serial line. The is necessary in order to set the ATN character on the ZX chip via the compiled & downloaded program with settings above.
STEP 3: Re-Wire ZX-40n Device
------------------------------------------
* Disconnect power to ZX chip.
* Remove the MAX232 level shifter - its no longer needed!!!
* See
http://www.zbasic.net/doc/ZX-40_Schematic.pdf
* Keep the 2N3904 transistor associated with the ATN signal.
* Also keep the pullup resistors for the ATN and TXD signals.
* Attach XBee device to Adafruit adapter kit (
http://adafruit.com/products/126 )
* Connect adapter kit +5V and GND to ZX power rail.
* Connect adapter kit RX pin to ZX-40n pin 14.
* Connect adapter kit TX pin to ZX-40n pin 15.
* Connect adapter kit DTR pin to ZX-40n pin 9 (again, 2N3904 transistor required)
STEP 4: Wireless ZBasic Communication
----------------------------------------------------
* Power up system.
* Open IDE
* Open "Serial Port Options" and select Port associated with other XBee device connected to PC.
* Make sure the settings in STEP2 still apply.
* Program and Download ZBasic programs as usual. Behind the scenes, it will happen wirelessly & seamlessly.
GOOD LUCK.