Go to Post The mission is to mobilize community, school and corporate resources to support the vision. The method is to provide an interesting, exciting program that gives young people opportunities to explore and expand their capabilities and interests. - Rick TYler [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
  #6   Spotlight this post!  
Unread 11-03-2002, 13:38
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Unhappy Sounds like it must be a programming error.

Quote:
Originally posted by ChrisA
after writing a code to test each of the scratchpad ram locations we found that none of them seem to be bad... but if we use them in our coding they give us strange and also inconsistent values
if we switch from these bad sectors to what we have deemed as good locations the code works just fine and the values are what they should be.

the bad locations when used in our robots code will always give data in a patern such as the one that i posted earlier (0,3,2,1,0,3,2,1...etc) and have no relation to any data given to the locations by any piece of our code
I'm not sure what to make of your "pattern". Maybe you can post your code (or a snippet.)

My best guess is that you're saying that your program writes data to a scratchpad ram location, and when you read it back, the value is say a 0 (even though the value you had written was non-zero.) The next time you read it, the value is 3, and the next time it's 2 and so forth. Does this describe your situation at all? (Or are you storing data in a sequence of cells, and when you read them back, these are the values you're seeing in those cells?)

Some questions:
  • Are you writing data every time between reads?
  • Are you using scratchpad RAM in other places in your program? Is it possible you are overwriting your data elsewhere?

Some things to keep in mind:
  • You can only write BYTE data to scratchpad RAM. If you try to write a WORD value, it will get truncated to a byte. (I'm guessing that it's the high order byte that gets lopped off.)
  • Calculations are carried out internally to 16 bit precision. If you're writing the result of a calculation to scratchpad RAM, and the result is bigger than 8 bits, it will be truncated.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 11-03-2002 at 14:02.
 


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
Scratchpad RAM Access Time Ian W. Programming 1 13-02-2003 00:31
Bad, bad, bad!!! archiver 2000 13 23-06-2002 22:29
BS-2sx RAM access times archiver 2000 2 23-06-2002 22:10


All times are GMT -5. The time now is 17:07.

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