After digging my TI CBL 2 out of a dusty drawer, I've resumed developing calc programs for the platform. My flagship program for the Z80 calcs is CBLLight, a fairly advanced TI Light Sensor program. In the six months preceding now, I got little progress done past adding in rudimentary sanity checking. Today (1 April 2014) I spent the day avoiding the Internet's April Fools Day junk and working on modernizing CBLLight with some code ideas. Currently v1.x runs on the TI-83, TI-84 Plus, TI-84 Plus CSE, TI-85, and TI-86. v2.0 so far has only been completed for TI-82 and TI-83.

CBLLight v2.0, TI-82, and More
In the v2.0 to be released this week, I started with v1.0 for TI-83 (crappy version of source code linked), merged my ideas into the program, and produced a TI-82 port (which in the unreleased TI-83 readmes I said I would never do). Whereas v1.0 and v1.1 attempted and failed miserably to detect the connected interface, v2.0 now accurately detects and displays the attached interface. It also warns if the OS is out of date and if the batteries are low, although on CBL2 and LabPro only. I made some general optimizations in the code, and cleaned up the FASTMODE sampling support to use less code.

CBLTherm, Merging with CBLLight
Given the amount of work I did to interface one sensor, I figured I could write a version for the various temperature sensors that are available. As I found that CBLTherm required very little modification from CBLLight in order to function properly, I figured that I can merge the two and use rudimentary sensor detection (easily done on the CBL 1, I forgot how with the CBL 2 / LabPro but it's just as easy) to select which configurations to load. Since both CBLLight and CBLTherm attempt communication upon startup and don't send any sensor-specific code until after communication has been verified, detecting whether or not a thermometer or light sensor is connected can be done both at startup and at sampling. This means that the sensor can be swapped without exiting or restarting the program, something even my advanced CBLM for TI-68k currently* can't handle.

3 April Update: I've merged CBLLight and CBLTherm, but with the new sensor detection code there's more latency before sampling begins, and I don't plan on adding more sensors. I structured the code to make it relatively easy to add more sensors, but the v2.0 additions are quite large already (2700 bytes / +1 kB). I've discovered that the CBL 2 and LabPro removed the AutoID reading feature, since the technical reference makes no references to reading the AutoID values, unlike the original CBL. After writing my code based on a very messy way involving reading the channel mode names, I realized that there's a method to read the sensor's recommended channel mode in just two lines of code. This should drop latency significantly, but the size reduction shouldn't be as dramatic.

Overall I'm optimistic about the future of these two programs, as they are valuable learning tools with a minimal and lowering learning curve. After they merge and I add a few other sensors and display options, they could become very useful to teachers, students, and independent CBL / CBL2 / LabPro owners (such as myself) alike.

I'd also like to thank Vernier for providing me with critical documentation and help with the earlier versions of CBLLight; without the help, original CBL support would be quite broken.

*I'll add it in very soon.
CBLLight v3.0, the Future of CBLLight is CBLM?
After reviewing some old notes about how sensor AutoID is handled in the CBL 2 and LabPro, I've concluded that it is in fact feasible to write software for the Z80s that includes CBLM's basic feature set. Mixed data types, named variables, and indirection have proved the TI-89 to be a powerful platform for development; while this is great for 68k developers, it leaves a lot to be desired for the Z80 calc users currently confined to these old versions of CBLLight and Vernier's DataMate (yes, there are flashapps for the Plus models; as a TI-83 owner, I don't include those). In short, I've determined it is possible to pack sensor calibration data into a list that can be generated by a script to provide the necessary sensor calibration data. However, for owners of the CBL 2 and LabPro, the sensors contain all the data within their Smart ID microchip or the CBL 2 / LabPro's ROM and can be read directly (the proper way for all Smart ID sensors). By reading this data, CBLLight can operate with full precision, setup info, etc. without any program-supplied data!

Now, the name CBLLight is no longer relevant; this program will be able to do more than just a simple light sensor. In keeping with CBLM's style, I am considering renaming this project to CBLZ.
For the folks not that familiar with CBLM and your other CBL-related projects, does this essentially mean that you'll be creating a set of tools to interface with the CBL/CBL2 devices that is a completely separate alternative to TI and Vernier's own programs and Flash Apps for the z80 TI calculators? That sounds like quite an ambitious undertaking.
Yes. CBLM, when fully loaded, is already getting in the 40kB range (still smaller than Vernier's DataMate, their BASIC software for the non-Flash calcs to collect sensor data), but when working with the Z80s I have to slim things down. Particularly with the non-Flash calcs, Vernier's tools are remarkably sluggish and omit some key features that the CBL 2 and LabPro have included to correct some inefficiencies of the original CBL. Also on the topic of the original CBL, as DataMate does not support the original CBL, ancient programs written specifically for the sensor to be used are needed; this presents inflexibility for those trying to run multiple sensors or who otherwise would like a common environment in which to collect data. CBLM boasts full compatibility for the original CBL, along with forward compatibility with all the sensors I've written software for (about 20), while having near-instant program response time, fully automated quickstart sampling, and a straightforward user interface. This "CBLZ" is my attempt to carry over these features to the Z80 calculators, starting with the TI-83 and maintaining compatibility with the Plus series (excl. TI-84 Plus CSE until I have reasonable testing methods) while possibly backporting to the TI-82.

Unfortunately for our poor TI-82, it just isn't quite suited for data collection. Its short list limit of 99 elements and lack of string support make it unlikely that I could fit the sensor equation database into the program without getting messy in coding layout, so it probably won't see complete support for the original CBL. But as mentioned last posf, retrieving sensor equations from the CBL 2 / LabPro does not require the database, so it will have no problems running.

CBLLight v2.0 is being ported to the TI-73 series! The inefficient typing on the TI-73 is slowing down the porting process, which is about 25% done. A number of the internal mechanisms have to be reworked due to the TI-73 missing proper string support, but string lists have made other parts easier than the TI-83 counterpart.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum