Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Keoni29 on August 31, 2011, 12:26:16 pm

Title: Get and Send communication
Post by: Keoni29 on August 31, 2011, 12:26:16 pm
I need to know how the Get and Send functions work. Not how to use them, but how they communicate with other devices. I found this picture on the web:
(http://zastava.student.utwente.nl/linkguide/graphics/put_chart.gif)(http://zastava.student.utwente.nl/linkguide/graphics/get_chart.gif)
Is it really this simple? Does it just send one byte using this method? No machine id etc.?
Title: Re: Get and Send communication
Post by: Deep Toaster on August 31, 2011, 12:55:30 pm
Oh, it's a lot (lot) simpler than that. Remember that TI-BASIC was designed for people with next to no previous experience in programming (many of us started in TI-BASIC, after all). Here's a brief explanation.

First off, Get and Send are not the functions you're looking for. In TI-BASIC, Get and Send receive from and send to CBL/CBR devices (http://www.vernier.com/products/texas-instruments/), not calculators. To do calculator-to-calculator linking in TI-BASIC, you use GetCalc.

GetCalc is amazingly simple to use. (After all, BASIC is a beginner's language.) Put a variable name in the parentheses, and GetCalc(VAR) grabs that variable from the other calculator (if it exists) and stores it on this one. So if you want to transfer the list L1 from calculator A to calculator B, all you have to do is run
GetCalc(L1)
from calculator B. That's it!

Well ... there is one catch. The sending calculator (calculator A) must be in "low-power mode." What this basically means is that it needs to be in some sort of standby context, for example on the homescreen or waiting for the ENTER key during a Pause in a program. In other words, it can't be actively calculating anything.

Here's a very stripped-down example of two programs (prgmA for calculator A, and prgmB for calculator B) that use GetCalc.Hope this helps!

(Yay I actually used Homer!)

EDIT: Guess I should have asked you what you wanted before writing a tutorial on a totally different subject. Sorry.
Title: Re: Get and Send communication
Post by: calc84maniac on August 31, 2011, 01:51:26 pm
I need to know how the Get and Send functions work. Not how to use them, but how they communicate with other devices. I found this picture on the web:
(http://zastava.student.utwente.nl/linkguide/graphics/put_chart.gif)(http://zastava.student.utwente.nl/linkguide/graphics/get_chart.gif)
Is it really this simple? Does it just send one byte using this method? No machine id etc.?
That's the general protocol for sending/receiving one bit (R and W refer to the two controllable lines in the link cable). The only thing I can see wrong in that diagram is directly under GET: The (R=1 & W=1?) should loop if Y, and continue if N.
Title: Re: Get and Send communication
Post by: calcdude84se on August 31, 2011, 11:23:14 pm
Indeed, that is how one bit is sent. For the whole protocol (and more!) I recommend the TI Link Protocol & File Format Guide v1.4 (http://www.ticalc.org/archives/files/fileinfo/247/24750.html). It's old, but that's fine unless you want Nspire and better USB information.
Edit: Given Deep Thought's comment and calc84maniac's post, what's this doing in the TI-BASIC section?
Title: Re: Get and Send communication
Post by: Deep Toaster on September 01, 2011, 12:02:55 am
Indeed, that is how one bit is sent. For the whole protocol (and more!) I recommend the TI Link Protocol & File Format Guide v1.4 (http://www.ticalc.org/archives/files/fileinfo/247/24750.html). It's old, but that's fine unless you want Nspire and better USB information.
I think he got those pics from an online version: http://zastava.student.utwente.nl/linkguide/ti83+/