Wednesday, August 17, 2011

Odin's Day

Just learned from Wikipedia that Wednesday derives etymologically from "Woden's day," where Woden is an Old English name for Odin, ruler of Asgard in Norse mythology.  You learn something new every day!

Things to do today:
  1. [ ] See what pulse rate I can get at 115,200 baud when connecting directly to the PC.
  2. [,] Implement flyover mode on Wi-Fi board and see what pulse rate I can get with that.
  3. [,] Look at hardware flow control (CTS/RTS). 
  4. [ ] Maybe design a solution for adjusting the baud rate in software.
I did a quick check on the flow control issue... Although it appears to be supported both by the Altera UART and by the EZURiO module, of course (duh, I forgot) there are no pins for it in the Sparkfun level shifter module, so there is no way to get it working at the moment, unless we build our own new level shifter.

We went to Radio Shack and got components to breadboard a new level shifter that will handle the hardware handshaking signals.  However, first I might try just bypassing the RS-232 levels entirely, like I did when communicating with the DE3 board and the Wi-Fi module.

I'll need to solder a new DE9 (D-sub 9-pin) connector:  A female connector, with the following pins connected by medium-length wires to pins inserted in the complementary expansion-header through-holes of one of the Wi-Fi boards:
  1. J2 pin 8 (M_DCD)  --> DE9 pin 1 (DCD)
  2. J2 pin 21 (M_TX)   --> DE9 pin 2 (RxD)          (Needed)
  3. J2 pin 25 (M_RX)   <-- DE9 pin 3 (TxD)          (Needed)
  4. J2 pin 10 (M_DSR) <-- DE9 pin 4 (DTR)         (Needed - Autorun signal)
  5. J2 pin 38 (GND)      ---  DE9 pin 5 (GND)        (Needed)
  6. J2 pin 12 (M_DTR) --> DE9 pin 6 (DSR)
  7. J2 pin 19 (M_CTS)  <-- DE9 pin 7 (RTS)        (Needed for flow control)
  8. J2 pin 25 (M_RTS)  --> DE9 pin 8 (CTS)        (Needed for flow control)
  9. J2 pin 6 (M_RI)       --> DE9 pin 9 (RI)
Actually, before I go to all that trouble, let me first just try using the one that I already made earlier for use with the DE3 board (GPS app).  We will need to build a new one later though.

As a bonus, with this approach, we can monitor a duplicate copy of the Wi-Fi board's serial output in a UwTerminal window on the PC, using the normal serial port (which is still enabled for output only).

Installing the latest autorun file on that Wi-Fi board.  It works fine for communications with the PC.  Now regenerating the SOPC system with UART flow control support turned on.  I imagine I will probably also have to regenerate the BSP and recompile.  Doing that now.  It compiles fine, but I'm still not sure if the STDIO library is really using those signals.  We'll find out...

After we got back from Radio Shack, Darryl made the changes to add the enable signal (RUN_PAUSEn) throughout the input capture datapath, and got it to compile.  I'm combining that with my changes to add the CTS/RTS signals, and recompiling.

I think I'll wait to actually test these changes until tomorrow, since it's getting late... Heading home now.

At home, did some work to prepare for setting up flyover mode in the script.  Added support for it to modules\network\bridges.uwi, so that we can now just do goto_mode(BM_FLYOVER) to enter flyover mode, and we can leave flyover mode by just calling goto_mode() with any other bridge modes.

Added a "flyover" script command in modules\commands\cmd{parsing,handlers}.uwi.

After we've verified that the "flyover" command works, we can change 4_main.uwi to make it the default bridge mode (change the docmd_trefoil() call to docmd_flyover()).

Regarding baud rate setting:  It would be easy enough to add commands to the FEDM and WiFi board's command-line interpreters to change the baud rate, but we have to be careful... After changing the FEDM's baud rate, communication to it will be cut off until the WiFi board's baud rate is also changed.  The command to the FEDM can be called "BAUD", while the one to the WiFi board can be "baud".  In either case, its single argument is one of the supported baud rates, as a decimal integer.  It would be good after changing the baud rate on both sides to do a PING to the FEDM to verify that communication is still functioning.

But it's getting late now, so I think I'll wait to do those particular changes until tomorrow...

Also, note to self:  Take the "+" signs out of the PULSE message to save bandwidth.

    No comments:

    Post a Comment