PDA

View Full Version : TI 84 Plus Calculator sPi



Knight
01-12-2008, 12:57 PM
Here is my code for creating a sPi program for calculators. I know most people have the same calculator (84, 83, ...), but I just wanted to try this out. My problem is how to run calculation along side the timer function. :(

Calculate pi:


1->S
0->C

For(A,1,4000,2)
(4/(S*A))->B
B+C->D
D->C
(-1*S)->S
End

Disp "Pi ="
Disp (C+0.0005) // Error correction due to using a small number. (4000)
Output(1,1,"")


Timer: (Sadly I didn't create this. This goes out to Ticalc.org.)


For(Z,0,9)

For(X,0,59)

For(M,0,99,7)
Output(1,4,Z)
Output(1,5,":")
If X<=9
Then
Output(1,6,0)
Output(1,7,X)
Else
Output(1,6,X)
End

Output(1,8,":")
If M<=9
Then
Output(1,9,0)
Output(1,10,M)
Else
Output(1,9,M)
End

End

End

End


I can't seem to make it so that both run at the same time, and that the timer stops when Pi is found. I bet it is something obvious. :( (Sorry it has been a while since I have coded anything.)

My goal will be to over clock my calculator. :shocked:

MotF Bane
01-12-2008, 03:23 PM
I'll take a look at those during Stats - plenty of free time there.

AliG
01-12-2008, 03:30 PM
I actually like making programs for my 84 silver, its fun and makes math homework quite a bit more efficient, not to mention its simple to do:D

I'll put it in once I have some spare time, but I've never messed with timer functions so I may not be of much help

Knight
01-12-2008, 05:57 PM
Thank you both for the replies. I thank you for testing this stuff out.

The timer is pretty basic. Not bad, but not the best. As long as we can all compare scores that were determined by the same timer.

Is there a way to bypass "2nd" + "ON"? That would be heaven for some of my other work. :D

MotF Bane
01-12-2008, 08:43 PM
Thank you both for the replies. I thank you for testing this stuff out.

The timer is pretty basic. Not bad, but not the best. As long as we can all compare scores that were determined by the same timer.

Is there a way to bypass "2nd" + "ON"? That would be heaven for some of my other work. :D

For shutting down the calculator? It times itself to shut down by inactivity also, but otherwise, not really. "Alpha" + "ON" also works for some methods.

Knight
01-12-2008, 09:00 PM
For shutting down the calculator? It times itself to shut down by inactivity also, but otherwise, not really. "Alpha" + "ON" also works for some methods.

I should have been more clear. :) You know when you run a program that takes a long time to finish? Well when you hit the "2nd" key or the "Alpha" key then "ON" the program breaks with an error. I want to disable that break so that the program can't end. :)

MotF Bane
01-12-2008, 11:21 PM
I should have been more clear. :) You know when you run a program that takes a long time to finish? Well when you hit the "2nd" key or the "Alpha" key then "ON" the program breaks with an error. I want to disable that break so that the program can't end. :)

Just the "ON" key by itself is enough to error the program out. I do not believe it is possible to disable that - it might be a safety code as a precaution. We have Ctrl + Alt + Delete for computers, calculators have their "ON" button.

Martijn
01-14-2008, 09:44 AM
Oh, I'll see if I can run this on my TI83... I need to overclock it now :D

tiborrr
01-14-2008, 10:39 AM
Hehe, i have Ti-92, will try it soon.

Knight
01-14-2008, 04:09 PM
Oh, I'll see if I can run this on my TI83... I need to overclock it now :D

The sPi and Timer function both work independently. I need someone smarter than myself to try and combine to two so that we don't need to use an outside timer. (ie: stopwatch) But by all means go ahead and try this out. Let us know what you experience. :up:


Hehe, i have Ti-92, will try it soon.

I would love to see what we can get out of that. I have never heard of the Ti-92 and of its CPU. Could be fast. :D

tiborrr
01-23-2008, 10:14 AM
Man, cant seem to find the PC cable. Anyone got any eBay links to buy one?

Knight
01-24-2008, 04:42 PM
Man, cant seem to find the PC cable. Anyone got any eBay links to buy one?

