6. Updating the TReX Jr's Firmware

Current Firmware Versions

  • The firmware that comes preloaded on every TReX Jr motor controller is trexjrv1_0.trx (137k trx).
  • We have released an alternate firmware version: trexjrv1_1.trx (138k trx). Please note that this alternate version is not considered an upgrade over the original version 1.0. Rather, version 1.1 exists to improve serial communication with controllers that require a delay between transmitting and receiving, such as the Basic Stamp. Firmware version 1.1 inserts a 1 ms delay between the last byte of a received command packet and the first byte of the TReX Jr’s transmitted response, which should give your controller enough time to switch from serial-out mode to serial-in mode. Without this delay, some slower controllers will miss the first byte of the TReX Jr’s response, especially if you are communicating at higher baud rates. If your controller can simultaneously transmit and receive, or if it does not take much time to switch between serial-out and serial-in mode, you should use firmware version 1.0 as this will increase the rate at which you can communicate with and control your TReX Jr.

Updating Firmware

To update the firmware, you need to put your TReX Jr into firmware-update mode and then send the new binary firmware file, which you can do using the TReX Configurator program (297k zip) or a terminal program. We recommend you read through the following procedure before performing the update.

  1. Turn off power to your TReX Jr.
  2. Put the TReX Jr into Serial Mode by removing the Mode jumper.
  3. Ground the TTL Serial Out (SO) pin by attaching the Learning-Mode/Firmware-Upgrade jumper.
  4. Attach the Mix jumper.
  5. Restore power to the TReX Jr; the status LEDs should alternately flash red and green.
  6. Remove the Mix jumper; the status LEDs should alternate faster.
  7. Remove the Learning-Mode/Firmware-Upgrade jumper; the green status LED should now briefly flash every second.
  8. Reconnect your TReX Jr’s serial cable to establish a connection between your TReX Jr and your computer.

Option 1: using the TReX Configurator program

Run the TReX Configurator program (297k zip) and click on the “Upgrade Firmware” button, which is circled in the screen capture below.

This will bring up the Firmware Upgrade dialog, as shown below.

Select the COM port your TReX Jr is connected to and enter the firmware update file’s path. Click the Program button to initiate the firmware update. If all goes correctly, you will be prompted to confirm that you want to erase your current firmware and you will then see a progress bar showing you the status of the upload. If no errors occur, you will see a success message when the update is finished.

Option 2: using a terminal program

If you would rather use a terminal program, you will need one that is capable of transferring binary files, such as Tera Term Pro. Connect to the serial port that your TReX Jr is on at 115.2 kbsp with 8-bit characters, no parity, and one stop bit. No flow control is necessary. If you have completed the 8 steps above (so that the green status LED is flashing once per second), you are ready to upload the new firmware file. First, transmit the character ’s’. This will erase the current firmware. Next, transfer the firmware update file (.trx) to the TReX Jr as a binary file. If everything works correctly you should see a ’*’ appear and the TReX Jr’s red status LED will flash five times as it starts up before staying solidly on.