Go to Post Putting 2 and 2 together, and then mixing them back up for someone else to try and get 4 in a different way is just plain fun. - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 02-12-2002, 01:33
Jnadke Jnadke is offline
Go Badgers!
#0093
Team Role: Alumni
 
Join Date: Jan 2002
Location: Appleton, WI
Posts: 775
Jnadke is on a distinguished road
Send a message via ICQ to Jnadke Send a message via AIM to Jnadke Send a message via Yahoo to Jnadke
Re: A couple of noodle scratchers

Quote:
Originally posted by Cheese Head

I have a couple of questions I have been able to figure out. I figure that you people here could give me accurate answers, in english. Here's what they are:
1) What is 2's compliment? how does it work? what would I use it for?
2) Is there any way to get more than 26 variables? What determines that, like is a memory constraint?
3) What is the difference between GET and PUT?
4) What are the EEPROM and Scratchpad RAM? What is the difference?
5) How can I use the NOT command? Using the ~ does not seem to work for us, maybe we are using it wrong.
Thanks in advance!
Basic Stamp User's Manual - A FIRST Programmer's Holy Bible

Many of the answers to your questions can be answered here.


1) Answered above.

2) 26 variables is not the constraint. The constraint is actually 26 bytes. You can meet this using any combination of words (2 bytes, numbers 0-65535), bytes (0-255), nibs (1/2 byte, numbers 0-15 (useful for speed settings)), and bits (1/8 byte, only 0 or 1 (useful for on/off)).
Technically there are 32 bytes, but 6 are used by the chip for I/O Pins and such.

One way to get around the limitation is by loading the program into "slots". Read the manual for more details. Basically, when a slot is loaded the same RAM is used, erasing all the previous contents. Scratchpad RAM, however, is carried over between slots. There are 64 bytes present (and bytes only). Only 0-62 are available. Read the manual to learn how to use it (GET and PUT commands).


3) Check the manual. GET retrieves a value from Scratchpad RAM. PUT places a value into a Scratchpad RAM location.

4) 1. EEPROM is where your program is stored. It can be written to, but only all-or-nothing. The entire EEPROM needs to be erased and then data sent to it.
2. RAM on the chip is available for your program to use. 26 bytes are available for variable use. These can be used to add/subtract/divide/multiply numbers.
3. Scratchpad RAM is available for storing numbers only. You can't perform math operations with it.


5) ~ will inverse the bits. For example, 128 becomes 126. 0 becomes 255. 1 becomes 254, etc. 127 is still 127.
__________________
The best moments of our lives fall in two categories: those that did happen and those that did not.

Last edited by Jnadke : 02-12-2002 at 02:03.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I'll delete this in a couple of hours. hixofthehood Chit-Chat 9 04-02-2003 23:26
couple of questions... archiver 2001 5 23-06-2002 22:48
A couple of problems I observed at the MAR archiver 2000 3 23-06-2002 22:27
Couple other thank yous Jason Haaga Thanks and/or Congrats 0 29-04-2002 03:29
A Couple Questions about Chairman's Award ben_whly Chairman's Award 4 26-01-2002 18:24


All times are GMT -5. The time now is 04:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi