TI-92 Calculator Low-Level Driver -- Checking Interest

mcstarmcstar Posts: 144
edited 2007-07-10 - 21:16:43 in Propeller 1
I wrote this low level driver to communicate with a TI-92 caculator via the 3-wire D-Bus.· It allows you to send bits and bytes of data to the calculator from the propeller.· It also can receive data from the caculator.·

My intention is to eventually build a program similar to Propterminal but for the TI-92 Cacluator.· This seems ideal because the caculator has a large screen, a qwerty style keyboard, only requires three wires (2 data + grnd) to communicate with and it also has large selection of built-in graphing and data manipulation functions.· Imagine having a propeller in some location collecting data from thermistors, sensors, etc and storing them on an SD card.· Then you connect the TI, view a list of files from· the SD using the TI's screen.· You use the TI's keypad to interact with your custom propeller program, and then the TI could generate graphs, charts, reports etc with some of that information.·

Still, plenty of work is required to get to that point.· The caculator has a large number of variable types that must/could be handled.· This library (tiCommLib) is the first step.· It handles the lowest level of protocol.· It implements the TI's handshaking and can send/receive bits and bytes.· The demo code in TI-92ui.spn creates a simple interface via propterminal to allow you to use your computer's keyboard to send keystrokes to the TI's screen via the Propeller on a USB port (the prop is connected to the i/o port of the calculator on pins· 4 & 5). See the spin code for more information on the hardware and software protocols.· If you have· a TI-92 (or purchase one off eBay for $30) please download and give this a try.· Be aware that although the tiCommLib should work with many models of TI calculators, the demo code is setup to work with the TI-92 only. The reason is that each caculator model has different bytes that must be sent in the header of data transmissions.

