Thread: Division / Mod
View Single Post
  #6   Spotlight this post!  
Unread 16-04-2002, 18:18
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Use a data table in the EEPROM. Then, using C++ (or some other language like that), do all the calculations. make sure to only have integers (since PBASIC truncates), and load it into the EEPROM using the "DATA" command. then, when you take the values, you can read them from the EEPROM using the "READ" command. very simple, and it works just as fast (or fast enough) as if you're doing the calculations on the fly. Just don't let Joe Ross help you program that part.

Ex.

to put something into EEPROM

Joe's Way (The Not-Right Way)
EEPROM 1,2,3,4,5...

The Right Way
DATA 1,2,3,4,5...

The numbers are then placed in the EEPROM starting from the first spot, and working to the last. There's ways where you can get fancy with it, but i'm not sure of them. Check the manual, under DATA. Hope this helps, and if you need any more help, come over to team 810 at nats.
__________________
AIM --> Woloi
Email --> ian@woloschin.com