Scratchpad Ram Weirdness
Archiver
Posts: 46,084
I've been having a lot of problems with a scratchpad ram sorting routine with
my BS2p. So, I've made a little test program to read all the ram and I think
something is wrong with my stamp since the problem is repeatable with the
simple program.
The problem is that after I use the "Store" command, the value of ram position
110 turns to 59 and position 111 turns to 0, no matter what value was in there
before. I'm using many program slots and need the scratchpad ram to remain
unchanged between programs. I don't know if my stamp is bad or what, maby
someone on the list could try this little program to see if the problem happens
for them too.
Thanks,
Stewart
'{$STAMP BS2p}
x var byte
Y var byte
for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
put x, 1
next
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
Store 7 'STORE COMMAND
Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is messed.",
CR, CR
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
END
--
Stewart Mayer, stewlist@k... on 12/17/2001
my BS2p. So, I've made a little test program to read all the ram and I think
something is wrong with my stamp since the problem is repeatable with the
simple program.
The problem is that after I use the "Store" command, the value of ram position
110 turns to 59 and position 111 turns to 0, no matter what value was in there
before. I'm using many program slots and need the scratchpad ram to remain
unchanged between programs. I don't know if my stamp is bad or what, maby
someone on the list could try this little program to see if the problem happens
for them too.
Thanks,
Stewart
'{$STAMP BS2p}
x var byte
Y var byte
for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
put x, 1
next
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
Store 7 'STORE COMMAND
Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is messed.",
CR, CR
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
END
--
Stewart Mayer, stewlist@k... on 12/17/2001
Comments
Good (bad) observation! I tested it out, and sure enough, the same
dismaying result as yours. The STORE instruction always effects
locations 110 and 111 as you say. That is true also for STORE 0,
STORE 1 etc.; it always turns those locations to 59 and 0
respectively, no matter what was stored there to begin with.
-- best regards
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...
>I've been having a lot of problems with a scratchpad ram sorting routine with
>my BS2p. So, I've made a little test program to read all the ram and I think
>something is wrong with my stamp since the problem is repeatable with the
>simple program.
>
>The problem is that after I use the "Store" command, the value of
>ram position
>110 turns to 59 and position 111 turns to 0, no matter what value was in there
>before. I'm using many program slots and need the scratchpad ram to remain
>unchanged between programs. I don't know if my stamp is bad or what, maby
>someone on the list could try this little program to see if the
>problem happens
>for them too.
>
>Thanks,
> Stewart
>
>'{$STAMP BS2p}
>
>x var byte
>Y var byte
>
>for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
> put x, 1
>next
>
>for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
> get x, y
> debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
>next
>
>Store 7 'STORE COMMAND
>
>Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is messed.",
>CR, CR
>
>for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
> get x, y
> debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
>next
>
>END
>
>--
>Stewart Mayer, stewlist@k... on 12/17/2001
>
>Could you run the test with a for-next loop of say 121
>and check if the error occurs on the same location
>or location 121-16=105. Just to see if the for-next
>statement may be involved.
>
>Regards peter
Same result with FOR x=105 to 115
-- Tracy
(ouch!)
Marylou
_______________________________________________________
--- In basicstamps@y..., Stewart Mayer <stewlist@k...> wrote:
> I've been having a lot of problems with a scratchpad ram sorting
routine with
> my BS2p. So, I've made a little test program to read all the ram
and I think
> something is wrong with my stamp since the problem is repeatable
with the
> simple program.
>
> The problem is that after I use the "Store" command, the value of
ram position
> 110 turns to 59 and position 111 turns to 0, no matter what value
was in there
> before. I'm using many program slots and need the scratchpad ram to
remain
> unchanged between programs. I don't know if my stamp is bad or
what, maby
> someone on the list could try this little program to see if the
problem happens
> for them too.
>
> Thanks,
> Stewart
>
> '{$STAMP BS2p}
>
> x var byte
> Y var byte
>
> for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
> put x, 1
> next
>
> for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
> get x, y
> debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
> next
>
> Store 7 'STORE COMMAND
>
> Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is
messed.",
> CR, CR
>
> for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
> get x, y
> debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
> next
>
> END
>
> --
> Stewart Mayer, stewlist@k... on 12/17/2001
least I don't feel so bad for failing to debug my code for over two days,
thinking I had caused the problem!
I get the same results when using any store location too, and it doesn't matter
where the read loop starts or stops. I hope parallax is listening.
Unfortunately, every byte of ram on the chip has been spoken for, but since the
ram is OK for PUTting and GETting without the STORE command, it would be fairly
easy to copy the data in EEPROM temporarily while switching slots, just slower
and more code to take up valuable program space.
Anyway, this is a first for me. Cool [noparse]:)[/noparse]
Stewart
On Tue, 18 Dec 2001 03:04:21 -0800, peter verkaik wrote:
>Hi,
>
>Well.. congratulations to Stewart, I guess, for discovering this hidden bug.
>Now Parallax has to fix this.
>I advice to mark locations 110 and 111 off limits when using STORE.
>Wonder if there are more statements that generate such an error.
>
>Regards peter
>
>
>
Oorspronkelijk bericht
>Van: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=tiz0Eq00ZZzMMHiyyg764_MiSWeWF1ljhq7xfMnkFMHCDx-cgd5sCragsmC38Sth1-_ypVm9Ai4-CbfH]tracy@e...[/url
>Verzonden: maandag 17 december 2001 17:37
>Aan: basicstamps@yahoogroups.com
>Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
>
>>Hi,
>>
>>Could you run the test with a for-next loop of say 121
>>and check if the error occurs on the same location
>>or location 121-16=105. Just to see if the for-next
>>statement may be involved.
>>
>>Regards peter
>
>Same result with FOR x=105 to 115
>-- Tracy
>(ouch!)
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. ·Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. ·Text in the Subject and Body
of the message will
>be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
--
Stewart Mayer, stewlist@k... on 12/17/2001
Very strange indeed.
I do not own a bs2p so I cannot test it,
but does it occur for all store values or only 7?
Maybe a coincidence but I noticed that location 110 is exactly
16 positions (10H) below 126. If it is a random error how would
the odds be so the location involved would be a power of 2 below
the top position?
Regards peter
Oorspronkelijk bericht
Van: Stewart Mayer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9pgTqwySAaIp-DaSAD-lBNoGCEG7zMXIjsDCfU6LAc6nD-o-4G9QtaQa7o2YtIME0jHyKUoeZzjk4Wud8S3ojWUbHBA]stewlist@k...[/url
Verzonden: maandag 17 december 2001 16:02
Aan: basicstamps@yahoogroups.com
Onderwerp: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
I've been having a lot of problems with a scratchpad ram sorting routine
with
my BS2p. So, I've made a little test program to read all the ram and I
think
something is wrong with my stamp since the problem is repeatable with the
simple program.
The problem is that after I use the "Store" command, the value of ram
position
110 turns to 59 and position 111 turns to 0, no matter what value was in
there
before. I'm using many program slots and need the scratchpad ram to remain
unchanged between programs. I don't know if my stamp is bad or what, maby
someone on the list could try this little program to see if the problem
happens
for them too.
Thanks,
Stewart
'{$STAMP BS2p}
x var byte
Y var byte
for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
put x, 1
next
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
Store 7 'STORE COMMAND
Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is messed.",
CR, CR
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
END
--
Stewart Mayer, stewlist@k... on 12/17/2001
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Could you run the test with a for-next loop of say 121
and check if the error occurs on the same location
or location 121-16=105. Just to see if the for-next
statement may be involved.
Regards peter
Oorspronkelijk bericht
Van: Stewart Mayer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9QezpHR74PNuELoquf4YENlukY0_20nEadti_zbmpaOzEqMPfiwUdA8aoijUKGEly8UG23B9miVqh8nM6mDA03q8cv_M]stewlist@k...[/url
Verzonden: maandag 17 december 2001 16:02
Aan: basicstamps@yahoogroups.com
Onderwerp: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
I've been having a lot of problems with a scratchpad ram sorting routine
with
my BS2p. So, I've made a little test program to read all the ram and I
think
something is wrong with my stamp since the problem is repeatable with the
simple program.
The problem is that after I use the "Store" command, the value of ram
position
110 turns to 59 and position 111 turns to 0, no matter what value was in
there
before. I'm using many program slots and need the scratchpad ram to remain
unchanged between programs. I don't know if my stamp is bad or what, maby
someone on the list could try this little program to see if the problem
happens
for them too.
Thanks,
Stewart
'{$STAMP BS2p}
x var byte
Y var byte
for x = 0 to 126 'PUT A VALUE OF 1 INTO ALL WRITEABLE RAM LOCATIONS
put x, 1
next
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
Store 7 'STORE COMMAND
Debug cr, cr, cr, cr, "Now After Store Command RAM Position 110 is messed.",
CR, CR
for x = 0 to 126 'READ AND DEBUG ALL WRITEABLE RAM LOCATIONS
get x, y
debug "Memory Position ", DEC3 X, " = ", DEC Y, CR
next
END
--
Stewart Mayer, stewlist@k... on 12/17/2001
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Well.. congratulations to Stewart, I guess, for discovering this hidden bug.
Now Parallax has to fix this.
I advice to mark locations 110 and 111 off limits when using STORE.
Wonder if there are more statements that generate such an error.
Regards peter
Oorspronkelijk bericht
Van: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=aI09gopjVCDiJBavhzlOBfiCDUxYaj13maXWGVQGfeIlMFlWNdpNq1Tj5vodda3TiTL4inx9tnGuaQ]tracy@e...[/url
Verzonden: maandag 17 december 2001 17:37
Aan: basicstamps@yahoogroups.com
Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
>Hi,
>
>Could you run the test with a for-next loop of say 121
>and check if the error occurs on the same location
>or location 121-16=105. Just to see if the for-next
>statement may be involved.
>
>Regards peter
Same result with FOR x=105 to 115
-- Tracy
(ouch!)
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
If you have two (temporary) variables ram bytes available
you can just save the two location with get,
do store and then put the values back.
You don't need the eeprom that way.
(to save the values you already need one ram byte
even if you want to store them in eeprom)
regards peter
Oorspronkelijk bericht
Van: Stewart Mayer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=RuVbOdqnC_kAt_rN5EW9xuffrMnNe-sU7hfb74X_tJcsyp21jJllYJWxSoICA2URLkZB_y37mYahSWpIijx17nc]stewlist@k...[/url
Verzonden: maandag 17 december 2001 21:00
Aan: basicstamps@yahoogroups.com
Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
Oh no! I was totally hoping it was only my chip that had the problem. But
at least I don't feel so bad for failing to debug my code for over two days,
thinking I had caused the problem!
I get the same results when using any store location too, and it doesn't
matter where the read loop starts or stops. I hope parallax is listening.
Unfortunately, every byte of ram on the chip has been spoken for, but since
the ram is OK for PUTting and GETting without the STORE command, it would be
fairly easy to copy the data in EEPROM temporarily while switching slots,
just slower and more code to take up valuable program space.
Anyway, this is a first for me. Cool [noparse]:)[/noparse]
Stewart
On Tue, 18 Dec 2001 03:04:21 -0800, peter verkaik wrote:
>Hi,
>
>Well.. congratulations to Stewart, I guess, for discovering this hidden
bug.
>Now Parallax has to fix this.
>I advice to mark locations 110 and 111 off limits when using STORE.
>Wonder if there are more statements that generate such an error.
>
>Regards peter
>
>
>
Oorspronkelijk bericht
>Van: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=-KVszyUz9w1g-mQGhBuObHKaPyl6JFAveAeFHdmgyy3a7uOCG84yqlQa6g2arVV9vTivGfHsoXex1D8BqA]tracy@e...[/url
>Verzonden: maandag 17 december 2001 17:37
>Aan: basicstamps@yahoogroups.com
>Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
>
>>Hi,
>>
>>Could you run the test with a for-next loop of say 121
>>and check if the error occurs on the same location
>>or location 121-16=105. Just to see if the for-next
>>statement may be involved.
>>
>>Regards peter
>
>Same result with FOR x=105 to 115
>-- Tracy
>(ouch!)
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
Body of the message will
>be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
--
Stewart Mayer, stewlist@k... on 12/17/2001
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Thanks
stewart
On Tue, 18 Dec 2001 07:01:32 -0800, peter verkaik wrote:
>Hi Stewart,
>
>If you have two (temporary) variables ram bytes available
>you can just save the two location with get,
>do store and then put the values back.
>You don't need the eeprom that way.
>(to save the values you already need one ram byte
>even if you want to store them in eeprom)
>
>regards peter
>
>
>
Oorspronkelijk bericht
>Van: Stewart Mayer [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=um9BYXw8wxq_UZ6ogmPqSnltwCY4gfyX6UUIV9DnBCJZm1bRQJprZKdwqrn1XYAGf6O88-Df6zPDijq84Mci2-D0Sj0]stewlist@k...[/url
>Verzonden: maandag 17 december 2001 21:00
>Aan: basicstamps@yahoogroups.com
>Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
>
>Oh no! I was totally hoping it was only my chip that had the problem. But
>at least I don't feel so bad for failing to debug my code for over two days,
>thinking I had caused the problem!
>
>I get the same results when using any store location too, and it doesn't
>matter where the read loop starts or stops. I hope parallax is listening.
>
>Unfortunately, every byte of ram on the chip has been spoken for, but since
>the ram is OK for PUTting and GETting without the STORE command, it would be
>fairly easy to copy the data in EEPROM temporarily while switching slots,
>just slower and more code to take up valuable program space.
>
>Anyway, this is a first for me. Cool [noparse]:)[/noparse]
>
>Stewart
>
>On Tue, 18 Dec 2001 03:04:21 -0800, peter verkaik wrote:
>>Hi,
>>
>>Well.. congratulations to Stewart, I guess, for discovering this hidden
>bug.
>>Now Parallax has to fix this.
>>I advice to mark locations 110 and 111 off limits when using STORE.
>>Wonder if there are more statements that generate such an error.
>>x
>>Regards peter
>>
>>
>>
Oorspronkelijk bericht
>>Van: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9T53DwWFDaLJYbGsojajI1IdXL6Dn3zsJaIawAqfEVVUz69JOD0xPY0TOLZtJ0eKBZ-Qp28VGUGT3GxdDA]tracy@e...[/url
>>Verzonden: maandag 17 december 2001 17:37
>>Aan: basicstamps@yahoogroups.com
>>Onderwerp: RE: [noparse][[/noparse]basicstamps] Scratchpad Ram Weirdness
>>
>>>Hi,
>>>
>>>Could you run the test with a for-next loop of say 121
>>>and check if the error occurs on the same location
>>>or location 121-16=105. Just to see if the for-next
>>>statement may be involved.
>>>
>>>Regards peter
>>
>>Same result with FOR x=105 to 115
>>-- Tracy
>>(ouch!)
>>
>>To UNSUBSCRIBE, just send mail to:
>>basicstamps-unsubscribe@yahoogroups.com
>>from the same email address that you subscribed. Text in the Subject and
>>Body of the message will be ignored.
>>
>>
>>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>>To UNSUBSCRIBE, just send mail to:
>>basicstamps-unsubscribe@yahoogroups.com
>>from the same email address that you subscribed. Text in the Subject and
>Body of the message will
>>be ignored.
>>
>>
>>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>
>--
>Stewart Mayer, stewlist@k... on 12/17/2001
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and Body
of the message will
>be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
!
--
Stewart Mayer, stewlist@k... on 12/18/2001
Do you know if this bug with the BS2p Scratchpad and the STORE
command is resolved? The STORE command was blasting locations 110
and 111. This is from a thread last December.
-- Tracy
>Hi Stewart,
>
>Good (bad) observation! I tested it out, and sure enough, the same
>dismaying result as yours. The STORE instruction always effects
>locations 110 and 111 as you say. That is true also for STORE 0,
>STORE 1 etc.; it always turns those locations to 59 and 0
>respectively, no matter what was stored there to begin with.