W0EB/W2CTX Firmware Source Code Sketches #ubitx

Jim Sheldon

Due to the fact many people were having a bit of a problem compiling some program sketches after the TSW group changed over to using the Teensy 3.6 for the MPU, we chose to publicly release only the HEX files for each subsequent release. The source code was still available to anyone on request with the caveat that if you modify it, you are on your own (still applies here as well) as we can't know your hardware configuration and don't really have the time to go through your source code as well as ours to see what you did. If it doesn't work when you modify it, you will have to figure out why and fix it yourself. All our source code is well documented and commented to the point the routines should be easily understood by anyone familiar with the C language and the Arduino/Teensy programming IDE's capabilities.
Today we decided that providing the source code only on request wasn't really in keeping with the true "Open Source" concept of software and so the source code files to all of our recent and ongoing uBITX software will now be in an openly available "Latest Source Code sketches" directory in the "Files" section of the TSW website (www.w0eb.com)
Feel free to download and try any of them. All the programs are complete with PDF files containing the necessary instructions for use (and wiring mods if they are needed).
Also, because of the necessary modifications to the Arduino's "TeensyDuino" portion of the IDE to allow our Teensy 3.6 based versions to be compiled, please read the following carefully. This information is also contained on the main page of the www.w0eb.com website and again in the MANDATORY LIBRARIES directory in the "Files" section of the webpage as a README file.
Because we moved the I2C bus from "Wire" (SDA0/SCL0) to "Wire2" (SDA2/SCL2) on the Teensy for more efficient circuit board trace routing on our Teensy 3.6 based "BITeensio" card, more than a few programming headaches were encountered. It appears that nobody has an I2C library for the displays that uses other than SDA0/SCL0 since the Arduino family only has one I2C port. The Teensy 3.6 has four I2C ports but the currently available libraries don't have the other ports (Wire 1,2 and 3) well defined. This makes it difficult to use anything other than "Wire" (SDA0/SCL0) to communicate with and control the Si5351 clock chip and the I2C display(s). (Yes,multiple displays ARE possible.)
Since we were already committed to using "Wire2" for all the I2C stuff (Si5351 clock and the displays), our chief programmer W2CTX bravely undertook the monumental task of re-writing one of the libraries to make it all work. We are happy to report that went well and software compiled for the BITeensio is working nicely with the new hardware.
The reworked library is now available in the "MANDATORY_LIBRARIES" directory of this website and in order to use it, the Arduino IDE (with "Teensyduino" additions) will have to be modified a bit to keep things compatible.
First, you have to remove the library named "Wire" from the Arduino/hardware/Teensy/avr/libraries directory. Next, run the IDE and under the "Sketch" pull down menu, click on "Include Library" and then under the list that opens, click on "Add ZIP Library". Point it to where you have the "Newliquidcrystal_Wire2_1.3.5.zip" file saved, select that file and click "Open". The new library will be saved to the proper place.
In order for this library to work properly the "Wire" library in the Teensy's hardware libraries directory (see above) MUST be deleted. Don't delete the one in the "Arduino" hardware libraries directory though or you won't be able to compile a lot of Arduino programs. (This "How to use the library" information has been included in the MANDATORY_LIBRARIES directory as a "README" file.)
Jim Sheldon
for the TSW team

Join BITX20@groups.io to automatically receive all group messages.