Sorry, Ebay is new to me, so forgive me if I post something wrong.

http://search.ebay.com/search/search.dll?from=R40&_trksid=m37&satitle=ti+link+cable&category0=

USB?:

http://cgi.ebay.com/TI-84-Silver-USB-Link-Cable-I-O-Cable-w-CD-Software_W0QQitemZ330201476935QQihZ014QQcategoryZ5 0581QQrdZ1QQssPageNameZWD1VQQtrksidZp1638.m118.l12 47QQcmdZViewItem

Omastar
01-24-2008, 04:46 PM
I know the 84-Plus uses a 15MHz Zilog processor, not sure about the 92s. I stumbled across a site one night where a guy hardmodded his calculator(s). I'll look for that.

Ah, here's something: http://en.wikipedia.org/wiki/Comparison_of_Texas_Instruments_Graphing_Calculato rs

Apprently this TI-Nspire has a 150MHz CPU? Hard to believe. But I was thinking the TI-92 used a Motorola processor, and it turns out it does.

Found it! http://richfiles.solarbotics.net/Turbo.html

Knight
01-24-2008, 05:09 PM
I know the 84-Plus uses a 15MHz Zilog processor, not sure about the 92s. I stumbled across a site one night where a guy hardmodded his calculator(s). I'll look for that.

Ah, here's something: http://en.wikipedia.org/wiki/Comparison_of_Texas_Instruments_Graphing_Calculato rs

Apprently this TI-Nspire has a 150MHz CPU? Hard to believe. But I was thinking the TI-92 used a Motorola processor, and it turns out it does.

Found it! http://richfiles.solarbotics.net/Turbo.html

Thank you for the information. :D

I might be able to get my hands on a friends 83, so that I can try that hard mod.

KaptainBlaZzed
01-25-2008, 08:54 PM
i overclocked an 83 back in the day by changing out one of the resistors, it made it about twice as fast. Games were crazy fast on it.:down:

It was my first overclock. :up:

Knight
01-25-2008, 09:06 PM
i overclocked an 83 back in the day by changing out one of the resistors, it made it about twice as fast. Games were crazy fast on it.:down:

It was my first overclock. :up:

How long was the battery life? I might use some cells that have more capacity to keep the thing alive for a while. :yepp:

PCTC3
01-28-2008, 03:58 PM
I overclocked my TI-83 from 6MHz to 15MHz by swapping a capacitor, not resistor, I think. it should be C06 or something. My memory fails me.

But to run both at the same time, you need to learn TI ASM language. The TI assembly language allows more functions than TI-BASIC, including calculations beyond the standard variable length and archive/unarchive functions in addition to anything else you can do with a calculator. TICALC.org should have an SDK for it, or at least a link to it.

Knight
01-28-2008, 04:18 PM
I overclocked my TI-83 from 6MHz to 15MHz by swapping a capacitor, not resistor, I think. it should be C06 or something. My memory fails me.

But to run both at the same time, you need to learn TI ASM language. The TI assembly language allows more functions than TI-BASIC, including calculations beyond the standard variable length and archive/unarchive functions in addition to anything else you can do with a calculator. TICALC.org should have an SDK for it, or at least a link to it.

Oh cool. I will check that out. :)

:up:

Roger_D25
02-21-2008, 12:23 PM
It looks like this thread may have died but it was a great read! I'm currently in graduate school for mechanical engineering so this type of thing is pretty cool to me! I had no idea that this stuff was even possible on a calculator! I have a TI-83, TI-86, and of course a TI-89. I very rarely use my TI-89 so maybe that will be the test bed for trying this mods? I will post back any results and big mistakes I make. Thanks for all the great information regarding modifying our calculators

FrogBite
02-24-2008, 06:52 AM
Graph the equation of y=sqrt(20000squared-xsquared) and get the integral from 0 to 20000. The result is 314159265.

ixtapalapaquetl
02-24-2008, 05:55 PM
Doesn't the 89 (and therefore the92) have the means to keep time internally? I'm pretty sure it does. It might just be a matter of implementing a "gettime()" function twice and then subtracting.

Knight
02-25-2008, 07:16 AM
Doesn't the 89 (and therefore the92) have the means to keep time internally? I'm pretty sure it does. It might just be a matter of implementing a "gettime()" function twice and then subtracting.

Will have to ask my friend. He is the only one who I know of that has the 89/92. Will look on the internet about this.

Thanks, :)

ixtapalapaquetl
02-25-2008, 03:47 PM
SUCCESS! This is so effin cool!

There are a few 89-related syntax modifications to your original code, but all I really did was add in a couple gettime()'s and converted the difference (in {hr,min,sec} format) to seconds in order to prevent negative values from popping up. Note that the Clock must be manually enabled: Home -> F1 -> B and then set time and date. Unfortunately, the Clock does not seem to work on Virtual TI, so we can't run the emulator realtime on our computers...


spi89()
Prgm
ClrIO
getTime()->ti
1->s
0->c
For a,1,4000,2
4/(s*a)->b
b+c->d
d->c
-1*s->s
EndFor
getTime()->tf
tf-ti->dt
3600*dt[1]+60*dt[2]+dt[3]->tpi
Disp "pi="
Disp c+.0005
Disp "time="
Disp tpi
EndPrgmCheck it out!
http://img100.imageshack.us/img100/4268/spisskh7.jpg (http://imageshack.us)
102 seconds!!! Does this qualify as the current WR? Time for some memory tweaks!!!

Great work Knight! Obviously, feel free to modify any ugly code - my programming skills are limited to TI calculators, and thus may be substandard!

Roger_D25
02-25-2008, 03:52 PM
SUCCESS! This is so effin cool!

There are a few 89-related syntax modifications to your original code, but all I really did was add in a couple gettime()'s and converted the difference (in {hr,min,sec} format) to seconds in order to prevent negative values from popping up. Note that the Clock must be manually enabled: Home -> F1 -> B and then set time and date. Unfortunately, the Clock does not seem to work on Virtual TI, so we can't run the emulator realtime on our computers...


spi89()
Prgm
ClrIO
getTime()->ti
1->s
0->c
For a,1,4000,2
4/(s*a)->b
b+c->d
d->c
-1*s->s
EndFor
getTime()->tf
tf-ti->dt
3600*dt[1]+60*dt[2]+dt[3]->tpi
Disp "pi="
Disp c+.0005
Disp "time="
Disp tpi
EndPrgmCheck it out!
http://img100.imageshack.us/img100/4268/spisskh7.jpg (http://imageshack.us)
102 seconds!!! Does this qualify as the current WR? Time for some memory tweaks!!!

Great work Knight! Obviously, feel free to modify any ugly code - my programming skills are limited to TI calculators, and thus may be substandard!

Would it be possible to do this on a TI-86 and if so how would the code differ from the above? Oh yeah, great job ixtapalapaquet that is very cool indeed! I would love to get this working on my TI-86 and then show it off to my math geek friends at school (I would be the king of cool), lol! I was just thinking about how geeky I must be to get excited about this, lol!

Knight
02-25-2008, 04:43 PM
SUCCESS! This is so effin cool!

There are a few 89-related syntax modifications to your original code, but all I really did was add in a couple gettime()'s and converted the difference (in {hr,min,sec} format) to seconds in order to prevent negative values from popping up. Note that the Clock must be manually enabled: Home -> F1 -> B and then set time and date. Unfortunately, the Clock does not seem to work on Virtual TI, so we can't run the emulator realtime on our computers...


spi89()
Prgm
ClrIO
getTime()->ti
1->s
0->c
For a,1,4000,2
4/(s*a)->b
b+c->d
d->c
-1*s->s
EndFor
getTime()->tf
tf-ti->dt
3600*dt[1]+60*dt[2]+dt[3]->tpi
Disp "pi="
Disp c+.0005
Disp "time="
Disp tpi
EndPrgmCheck it out!

...


102 seconds!!! Does this qualify as the current WR? Time for some memory tweaks!!!

Great work Knight! Obviously, feel free to modify any ugly code - my programming skills are limited to TI calculators, and thus may be substandard!

You are added onto my hero list. :p: :up: The use of the getTime function was smart. Is it confirmed that it is not possible on a 83/84?

