|
-- 900 MHz Wireless Embedded Systems Programming --
|
||||||
| This article will
illustrate
how to use the microEngineering Labs boot-loader software/firmware with a
pair of 900MHz bi-directional RF modems for wireless embedded programming,
and wireless firmware
updates. When direct wired connections aren't an option, you may want to
explore this wireless solution for your next embedded firmware upgrade or
wireless programming connection. The applications for reliable wireless connectivity are virtually endless, and wireless embedded firmware upgrades can be a real blessing for hard-to-reach systems. It took some doing to test the many various RF modems, and come up with a pair that would reliably handle the strict timing requirements for the wireless boot-loader, but the battle is finally over, and here are the results.
A pair of Super Screamer 900 MHz RF modems [shown at left] from Ewave were used for this project. You can find the Super Screamer 900 MHz RF modems at http://www.electrowave.com They have excellent products, and offer outstanding product support. A special thanks to Paul Adams of Ewave who provided quick answers to a few questions I had during my initial setup & testing. Three pairs or RF modems - from three separate manufacturers - were evaluated for use with this design project, and the Ewave units proved superior. The Super Screamers provided the timing, hand-shaking, and ease of setup to bring the project to life. The other modems had excellent features, and will definitely have a place in future applications, but they couldn't handle the strict requirements of this particular "timing-critical" application. Note: The Super Screamers are true bi-directional RF modems - providing full-duplex operation. Special Serial Interface Requirements You'll need to build a pair of DB-9 serial adapters to interface the PC to modem, and modem to PIC. The circuit shown in Figure 1 is the serial interface for connecting the 900MHz Super Screamer RF modem to the PC serial port. These serial interface connections are critical for operation, and will provide the necessary hand-shaking, and processor reset signal on the embedded controller end.
Build the serial interface shown below before proceeding. This will be used for the initial configuration of the 900MHz RF modems, and for the PC to modem serial interface.
Once you have the serial interface connector in Figure 1 finished, you'll need a second for the modem to PIC interface. Figure 2 shows the serial interface circuit for the modem to PIC connections.
Once you have both serial connectors completed, clearly mark each connector for easy identification. It's critical that you have the correct serial connections between modem/PIC, and modem/PC. The Firmware & Boot-Loader Circuit Figure 3 shows the initial test circuit I used for the wireless boot-loader. The boot-loader firmware must be set to receive the firmware .hex file [inverted]. Note: You can modify the circuit below to use any I/O-pin of your choice for RX & TX, if you have the boot-loader firmware to support your particular configuration. I have fully functional wireless boot-loader applications using both the 40-pin PIC16F877 & 28-pin PIC16F876. The beginning of the boot-loading process will toggle the boot-loader modems "CTS" signal providing the necessary logic 1 pulse to the base of the NPN transistor, and resetting the PICmicro. Immediately following the reset pulse, the PIC acknowledges it's ready to receive the firmware download from the PC. The PC boot-loader software then begins sending the firmware .hex file to the PC serial port for transport via RF modem to the receiving PICmicro boot-loader system. The timing and hand-shaking requirements between the PC and PIC are critical during the boot-loading process. This is where the Ewave modems really shine. Even a slight interruption with a direct serial connection is sufficient for the PC boot-loader software to timeout, and cancel the boot-loading sequence. With a wireless connection, this becomes even more critical due to the inherent latency of data transfers between RF equipment.
Setting Default Modem Configurations The Super Screamer RF modems are configured at the factory for 9600 baud communications. We need to bump the baud rate up to 19200 baud for compatibility with the microEngineering Labs PC boot-loader software, and firmware products. Changing the default modem configurations is necessary to avoid having to manually enter the required settings after a power loss. If you have the Super Screamer modems, and haven't installed the configuration software, you'll need to download & install the Ewave modem configuration software utility HERE. Take the following steps to configure both modems for 19200 baud as the default power-up configuration.
Once you have established direct communications at 9600 with one of the RF modems, and the Ewave modem configuration software utility, you're ready to change & save the higher baud rate settings as the default configuration. The rest of the factory default settings do not need changing.
Set & Save 19200 as the Default Baud Rate
You should now be able to power-down the modem, and have it start with 19200 baud as the default power-on baud rate. Configure the second modem the same as the first, and you're ready to use the modems for wireless embedded programming at 19200 baud. Wireless Firmware Loading To use the modems for wireless boot-loading, connect the serial adapter from Figure 1 to the PC serial port, and one of the Super Screamer modems. Connect the adapter from Figure 2 to the other Super Screamer modem, and the PIC boot-loader circuit in Figure 3 [or one similar]. Apply power to both modems, and the PIC circuit. Start the microEngineering Labs boot-loader PC software, and load a compiled .hex file to transfer to the PIC boot-loader circuit. When you click the Program Button on the boot-loader software screen, you should see the following progress indicator on-screen showing the download progress.
When the progress bar disappears, your code should be loaded into the remote system, and automatically up & running. If not, double-check your serial adapter connections, and loader circuit.
|
||||||
|
Back to the PicBasic Projects Section
|