I'd like to see if there is any interest in this project before pushing forward with a generalized library. I'm tempted to just create the simplest of programs just to meet my needs, but if there is a large enough interest I might go ahead and work more on the library.


  • parskoparsko Posts: 501
    edited 2007-07-06 - 05:55:19

    That's a great idea!!! I still use my TI-85 everyday! I'd buy a TI-92 just for this. Too bad it only has 68k of RAM. Maybe you could figure a way to share between the prop, SD, and the TI?

  • AleAle Posts: 2,360
    edited 2007-07-06 - 09:05:49
    Depending on the model of TI-92, some accepted a second 128kx8 (1.11 for example) chip to increase the SRAM to well 196 kBytes smile.gif, and that speeds up the calc a bit, because of 16 bit access instead of 8 bit access
  • AleAle Posts: 2,360
    edited 2007-07-06 - 09:07:34
    I forgot, but I still have lying around a board to add more memory to a ROM 1.11 TI-92. It should be soldered into the expansion port, and fits a SO32 68128 SRAM or similar
  • mcstarmcstar Posts: 144
    edited 2007-07-06 - 16:02:25
    The driver I wrote implements the low level (hardware protocol) for communication.·
    It can be used to do a great many things with TI calculators. Spin (or ASM) Code needs to be written that understands
    the TI protocols and can use this driver to read and write data types specific to the calculator models.· I'll be working
    with on an interface library for the TI-92 protocol.·
    If you are interested in learning more about how this works,
    there is a great deal of information here... http://www.ticalc.org/pub/text/calcinfo/
    Look for the download called tixx_guide.zip.· I'll release more information here as I get different things working.
    I'll keep in mind the idea of using the Propeller as an interface to store/retreive Calculator data on an SD card.
    That gives me a way to create something useful while implementing a library of interface objects for the TI-92
    Thanks for your interest in this project.· In the meantime, if you can get ahold of a TI-92, you'll need to make a connection
    between it and the prop.· I got some female sub-mini stereo connectors from Radio Shack for mine.· I wired the tip
    connection to Pin5 and the Ring connection to Pin4.· I'm using a double ended male sub-mini stereo extension wire
    to connect them.· It works fine.· Then the Prop is connected to the computer via USB.·
    I'm generating an interface on the computer via the PropTerminal program.· With this setup, you can load the
    ti-92UI.spin (or ti-92UI.bin) into the prop and hit F2 after the prop program loads.·
    This will awaken the calculator automatically.· Any keystrokes you type on your computer's keyboard will appear on the
    Caclulator's screen.· Many special keys have been mapped. The terminal program will tell you some of them when you enter
    Interact mode.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-07-07 - 20:54:59
    Dusted mine off to find out it is a TI-86. How much fiddling would be involved in making your software work with this one?
  • mcstarmcstar Posts: 144
    edited 2007-07-10 - 14:19:33
    This driver should work with any TI model that has the d-Bus 3-wire connection. The demo will likely need to be tweaked to send the keyboard codes that match up to your calculator. See the documents on the site I mentioned above for the specifics for your calculator.
  • mcstarmcstar Posts: 144
    edited 2007-07-10 - 14:37:03
    I'll try to answer your question in more detail by refering to the docs in the tixx_guide.

    Here is an example of sending some keystrokes to the TI-86

    PC: 06 87 C7 00 Command: Key <M1> (<2nd>+<F1>)
    TI: 86 56 00 00 Acknowledgement of command
    TI: 86 56 00 00 Acknowledgement (fixme !)

    An example of sending keystrokes to the TI-92 is here.

    PC: 09 87 31 00 Command: Key <1>
    TI: 89 56 00 00 Acknowledgement of command

    Notice, the first byte sent is different, the 06 in the TI-86 is an 09 in the TI-92.
    This byte identifies to the calculator whether it is communicating with another calc
    or the PC.
    Also, the TI-86 seems to repeat its response. This should not be an issue though since
    the current driver simply recieves as many bytes as the calc sends and ignores them.

    So, all you should need to do is change that first byte to a 06 and the current demo code should work.
    Open ti-92ui.spin and modify the method TI92SendKey and change the line indiciated below....

    pri TI92SendKey(bKey1,bKey2)
    if NOT \tiLib.SendByte($09)
    term.hex($09,2) ' <- Change this line to term.hex($06,2)
    term.str(string(" send error"))
    if NOT \tiLib.SendByte($87)
    term.str(string(" send error"))

    If that works, you should be able to send keystrokes from your PC to your calc through the Propterminal program.
    If you don't mind, let me know if this works OK.

  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-07-10 - 17:02:34
    Uh oh. Bluff called, and raised. I guess I'll have to make one of those connectors now.
  • mcstarmcstar Posts: 144
    edited 2007-07-10 - 21:16:43
    I just reviewed the coded, the line above the one I marked also needs the $06. Very important since that's the line that actually sends the byte

    if NOT \tiLib.SendByte($09) ' Change $09 to $06

    Of course these changes are only the minimum needed to get the example to work and do not account for good form (ie changing the method names to match your model) .

    BTW, I appreciate your interest in this project. I think it would be a great asset to the propeller community if we could get this concept working for the entire line of TI's. I think Chip's vision to have a completely self contained set of hardware and sofware that does not rely on other OS's (like Windows) is a fantastic one. It will require the entire community to create valuable works that can extend the Propeller and add value. Of course is will also require that the 2nd version of the Propeller is as awesome as it sounds. Microsoft has their eyes on the next generation of tiny computers with no bootup time and no harddrives. Wouldn't it be nice if we got there first?

    I hope this piece of the puzzle will encourage professors, teachers and other school administstrators to consisder including the propeller in their courses. Combine the $12 propeller with a cheapo TI caclulator, and the ability to display its output on an LCD projector and you've just replaced hundreds of dollars in CBL equipment. The opportunity exists for us to have virtually unlimited storage space for the calcs via the propeller and an SDcard and the propeller gets a nice b&W display with a decent keypad with fantastic graphing and mathematical functions. (I can't wait to be able to linearly regress the raw data from a thermistor to come up with a function that predicts its behavior and interpolates acurate values between collected data points!)
Sign In or Register to comment.