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 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.