Great work.

More efficient coding might be determined by the method in which we calculate Pi itself. Of course I will experiment, and clean it up. So this can be our first version.

ixtapalapaquetl
02-25-2008, 04:57 PM
You are added onto my hero list. :p: :up: The use of the getTime function was smart. Is it confirmed that it is not possible on a 83/84?

Great work.

More efficient coding might be determined by the method in which we calculate Pi itself. Of course I will experiment, and clean it up. So this can be our first version.This was all you brother. I just added a little patch at the end!:D

I am almost positive that the 89/92 (and likely Inspire) are the only ones with Clocks. So 83/84/86 are likely out of the running. Regarding the pi calculations, I seem to recall some infinite series which converge quite rapidly... it will take me a few days to dig anything up. I'll let you know if I find anything.

And Roger_D25, you should learn to love your inner nerd! Don't hide it! Let it sing loudly and let it sing off key!

Alpha
02-25-2008, 06:59 PM
i know you can program in C for the Ti-89/92 as they are the same cpu, a 68k based chip and run much faster then the 82-86 conterparts. the only way to get time and your algorithm working is to add a counter alongside the calcutions and then have an average number based on your own clock as to how fast it works. because the 84 doesnt have an internal clock, you have no real easy way to track that.

this is one of my favorite algorithms and with it and some of my own programming skills i have able to find pi to an easy 150 digits

http://en.wikipedia.org/wiki/Bailey-Borwein-Plouffe_formula

Rmrdr13
02-26-2008, 02:41 PM
My Ti-83 plus did it in about 1'29" give or take a few tenths.

It doesn't have a clock so i had to use a stopwatch.

ixtapalapaquetl
02-26-2008, 05:41 PM
More good news! According to TI website, the "84 Plus family" has the clock function (enabled using MODE) and the requisite Gettime function! http://education.ti.com/educationportal/sites/US/productDetail/us_os_84plus.html?subid=4&topid=60 I don't have access to one, so someone else will have to tweak the syntax.

Knight
02-26-2008, 07:29 PM
More good news! According to TI website, the "84 Plus family" has the clock function (enabled using MODE) and the requisite Gettime function! http://education.ti.com/educationportal/sites/US/productDetail/us_os_84plus.html?subid=4&topid=60 I don't have access to one, so someone else will have to tweak the syntax.

I have been playing with the getTime function on my Ti 84. If I enter getTime on my screen, the result in in the form "{xx xx xx}." The x's have would be replaced with numbers that represent hours, minutes, and seconds. I can't seem to assign it to a variable as well. (Didn't think so anyway.)

Knight
02-26-2008, 08:11 PM
This will for sure work with a 83/84. :up:

I got a time of 42/43 seconds. I even checked it with the Windows clock. :ROTF: It is for sure accurate to one second.


ClrHome
startTmr->H
1->S
0->C

For(A,1,4000,2)
(4/(S*A))->B
B+C->D
D->C
(-1*S)->S
End

checkTmr(H)->J

Disp "Pi ="
Disp (C+0.0005)
Disp "Time:",J
Output(1,1,"")

ixtapalapaquetl
02-26-2008, 08:30 PM
This will for sure work with a 83/84. :up:

I got a time of 42/43 seconds. I even checked it with the Windows clock. :ROTF: It is for sure accurate to one second. Congratulations! Mission accomplished! Now I want to know why the hell my trusty 89 so damn slow!!! :rofl:

Knight
02-26-2008, 09:22 PM
Congratulations! Mission accomplished! Now I want to know why the hell my trusty 89 so damn slow!!! :rofl:

I will try to get my friends 89 for sure now. I would like to try the method you used, and the one that I used. (getTime vs. startTmr) :)

FrogBite
03-04-2008, 08:42 AM
Is it possible to convert this equation to the TI?

http://img172.imageshack.us/img172/1432/piequationv2ak9.png

That is: 2 plus the area between 0 and the sqrt of 8 of the above equation

Knight
03-04-2008, 04:39 PM
Is it possible to convert this equation to the TI?

http://img151.imageshack.us/img151/6011/newpiequationv2xm7.png

That is: 2 plus the area between 0 and the sqrt of 8 of the above equation

It is possible to integrate that function.

2+fnInt((sqt(4+(x-(sqt(8)/2))^2))-sqt(2),x,0,sqt(8)) sqt - Is for square root, ^2 is something raised to the second power.

I believe that you need to use >200 for 'r' to get a closer answer.

fnInt is for 83/84 calculators.
The 89 and otters have the actual integral sign.

I however got an answer of 4.09 by using that equation.



Edit: My friend with a 89 got a time of ~110s with my method. Strange that my 84 is faster.

bluep3ace
03-04-2008, 07:10 PM
SUCCESS! This is so effin cool!

There are a few 89-related syntax modifications to your original code, but all I really did was add in a couple gettime()'s and converted the difference (in {hr,min,sec} format) to seconds in order to prevent negative values from popping up. Note that the Clock must be manually enabled: Home -> F1 -> B and then set time and date. Unfortunately, the Clock does not seem to work on Virtual TI, so we can't run the emulator realtime on our computers...


spi89()
Prgm
ClrIO
getTime()->ti
1->s
0->c
For a,1,4000,2
4/(s*a)->b
b+c->d
d->c
-1*s->s
EndFor
getTime()->tf
tf-ti->dt
3600*dt[1]+60*dt[2]+dt[3]->tpi
Disp "pi="
Disp c+.0005
Disp "time="
Disp tpi
EndPrgmCheck it out!
http://img100.imageshack.us/img100/4268/spisskh7.jpg (http://imageshack.us)
102 seconds!!! Does this qualify as the current WR? Time for some memory tweaks!!!

Great work Knight! Obviously, feel free to modify any ugly code - my programming skills are limited to TI calculators, and thus may be substandard!
iirc pi = 3.141592653589.........
error in the code? or internal rounding?
still, nice job on the WR:yepp:

Knight
03-04-2008, 07:41 PM
iirc pi = 3.141592653589.........
error in the code? or internal rounding?
still, nice job on the WR:yepp:

It is a fault in the code. Only 4000 fractions were added up to produce pi. That is roughly accurate to 4 decimal places. It would take 20,000 or more fractions to correctly calculate pi to 8-10 decimal places.

For the sake of saving time, the value of our calculated pi was left to be inaccurate. pi != pi :p:

FrogBite
03-05-2008, 06:17 AM
It is possible to integrate that function.

2+fnInt((sqt(4+(x-(sqt(8)/2))^2))-sqt(2),x,0,sqt(8)) sqt - Is for square root, ^2 is something raised to the second power.

I believe that you need to use >200 for 'r' to get a closer answer.

fnInt is for 83/84 calculators.
The 89 and otters have the actual integral sign.

I however got an answer of 4.09 by using that equation.



Edit: My friend with a 89 got a time of ~110s with my method. Strange that my 84 is faster.

graph it and add two to the area value from 0 to sqrt(8). You get the same value of pi as saved on the calc.

sorry there was an sign mistake in the equation. should work now.

ZOMGVTEK
03-05-2008, 07:23 AM
I got my TI-83+ 8Mhz (6Mhz Stock clock) running safe at 19Mhz with a few tweaks, its wicked fast, but sometimes while grahing, it throws artifacts...

I think i need more voltage, and a little better cooling.

Knight
03-13-2008, 07:08 PM
I got my TI-83+ 8Mhz (6Mhz Stock clock) running safe at 19Mhz with a few tweaks, its wicked fast, but sometimes while grahing, it throws artifacts...

I think i need more voltage, and a little better cooling.

I might try to make my calculator slower, so that I can cheat at some games. :p:

Hax0r?

71 (Bryan)
03-14-2008, 03:52 PM
My goal will be to over clock my calculator. :shocked:

i was saying that to my cousin just last weak, there must be a way.
if any on finds out how, let me know

Knight
03-14-2008, 04:31 PM
i was saying that to my cousin just last weak, there must be a way.
if any on finds out how, let me know

Here you go. :up:

http://www.ticalc.org/hardware/overclocking/

Pick your calculators number and click its boost link. :)