|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#10
|
||||
|
||||
|
Re: A couple of noodle scratchers
Quote:
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. Last edited by Jnadke : 02-12-2002 at 02:03. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |